On 5/20/22 00:01, R-VISOR-TOVIS via Exim-users wrote:
> Hi!
>
> I'm running exim 4.92-8+deb10u6 on Debian version 10.11
> Default configuration "smart_host"
>
> Unfortunately, with more and more restrictions in mailing systems I need to 
> address every emails to appropriate smtp server, not one "smart host".


If you're using Debian's exim configuration facility, then first you need to 
switch to custom configuration. As root:

# cp /var/lib/exim4/config.autogenerated /etc/exim4/exim4.conf

Now find the following section:

.ifdef DCconfig_smarthost DCconfig_satellite

smarthost:
  debug_print = "R: smarthost for $local_part@$domain"
  driver = manualroute
  domains = ! +local_domains
  transport = remote_smtp_smarthost
  route_list = * DCsmarthost byname
  host_find_failed = ignore
  same_domain_copy_routing = yes
  no_more

.endif

Change the route_list:

route_list = gmail.com gmail.your.smarthost ; \
    outlook.com ms-1.your.smarthost:ms-2.your.smarthost ; \
    example.com another.smarthost ; \
    * your.default.smarthost

In this example you have two possible smarthosts for outlook.com, separated by 
a colon

If you need to specify a port, it would look like this:

route_list = gmail.com gmail.your.smarthost::587 ; \
    outlook.com "ms-1.your.smarthost::587 : ms-2.your.smarthost::587" ; \
    example.com another.smarthost::587 ; \
    * your.default.smarthost::587

Then make sure to add credentials to /etc/exim4/passwd.client :

a.smart.host:username:password

See 
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_manualroute_router.html#SECID120



-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to