Skip to content

Instantly share code, notes, and snippets.

@ralphtheninja
Last active November 24, 2018 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ralphtheninja/8900a7d903a20084e4c31e92ea243cf6 to your computer and use it in GitHub Desktop.
Save ralphtheninja/8900a7d903a20084e4c31e92ea243cf6 to your computer and use it in GitHub Desktop.

src/dc_smtp.c:180

mailsmtp_auth() returns MAILSMTP_ERROR_AUTH_LOGIN


libs/libetpan/src/low-level/smtp/mailsmtp.c:1060

returns result from mailsmtp_auth_type()


libs/libetpan/src/low-level/smtp/mailsmtp.c:1032

returns result from mailsmtp_auth_sasl()


libs/libetpan/src/low-level/smtp/mailsmtp.c:1379

this is where MAILSMTP_ERROR_AUTH_LOGIN is returned from, which is due to sasl_client_start() failing, which returns status -4, which according to libs/cyrussasl/include/sasl/sasl.h corresponds to SASL_NOMECH (mechanism not supported)


When connecting from "normal" environment into greenmail I see the following smtp traffic:

220 /172.17.0.2 GreenMail SMTP Service v1.5.8 ready
EHLO x240
250-/172.17.0.2
250 AUTH PLAIN
AUTH PLAIN ZGVsdGExAGRlbHRhMQBkZWx0YTE=
235 2.7.0  Authentication Succeeded
QUIT
221 /172.17.0.2 Service closing transmission channel

When connecting from the inside of a docker container I see the following smtp traffic:

220 /172.17.0.2 GreenMail SMTP Service v1.5.8 ready
EHLO 017e4c835007
250-/172.17.0.2
250 AUTH PLAIN
QUIT
221 /172.17.0.2 Service closing transmission channel
@ralphtheninja
Copy link
Author

In the docker case, we can see that the client doesn't send AUTH PLAIN ZGVsdGExAGRlbHRhMQBkZWx0YTE= back. So it's possible that something goes wrong before this, so we don't reach that point in the code. Will throw in some printf and see if we can get more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment