LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix secondary relay (http://www.linuxquestions.org/questions/linux-server-73/postfix-secondary-relay-4175447908/)

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 main.cf right now

mydestination =
local_recipient_maps =
local_transport = error:local mail delivery is disabled
myorigin = example.com
relay_domains = hash:/etc/postfix/ldapdomains
smtpd_recipient_restrictions = reject_unauth_destination
relay_recipient_maps = ldap:/etc/postfix/ldapusers.cf
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.

Quote:

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 example.com
zmprov md example.com zimbraMailCatchAllAddress @example.com zimbraMailCatchAllForwardingAddress @example.com zimbraMailTransport smtp:mail.example.com:25
Mail for Zimbra recipients on the primary system to @example.com 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.
from: http://wiki.zimbra.com/wiki/Split_Domain


All times are GMT -5. The time now is 04:39 PM.