I think we have not any solution yet, that exactly solves the initial problem. Therefore, I would like to provide a more explicit approach. Lets suppose, that our whitelist looks like this:
Then I would try the following reciept:
This would send all emails that are not from firstname.lastname@example.org and not from email@example.com to
/dev/null. The remaining emails are send to the default destination. Be aware to use
\. in your pattern if you like to match a single dot. The pattern
. matches a single character.
If you have a short whitelist, you could try to get an even shorter reciept by combining the patterns:
Be aware to use
( ) here. Using
[ ] would be a mistake.