If this is the first time you have purchased a MAHLE oil filter for your diesel you might be surprised to see that the inside diameter appears smaller than other filters and smaller than the oil filter spindle.  Here is an example from an OM642 housing, but this is common across most engines.

This is normal.  MAHLE uses their proprietary white top material to create a seal.  The inside edge will stretch and seal around the spindle.  The filter is installed the same way but takes a small amount of extra force to make the seal.  Both ends of the filter have the seal material so the filter can be installed in either direction.

The filter will sit fully inside the cap as usual.  Remember that Mercedes, VW and BMW all uses MAHLE as an OEM supplier for their factory vehicles so there is no concerns about quality or fitment in this application.