Postfix secondary relay
Hey guys, first post. Need some help please!
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
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