0

I'm currently using a virtual_maps config with regex to forward all emails sent to my postfix server to one email address

/.+@.+/ [email protected]

I'd like to make an exception to the forwarding rule for one domain. That domain should be forwarded on to AWS SES untouched. i.e. [email protected] should be relayed on to [email protected], but [email protected] should be sent to [email protected], as it does with my current configuration.

I have the relaying working fine, so the only problem is getting postfix to relay the one domain untouched.

1 Answer 1

0

You can try this PCRE table:

/^([^@]+@example\.com)$/ $1
/.+@.+/ [email protected]

In this scenario, if Postfix queries [email protected], the first entry matches and [email protected] (the captured string) is returned. Or else, the second entry matches and [email protected] is always returned.

You must log in to answer this question.

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