  We study the geometry of $3$-codimensional smooth subvarieties of the complex
projective space. In particular, we classify all quasi-Buchsbaum Calabi--Yau
threefolds in projective $6$-space. Moreover, we prove that this classification
includes all Calabi--Yau threefolds contained in a possibly singular
5-dimensional quadric as well as all Calabi--Yau threefolds of degree at most
$14$ in $\mathbb{P}^6$.
