-   Linux - Server (
-   -   Postfix secondary relay (

luthan 01-30-2013 06:25 PM

Postfix secondary relay
Hey guys, first post. Need some help please!

Here goes:

Our postfix test server would act as a gateway to Exchange.
It checks for email address in AD, and relays emails to Exchange if the email is valid.

What i need it to do is this:
Upon finding an invalid email, instead of right away rejecting the message check another file that would contain a list of domains with designated mail server for each domain. If the domain exists, send that email to the server specified, if the domain doesn't exist, reject the message.

Is this possible?

this is my right now

mydestination =
local_recipient_maps =
local_transport = error:local mail delivery is disabled
myorigin =
relay_domains = hash:/etc/postfix/ldapdomains
smtpd_recipient_restrictions = reject_unauth_destination
relay_recipient_maps = ldap:/etc/postfix/
show_user_unknown_table_name = no
transport_maps = hash:/etc/postfix/transport

luthan 01-31-2013 01:03 PM

in case my question wasn't clear, i found something in zimbra documentation that basically does what i need postfix to do.


If delivering to a single secondary mail system, configure a catchall on the domain to deliver mail to a secondary mail transport if users for the same domain reside on the second system.
zmpov cd
zmprov md zimbraMailCatchAllAddress zimbraMailCatchAllForwardingAddress zimbraMailTransport
Mail for Zimbra recipients on the primary system to will be delivered Zimbra mailboxes. Any address that does not exist on the Zimbra system will be routed to the secondary mail transport. This configuration will likely work with 4.5.x, but it has not been tested.

All times are GMT -5. The time now is 09:00 PM.