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:
white.domain.tld
light.domain.tld
Then I would try the following reciept:
:0
* !^From.*@white\.domain\.tld
* !^From.*@light\.domain\.tld
/dev/null
This would send all emails that are not from somebody@white.domain.tld and not from somebody@light.domain.tld 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:
:0
* !^From.*@(white|light)\.domain\.tld
/dev/null
Be aware to use ( )
here. Using [ ]
would be a mistake.
I've done this for sending reminders to my phone - I'll post the recipe when I can ssh to my server :) – warren – 2009-09-14T12:33:05.397
added the whitelist recipe as promised :) – warren – 2009-09-16T12:59:36.397
Nice stuff. I'll have to try this out as well. – pave – 2009-09-16T13:07:11.707