[exim] DNS problems with sending via multiple smarthosts

Page principale
Supprimer ce message
Répondre à ce message
Auteur: David Purton
Date:  
À: exim-users
Sujet: [exim] DNS problems with sending via multiple smarthosts
I'm having all sorts of problems getting Exim to deliver via the right
smart host (based on domain of from email). This is running on a laptop
so I'm often moving between networks. *Mostly* it works. But on some
networks, one or other of the smarthost routers fails for varying
reasons.

I'm not sure what the best place to find help is, so feel free to point
me elsewhere. And I won't try and solve all problems all at once.

The general idea of the set up is that some from addresses need to be
delivered via Google's servers and others need to be delivered via
Microsoft's Office365 servers. Both need authentication obviously.


I'll start with a DNS issue:

At the moment I'm on a network and just tried to send an email using an
address which ought to be routed through smtp.gmail.com. It's one of
those public wifi networks where you need to sign in using a web browser
first.

I sent the email after connecting to the network, but before signing in.
So obviously the email doesn't send.

The logs show (some personal info changed):

    2019-07-16 14:20:26 1hnFQ2-000379-9I <= myname@??? U=dcpurton P=local S=2387 id=20190716045026.GC2583@???
    2019-07-16 14:20:26 1hnFQ2-000379-9I no IP address found for host smtp.gmail.com
    2019-07-16 14:20:26 1hnFQ2-000379-9I == example@??? R=smarthost defer (-1): lookup failed for all hosts in smarthost router: host_find_failed=ignore host_all_ignored=defer


So far so good.

I then sign into the network and try and run exim -qf to clear the
queue.

But the logs then show:

    2019-07-16 14:23:14 Start queue run: pid=12322 -qf
    2019-07-16 14:23:14 1hnFQ2-000379-9I no IP address found for host smtp.gmail.com
    2019-07-16 14:23:14 1hnFQ2-000379-9I == example@??? R=smarthost defer (-1): lookup failed for all hosts in smarthost router: host_find_failed=ignore host_all_ignored=defer
    2019-07-16 14:23:14 End queue run: pid=12322 -qf


But I can look up the domain normally on my machine:

    $ nslookup smtp.gmail.com
    Server:        8.8.8.8
    Address:    8.8.8.8#53


    Non-authoritative answer:
    smtp.gmail.com    canonical name = gmail-smtp-msa.l.google.com.
    Name:    gmail-smtp-msa.l.google.com
    Address: 74.125.24.109
    Name:    gmail-smtp-msa.l.google.com
    Address: 2404:6800:4003:c02::6d


And I can even telnet to port 587 (which the smarthost router is using):

    $ telnet smtp.gmail.com 587
    Trying 74.125.200.109...
    Connected to gmail-smtp-msa.l.google.com.
    Escape character is '^]'.
    220 smtp.gmail.com ESMTP q69sm29136621pjb.0 - gsmtp



So, what is wrong? How can I diagnose things and fix it?


Here's my Exim version info (I'm running Debian testing with their split
configuration method):

    $ exim --version
    Exim version 4.92 #5 built 08-Jun-2019 15:37:43
    Copyright (c) University of Cambridge, 1995 - 2018
    (c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2018
    Berkeley DB: Berkeley DB 5.3.28: (September  9, 2013)
    Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DANE DKIM DNSSEC Event OCSP PRDR SOCKS TCP_Fast_Open
    Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb dsearch nis nis0 passwd
    Authenticators: cram_md5 plaintext
    Routers: accept dnslookup ipliteral manualroute queryprogram redirect
    Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
    Fixed never_users: 0
    Configure owner: 0:0
    Size of off_t: 8
    Configuration file search path is /etc/exim4/exim4.conf:/var/lib/exim4/config.autogenerated
    Configuration file is /var/lib/exim4/config.autogenerated




Thanks,

David

--
David Purton
e: dcpurton@???