It's a known issue, and although there seems to be some temporary fixes to it, there really isn't a permanent solution. It was the same with my E46 as well.
The most popular way to prevent it is to run the climate control with the A/C off for a few minutes before shutting the car off. Other people have suggested spraying disinfectant into the intake vent, but I've never tried it.
2006 E90 330i 6MT: TiAg|Black Leather|Poplar Trim|Premium Package|Cold Weather Package
2003 E46 325i 5MT: Retired - The beginning of my BMW obsession!