You need to replace the valve under the intake manifold. Quite a chore to get to. It is very difficult to even see it since it is under the intake manifold. There are several hoses going to this.
If you want to get an idea where it is located, look down the oil dipstick and you will see a black hose going down to the base of the dip stick. The hose is about 1/2" round and has an outer foam insulation on it. You will probably find the foam hard as a rock. Follow the hose back up. The valve is about the size of your fist. Another way to find it is to look at the hose that comes out of the front part of the valve cover that makes a 90 degree turn behind the oil filter and under the intake manifold.
You need to purchase all of the hoses that attached to this valve since they will be hard and break.
Kind of a pain to replace. There is a write-up about this somewhere. I replaced without removing the intake manifold but you have to do some screwing by touch since you won't always see the bolts/screws etc. I broke/cut the old hoses in order to get the old valve out since it is nearly impossible to get to the point to twist those hoses off.
If you want to see what it looks like, do a ebay search on part# 11617533400 There are some auctions that include all of the hoses.
This must be extremely common failure since my brother's 2002 325i also had the same exact failure. He had to pay over $1000 to get his replaced at an indy repair place.