Skip to content

Instantly share code, notes, and snippets.

@x-yuri
Last active October 17, 2022 19:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-yuri/12d1022f89051bb3b9603d7978798538 to your computer and use it in GitHub Desktop.
Save x-yuri/12d1022f89051bb3b9603d7978798538 to your computer and use it in GitHub Desktop.
exim: verify HELO hostname

To verify you can send a test email to port25's authentication checker:

echo test email | exim check-auth@verifier.port25.com  # replies back
echo test email | exim check-auth2@verifier.port25.com  # replies back
echo test email | exim check-auth-jsmith=yourdomain.com@verifier.port25.com  \
    # replies to jsmith@yourdomain.com

In the recieved report there'll be a line:

HELO hostname:  somedomain.com

Or simply add -v option:

$ echo test email | exim -v root@dst.com
LOG: MAIN
  <= root@src.com U=root P=local S=290
delivering 1hM501-0007Nn-7A
R: dnslookup for root@dst.com
T: remote_smtp for root@dst.com
Connecting to mail.dst.com [ip.add.re.ss]:25 ... connected
  SMTP<< 220 dst.com ESMTP Postfix (Debian/GNU)
  SMTP>> EHLO src.com
  SMTP<< 250-dst.com
         250-PIPELINING
         250-SIZE 10240000
         250-VRFY
         250-ETRN
         250-STARTTLS
         250-ENHANCEDSTATUSCODES
         250-8BITMIME
         250 DSN
  SMTP>> STARTTLS
  SMTP<< 220 2.0.0 Ready to start TLS
  SMTP>> EHLO src.com
  SMTP<< 250-dst.com
         250-PIPELINING
         250-SIZE 10240000
         250-VRFY
         250-ETRN
         250-ENHANCEDSTATUSCODES
         250-8BITMIME
         250 DSN
  SMTP>> MAIL FROM:<root@src.com> SIZE=1322
  SMTP>> RCPT TO:<root@dst.com>
  SMTP>> DATA
  SMTP<< 250 2.1.0 Ok
  SMTP<< 250 2.1.5 Ok
  SMTP<< 354 End data with <CR><LF>.<CR><LF>
  SMTP>> writing message and terminating "."
  SMTP<< 250 2.0.0 Ok: queued as 0019EEC0B6D
  SMTP>> QUIT
LOG: MAIN
  => root@dst.com R=dnslookup T=remote_smtp H=mail.dst.com [ip.add.re.ss] X=TLS1.0:RSA_AES_256_CBC_SHA1:32 DN="CN=dst.com"
LOG: MAIN
  Completed

Alternatively, you can check the receiving MTA's log:

exim:

Received: from [ip.add.re.ss] (helo=HELO_HOSTNAME)
    ...

postfix:

Received: from HELO_HOSTNAME (myhostname [ip.add.re.ss])
    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment