How can I automatically forward outgoing emails to a different domain?

As an example, a user sends an email to 1234564@fax.mydomain.com and I want the exact email forwarded outside mydomain.com to 1234564@example.com.

Note There are no accounts on the local Zimbra server under the fax.mydomain.com subdomain and the prefix 123456 will not be constant, e.g. it will change depending on fax recipient's number.

I know that the easy thing would be to have users send the emails directly to the @example.com domain, but I'd rather have them use the local fax.mydomain.com domain and have the email forwarded/ redirected.

I don't know whether to use postfix transports, procmail or something within zimbra.

I think that postfix transports requires that I specify a different SMTP server, e.g. otherdomain.com :[smtp.otherdomain.com]

With procmail I think I would need to use a pipe, but I've never used procmail.

I've tried to find a feature within Zimbra and I tried to zmprov md fax.mydomain.com zimbraMailCatchAllForwardingAddress @example.com but the emails bounced.

How do I best achieve this?

1 Answer 1


Only forwarding is probably not enough, you also have to masquerade the domain name, otherwise the example.com mail server probably rejects the mail and this is what you see as bounces.

For us it works like this:

zmprov md fax.mydomain.org zimbraMailCatchAllAddress @example.com
zmprov md fax.mydomain.org zimbraMailCatchAllForwardingAddres @example.com
zmprov md fax.mydomain.org zimbraMailCatchAllForwardingAddress @example.com
zmprov md fax.mydomain.org zimbraMailTransport smtp:mail.example.com
zmprov md fax.mydomain.org zimbraMailCatchAllAddress @fax.mydomain.org zimbraMailCatchAllCanonicalAddress @example.com

Mails arriving at example will still have the To:- field as xx@fax.mydomain.org but the envelope is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.