  We find necessary and sufficient conditions on the function $\Phi$ for the
inequality $$\Big|\int_\Omega \Phi(K*f)\Big|\lesssim
\|f\|_{L_1(\mathbb{R}^d)}^p$$ to be true. Here $K$ is a positively homogeneous
of order $\alpha - d$, possibly vector valued, kernel, $\Phi$ is a
$p$-homogeneous function, and $p=d/(d-\alpha)$. The domain $\Omega\subset
\mathbb{R}^d$ is either bounded with $C^{1,\beta}$ smooth boundary for some
$\beta > 0$ or a halfspace in $\mathbb{R}^d$. As a corollary, we describe the
positively homogeneous of order $d/(d-1)$ functions $\Phi\colon \mathbb{R}^d
\to \mathbb{R}$ that are suitable for the bound $$\Big|\int_\Omega \Phi(\nabla
u)\Big|\lesssim \int_\Omega |\Delta u|.$$
