Consider a random variable $X$ on $\mathbb{R}^n$. For a linear mapping $T: \mathbb{R}^{n} \to \mathbb{R}^{n}$ we have $$\mathbb{E}[T(X)] = T(\mathbb{E}[X]).$$
I was wondering if there is an 'only iff' here, or whether there are mappings such that the relation still holds? In particular, does the answer to the above question depend on the distribution and what would be the anser for e.g. $X \sim \mathcal{N}(\mu,\Sigma)$?