Skip to content

Only being able to use mailgun.org without --force-ehlo #26

@aseques

Description

@aseques

Hi, I am trying to use mailgun.com (they user mailgun.org for some email), and it seems that smpt-cli detects the server as SMTP only, because it's using always HELO instead of EHLO altough the server seems to be compliant

Trying to detect capabilities with telnet

$ telnet smtp.eu.mailgun.org 587
Trying 34.95.107.114...
Connected to smtp.eu.mailgun.org.
Escape character is '^]'.
220 Mailgun Influx ready
EHLO
250-4e119dd77b0c
250-AUTH PLAIN LOGIN
250-SIZE 52428800
250-8BITMIME
250-SMTPUTF8
250-PIPELINING
250 STARTTLS
./smtp-cli --server=smtp.eu.mailgun.org:587      --user=xx@example.com --pass=xxxx   --verbose  --from xx@example.com --to zzz@example.net  --subject "Simple test with attachments"              --body-plain "Log files are attached."              --attach /tmp/file.txt
[220] 'Mailgun Influx ready'
> HELO localhost
[250] '596f9cb77e29'
> MAIL FROM:<test@example.net>
[250] 'Sender address accepted'
> RCPT TO:<test@example.com>
[550] '5.7.1 Relaying denied'
RCPT TO <test@example.com> failed: '550 5.7.1 Relaying denied'
> QUIT
[221] 'See you later. Yours truly, Mailgun'

When using perl-cli with the --force-ehlo command, the emails get send without issues,

[220] 'Mailgun Influx ready'
> EHLO localhost
[250] 'bb128a7fa2d3'
[250] 'AUTH PLAIN LOGIN'
[250] 'SIZE 52428800'
[250] '8BITMIME'
[250] 'SMTPUTF8'
[250] 'PIPELINING'
[250] 'STARTTLS'
Starting TLS...
> STARTTLS
[220] 'Go ahead'
Using cipher: TLS_AES_128_GCM_SHA256
Subject Name: /C=US/ST=Texas/L=San Antonio/O=MAILGUN TECHNOLOGIES, INC/CN=*.eu.mailgun.org
Issuer  Name: /C=US/O=DigiCert Inc/CN=DigiCert TLS RSA SHA256 2020 CA1
> EHLO localhost
[250] 'bb128a7fa2d3'
[250] 'AUTH PLAIN LOGIN'
[250] 'SIZE 52428800'
[250] '8BITMIME'
[250] 'SMTPUTF8'
[250] 'PIPELINING'
AUTH method (PLAIN LOGIN): using LOGIN
> AUTH LOGIN
....

Related issue (with another domain here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions