On a 2002 530 with 155k miles Drained the pan, then removed the top of the oil filter housing only to have oil come out from around the opening. The oil did not drain from the housing until I lifted the filter. I have used that brand / model of filter for the last several changes without incidence. Oil is changed every 5k miles. This was the first time in all those oil changes x=155 / 5 that the belly pan was wet with oil and that was before I opened the filter housing. I didn't pull the belly pan until after I spilled the oil so don't know how much of that oil was from the spill vs running the last 5 thousand. Is there something systemic wrong? Was it a bad filter? Lastly, which way does the oil flow through the housing? Does it flow out through the filter or inwardly?
The drain valve could have been sticking causing the oil not to drain. But since when you removed the filter and it drained then the housing is not clogged so thats good. The oil flows outside the filter to the inside. You could have the gasket between the oil filter housing and the block starting to leak which is common. What kind of filters have you been using?
I would try to use only OEM filters I have seen problems with aftermarket filters breaking down and clogging oil passages.