mludvig / smtp-cli

The ultimate command line SMTP client
http://smtp-cli.logix.cz
188 stars 32 forks source link

SMTP Server Error response: [503 bad sequence of commands] when following example. #24

Closed kitatek closed 2 years ago

kitatek commented 2 years ago

Hello,

Seems this doesn't work out of the box with this provider, even with tested correct user and password.

Tested both on CentOS 6.10 and Ubuntu 20.04 with dependencies installed (including the missing dns dependency of Ubuntu).

Any idea what would be wrong in the command ? How to debug the exchanges between client and server ?

$ smtp-cli --verbose --host smtp.mxhichina.com --enable-auth --user 'user@example.com' --password 'whatever' --from 'user@example.com' --to 'receiver@example.com' --subject 'test use smtp-cli' --body-plain=/etc/lsb-release
Connection from 10.1.2.3:48402 to 59.82.44.168:25
[220] 'smtp.aliyun-inc.com MX AliMail Server'
> HELO localhost
[250] 'Ok'
> MAIL FROM:<user@example.com>
[503] 'bad sequence of commands'
MAIL FROM <user@example.com> failed: '503 bad sequence of commands'
> QUIT
[221] 'Bye'

Thanks.

mludvig commented 2 years ago

That’s interesting. Can you try with --force-ehlo?

kitatek commented 2 years ago

Works now ! Thank you.

mludvig commented 2 years ago

Good to hear that :)