It is an extremely complicated problem. Imposing restrictions on the stress energy tensor will give you different possible spacetimes (which spacetimes is also quite a complex problem), but if those restriction apply in all cases is quite hard to prove. The stress energy tensor still has to obey the field equations of the various matter fields that exist, but it is not easy to know what that means for the geometry.
Here's a sample of the various restrictions, and their implication on a stress energy tensor $diag(\rho, p)$ :
- The Trace Energy Condition (TEC). It's an old one that is not really used anymore, due to being too generally violated. It states that the trace of the stress energy tensor is never negative : $T^\mu_\mu \geq 0$, or $p \leq \frac{\rho}{3}$. It was thought to always be valid until it was shown in the 60's that matter in neutron stars probably violated it (with $p = \rho$). It implies that the Einstein tensor's trace is also positive, of course, but I don't know about its implications, as it is quite old and hasn't been used in almost 50 years. So we can forget about it.
- The Strong Energy Condition (SEC). If you have a timelike vector $X^\mu$, then $R_{\mu\nu} X^\mu X^\nu \geq 0$, or, equivalently, $T_{\mu\nu} + \frac{1}{2}g_{\mu\nu}T\geq 0$, meaning $\rho + 3p \geq 0$ and $\rho + p \geq 0$.
- The Dominant Energy Condition (DEC). If you have a timelike vector $X^\mu$, then $T_{\mu\nu} X^\mu X^\nu \geq 0$, and $T_{\mu\nu} X^\mu$ is a future pointing causal vector, or $\rho \geq 0$ and $|p|\leq\rho$.
- The Weak Energy Condition (WEC). If you have a timelike vector $X^\mu$, then $T_{\mu\nu} X^\mu X^\nu \geq 0$, or $\rho \geq 0$ and $p + \rho \geq 0$.
- The Null Energy Condition (NEC). The most basic of "classical" energy conditions. If you have a null vector $k^\mu$, then $T_{\mu\nu} k^\mu k^\nu \geq 0$, or $p + \rho \geq 0$.
Many of those definitions are related, and you have the following implications :
$DEC \rightarrow WEC \rightarrow NEC$
$SEC \rightarrow NEC$
Unfortunately, a variety of classical and quantum effects violate them. Simple scalar field theories have been shown to violate the SEC, as well as interacting fermionic theories. The accelerating expansion of the universe also seems to violate it. The weak energy condition is violated by squeezed vacuum states. The NEC is violated by non-minimally coupled scalar fields, superpositions of free states, the Casimir effect and Hawking radiations.
To remedy this situation, averaged version of those theorems were created, that are more difficult to violate. They are of the form
$\int_\gamma T_{\mu\nu} k^\mu k^\nu d\tau \geq 0$
for the Averaged Null Energy Condition (ANEC), for instance. You integrate the values over an entire null geodesic with respect to its parameter. Similar definitions exist for the weak condition (AWEC) and strong condition (ASEC), but over a timelike geodesic. Also among those are quantum inequalities, based on the observation that instances of negative energy tend to be limited in space and time, of the form
$\int dt \langle T_{\mu\nu} X^\mu X^\nu \rangle_\omega g(t) \geq f(t)$
Where $\omega$ is a Hadamard quantum state and $g(t)$ a smooth compact support function. All of those energy conditions are also violated, mostly by Casimir-type effects, which have no variation of energy density.
There has been recently additional, non-linear energy conditions that have been attempted to solve this problem, the so called quantum energy conditions. These include the Flux Energy Condition (FEC), which requires that the flux of energy should be causal :
$(\langle T^{\mu\nu}\rangle V_\nu) (\langle T^{\rho\sigma}\rangle V_\tau) g^{\nu\tau} \geq 0$
the Quantum Flux Energy Condition (QFEC), which I will not write because god damn, which is that the flux shouldn't be too spacelike (weaker condition of the FEC).
The Determinant Energy Condition (DETEC), where the determinant of the stress energy tensor is non-negative, or in the case of the quantum version (QDETEC), not too negative.
The Trace-of-Square Energy Condition (TOSEC), $\langle T^{\mu\nu}\rangle\langle T_{\mu\nu}\rangle \geq 0$, and its quantum version (QTOSEC), $\geq$ to some bound.
The QTOSEC seems to hold to most weird quantum states so far, so that's about as strong a statement as you can do that will hold for all known phenomenon
A few references :
http://arxiv.org/pdf/gr-qc/0205066.pdf
http://arxiv.org/pdf/1405.0403.pdf
http://arxiv.org/pdf/1306.2076.pdf
http://arxiv.org/pdf/1208.5399v1.pdf
http://arxiv.org/pdf/gr-qc/9410043v1.pdf