1

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 ?

3
  • 2
    To vote-to-closers: Why would this be offtopic? Postfix is in the main Ubuntu repositories and is the default MTA.
    – gertvdijk
    Jul 19, 2013 at 23:45
  • Should I ask this on Server Fault ?
    – Ba7a7chy
    Jul 19, 2013 at 23:50
  • 2
    You could ask on Server Fault. Question is on topic there and may get an answer quicker than here. But as pointed out by @gertvdijk its on topic here too. Jul 20, 2013 at 8:01

1 Answer 1

1

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
2
  • 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 ?
    – Ba7a7chy
    Jul 20, 2013 at 8:45
  • You may rewrite remote email addresses into local email addresses.
    – AnFi
    Jul 20, 2013 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .