Gregory wrote: >I send email from several email addresses. I pay for an email service for >both sending and receiving email, but I pull it down locally (via POP with >fetchmail) and send messages from my Debian server with mutt. All of those >email addresses wind up forwarding to the address with the paid service, >but I neither send nor receive messages directly with that email address. >One of the addresses I send from is hosted by Google, and therefore when I >send from that address through my paid service (which is how exim4 is >configured, using it as a smarthost) recipients usually see a warning about >the message being unverified or suspicious. This is presumably because of >DKIM or something. > >What I'd like to do is configure exim4 as it is for most outgoing mail, but >to use GMail as the smarthost when the sender is that one particular email >address. Can someone guide me or give me a hint, please?
I have exactly this setup, with a couple of different outgoing smarthosts that need authentication: I've added a couple of extra stanzas like this in the routers section *before* the default router (DNS-based in my case, or via default smarthost maybe for you). Exim will try each of these, looking at the condition check and falling through if it's not met: smarthost_example_exploder: debug_print = "R: smarthost_example_exploder for $local_part@$domain, from $sender_address" driver = manualroute domains = ! +local_domains transport = remote_smtp_smarthost_exploder route_list = * smtp.gmail.com::587 byname host_find_failed = defer headers_add = X-wibble: sender_address $sender_address condition = ${if exists{CONFDIR/smtp_auth/$sender_address}{${if eq{$sender_address_domain}{example.org}}}} same_domain_copy_routing = yes I then add the desired authentication details in /etc/exim4/smtp_auth/$sender_address for each of the sender addresses. HTH! Be aware that doing authenticated smtp to Google and O365 (etc.) is getting harder and harder as they continue to try to destroy mail as an open service. :-( -- Steve McIntyre, Cambridge, UK. st...@einval.com "We're the technical experts. We were hired so that management could ignore our recommendations and tell us how to do our jobs." -- Mike Andrews