  In this paper we present a method for determining whether there exists a
largest Orlicz space $L^A(\Omega)$ satisfying the Sobolev embedding
$W^mL^A(\Omega) \to Y(\Omega)$ where $Y(\Omega)$ stands for an arbitrary
so-called Marcinkiewicz endpoint space. The tool developed in this work enables
us to investigate the optimality of Orlicz domain spaces in Sobolev embeddings
and also in Sobolev trace embeddings on domains $\Omega$ in $\mathbb{R}^n$ with
various regularity.
