[Pkg-exim4-users] selecting smarthost based on sender address

Hans Ekbrand hans.ekbrand at gmail.com
Fri May 29 12:02:17 UTC 2015

I want to use different smart hosts depending on the sender address.

There is a old document that describes a solution, but it appears to
be for exim3, or at least not for exim4 with split-config which I use


However, I used the concept outlined there and tried to apply it to
exim4 with split config.

1. Create a file /etc/exim/my.smarthosts with the following content.

my.mail at bar.com:	smarthost="smtp.bar.com"	auth_name="my.username"	auth_pass="some password"
my.other.mail at foo.com:	smarthost="smtpgw.foo.com"	auth_name="my.username"	auth_pass="another password"

2. Changed the smarthost field in /etc/exim4/update-exim4.conf.conf 


3. reload exim with new configuration

sudo update-exim4.conf
sudo service exim4 reload

When I tried to send a mail, I got:

2015-05-29 12:47:52 [22620] 1YyHpQ-0005sq-AT <= hans.ekbrand at gu.se U=hans P=local S=923 M8S=0 id=20150529104752.GB3617 at hans from <hans.ekbrand at gu.se> for hans.ekbrand at gmail.com
2015-05-29 12:47:52 [22622] 1YyHpQ-0005sq-AT error in smarthost router: no host(s) specified for domain *
2015-05-29 12:47:52 [22622] 1YyHpQ-0005sq-AT == hans.ekbrand at gmail.com R=smarthost defer (-1): error in smarthost router: no host(s) specified for domain *

Which brings me to my question to the list:

What is needed to make exim use different smart hosts for different
sender addresses?

Note that I use Debian version 8.0
Linux hans 3.16.0-4-686-pae #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) i686 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-exim4-users/attachments/20150529/cc133593/attachment.sig>

More information about the Pkg-exim4-users mailing list