How do I use postfix to filter certain emails (by domain or sender) and for those who fall under the rule (filter) save locally and those who doesn't to relay regularly ?
1 Answer
The following recipe tells how to use regex to rewrite envelope recipients' addresses using regexp: https://superuser.com/questions/353488/regex-multiple-catch-all-setup-in-postfix
You may use the above method to rewrite remote email addresses into local email addresses.
Regexp table man page shows how to copy parts of lookup key to lookup result:
/^(.*)-outgoing@(.*)$/ 550 Use ${1}@${2} instead
-
Indeed, thou this is not what I asked, how do I tell postfix to save the mail file locally if it falls under the regex ?– Ba7a7chyJul 20, 2013 at 8:45
-
main
Ubuntu repositories and is the default MTA.