Relay certain domain email through external emal

Hello,

Yes, you should extend

Code:
domains =

conditions with your list of target domains
 
Hello,

Yes, you should extend

Code:
domains =

conditions with your list of target domains

Below is my smart_route code. How do I put in yahoo.com, live.com and gmail.com?

Code:
 smart_route:
   driver = manualroute
   domains = ! +local_domains
   ignore_target_hosts = 127.0.0.0/8
   condition = "${perl{check_limits}}"
   route_list = !+local_domains ip.address.xyz
   transport = remote_smtp
 
[h=3]Section 8. Domain lists[/h]http://www.exim.org/exim-html-current/doc/html/spec_html/ch-domain_host_address_and_local_part_lists.html
 
Something like this should work. Create this as your first router (i.e. right after "begin routers"):
Code:
static_route:
  driver = manualroute
  transport = remote_smtp
  domains = lsearch;/etc/virtual/staticroutes
  route_data = $domain_data
then your /etc/virtual/staticroutes can be updated to look something like this:
Code:
yahoo.com : 1.2.3.4
hotmail.com : 1.2.3.4
where the 1.2.3.4 is the IP of the external email server you want to use to relay your email. Then you would need to remove or comment out your smart_route, so that it doesn't attempt to use that to send emails that don't match the static_route condition.
 
Hi,

Below code need to commend or uncomment?
Code:
#lookuphost:
#  driver = dnslookup
#  domains = ! +local_domains
#  ignore_target_hosts = 127.0.0.0/8
#  condition = "${perl{check_limits}}"
#  transport = remote_smtp
#  no_more

Something like this should work. Create this as your first router (i.e. right after "begin routers"):
Code:
static_route:
  driver = manualroute
  transport = remote_smtp
  domains = lsearch;/etc/virtual/staticroutes
  route_data = $domain_data
then your /etc/virtual/staticroutes can be updated to look something like this:
Code:
yahoo.com : 1.2.3.4
hotmail.com : 1.2.3.4
where the 1.2.3.4 is the IP of the external email server you want to use to relay your email. Then you would need to remove or comment out your smart_route, so that it doesn't attempt to use that to send emails that don't match the static_route condition.
 
In my setup, I have my static_route defined in /etc/exim.easy_spam_fighter/mailman_router.conf and the top of my routers section looks like this:
Code:
begin routers
  .include_if_exists /etc/exim.easy_spam_fighter/mailman_router.conf

#EDIT#48:

lookuphost:
  driver = dnslookup
  domains = ! +local_domains
  ignore_target_hosts = 127.0.0.0/8
  condition = "${perl{check_limits}}"
  transport = remote_smtp
  no_more

# RELATED: http://help.directadmin.com/item.php?id=153
# smart_route:
#   driver = manualroute
#   domains = ! +local_domains
#   ignore_target_hosts = 127.0.0.0/8
#   condition = "${perl{check_limits}}"
#   route_list = !+local_domains HOSTNAME-or-IP#
#   transport = remote_smtp

Since I use mailman (due to DMARC isssues with majordomo) and needed a router defined for that, it was easier to make my modifications to that file for both routers and just add the include line it any time my exim.conf is updated.
 
In my setup, I have my static_route defined in /etc/exim.easy_spam_fighter/mailman_router.conf and the top of my routers section looks like this:
Code:
begin routers
  .include_if_exists /etc/exim.easy_spam_fighter/mailman_router.conf

#EDIT#48:

lookuphost:
  driver = dnslookup
  domains = ! +local_domains
  ignore_target_hosts = 127.0.0.0/8
  condition = "${perl{check_limits}}"
  transport = remote_smtp
  no_more

# RELATED: http://help.directadmin.com/item.php?id=153
# smart_route:
#   driver = manualroute
#   domains = ! +local_domains
#   ignore_target_hosts = 127.0.0.0/8
#   condition = "${perl{check_limits}}"
#   route_list = !+local_domains HOSTNAME-or-IP#
#   transport = remote_smtp

Since I use mailman (due to DMARC isssues with majordomo) and needed a router defined for that, it was easier to make my modifications to that file for both routers and just add the include line it any time my exim.conf is updated.

Thanks @toml. It work perfectly!
 
set multiple relay IP

can i set multiple replay IP?? if my replay IP block by yahoo then switch to another IP send out email.
 
Back
Top