Found you from a google search on a specific problem (tailgate won't open) and Jim 320d's post will help I hope.
I bought my E46 330d Touring 30 months old and 40k kms in Gremany in 2004 and now 10 years later I have added 240k kms and still love it. I've had a few injector issues but apart from that only items that could be classed as consumables at this mileage.
Has had a DMS chip re program from very soon after purchase, so has 220 bhp and I swear it's more economical.
Not quite as pristine now but close.
Well I'm off to wield a screwdriver and take the numberplate lights out!!