Hi,
I'm using MailGun as a SmartHost with the following:
#Section: AUTH
#Section: ROUTERSTART
#Section: TRANSPORTSTART
#My /etc/exim_smarhosts
So the above is only for 2-3 domains that are in my /etc/exim_smarhosts how do I route all other domains on the server to another MailGun credential without manually adding the domains to /etc/exim_smarhosts , for example:
I'm using MailGun as a SmartHost with the following:
#Section: AUTH
Code:
mailgun_login:
driver = plaintext
public_name = LOGIN
hide client_send = : ${extract{user}{${lookup{$sender_address_domain}lsearch{/etc/exim_smarthosts}}}}: ${extract{pass}{${lookup{$sender_address_domain}lsearch{/etc/exim_smarthosts}}}}
Code:
mailgun:
driver = manualroute
domains = ! +local_domains
transport = mailgun_transport
route_list = "* smtp.mailgun.org::587 byname"
host_find_failed = defer
no_more
Code:
mailgun_transport:
driver = smtp
hosts = smtp.mailgun.org
hosts_require_auth = smtp.mailgun.org
hosts_require_tls = smtp.mailgun.org
Code:
domain1.com: domain=domain1.com user=MAILGUN_smtp_user1 pass=MAILGUN_api_password1
domain2.com: domain=domain2.com user=MAILGUN_smtp_user2 pass=MAILGUN_api_password2
Code:
mailgun_login:
driver = plaintext
public_name = LOGIN
hide client_send = : Default-SMTP-Login:Default-Password
Last edited by a moderator: