(bong) Door Open. (bong) Door Open. (bong) Door Open.
Sound familiar? 
My first e34 did that all the time. The door sensor is part of the striker plate on the car, if you look closely you'll see a little nub that gets depressed when the door is closed.
That is, if the door catch is properly aligned and the parts aren't worn out!
The professional fix in my case would have been to buy a new drivers door striker plate assembly, as that was the one that was worn out and causing the system to think the door was open.
The real fix was to swap the driver door striker plate with the rear passenger side plate, the least worn one on the car. That fixed my Door Open chime for good.
HTH
Robin
72 Chevy K10
01 E39 M5