These instructions and photos are taken from the nearside rear light of my 08/2003 built E46 Saloon, the wiring on the offside rear light is slightly different, iirc the Brown wire locates in No.3 slot of the plug connector.
After having the rear bulb failure warning light repeatedly illuminate on the dash, and finding all the bulbs were intact,
I thought I'd better take a look at electrical connecting plug to the nearside rear light bulb holder.
1) Inside the boot and on the nearside locate the back of the bulb holder unit, unscrew the large plastic retaining screw by hand and pull out the bulb holder unit to view the bulbs.
2) Remove the electrical connector block by pinching the clips on the ends and pulling the block away from the bulb holder unit.
3) View the connector plug and bulb housing for damage.
You can clearly see the burnt out connector in No.2 slot which is connected to the thicker brown wire.
4) Using a similar thickness wire stip both ends, one end to suit the female connector and the other about 15-20mm long.
Crimp a suitable female connector on the shortest stripped end.
5) Strip about a 10mm section of the brown wire 75mm from the plug end.
6) Wrap the short piece of wire around the stripped section of Brown wire, tighten up using pliers, (for a more permanent solution you could solder this join)
7) Insulate the join with electrical tape.
8) Reconnect the electrical plug and connect the female connector to the correct Tab on the bulb holder rail.
9) Replace the bulb holder unit into the rear light unit and tighten the large plastic retaining screw by hand.
Its only 5 minute job and the rear bulb failure warning light has now stopped illuminating
~Sorry this is a bad link will try and get a fix asap~
Should you need it:- Full BMW repair kit instructions here in Ronnie's post..........