I'm looking for solution for the case described below.
I've to send mail to some domains (hotmail, outlook) via smarthost, because of blocking my server's IP (Hetzner) on side of Microsoft.
Key point here is that I need to relay not specified sender to smarthost(it's desirable though), but one and only one recipient domain (hotmail.com) should relayed via external smarthost
Excerpt from example of exim config
send_via_gmail:
driver = manualroute
domains = ! +local_domains
senders = [email protected]
transport = gmail_smtp
route_list = "* smtp.gmail.com"
Solution is quite simple at a glance.
Just adding domain needed in domains
config list.
That's enough or not? May be there is better way to go.
P.S. Hmm.. or domains = ! +local_domains
refers to sender's domain not recipient's?
The
domains
contains the target domains to which the router should send messages, so replacing it with a domainlist consisting "outlook.com" and "hotmail.com" will make Exim route those messages via the smarthost.As a side note, your config contains a
senders
parameter as well, so the router will decline if the sender is not[email protected]
, regardless of the target domain.