Pour the milk into a heavy-based saucepan and add the onion or shallots, bay leaf, peppercorns and nutmeg or mace. Bring just to the boil over medium heat, then remove from the heat, cover and set aside to infuse for 10 minutes. Strain the flavoured milk into a jug.
Melt the margarine in the rinsed-out pan. Stir in the flour and cook gently, stirring occasionally, for 1 minute. Do not allow the flour to brown.
Remove the pan from the heat and gradually pour in the milk, stirring or whisking constantly. Return the pan to the heat and bring to the boil, still stirring or whisking.
Reduce the heat and simmer the sauce gently for 2 minutes, stirring occasionally, until it is smooth and thick.