[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[msmtp-users] Bug: external auth via certificate only doesn't work
Hi,
while trying to set up certificate only authentication msmtp always
died with the following error message:
msmtp: the server does not support authentication
This is because my server (postfix) doesn't announce authentication
methods after completing the STARTTLS handshake.
If I read the docs correctly external auth is not meant to be used
together with another, interal auth method.
The following patch removes the auth check if external auth is used:
diff --git a/src/msmtp.c b/src/msmtp.c
index fe57010..f369b5e 100644
--- a/src/msmtp.c
+++ b/src/msmtp.c
@@ -663,7 +663,7 @@ int msmtp_rmqs(account_t *acc, int debug, const char *rmqs_argument,
}
/* authenticate */
- if (acc->auth_mech)
+ if (acc->auth_mech && strcmp(acc->auth_mech, "EXTERNAL") != 0)
{
if (!(srv.cap.flags & SMTP_CAP_AUTH))
{
@@ -1731,7 +1731,7 @@ int msmtp_sendmail(account_t *acc, list_t *recipients,
return e;
}
/* authenticate */
- if (acc->auth_mech)
+ if (acc->auth_mech && strcmp(acc->auth_mech, "EXTERNAL") != 0)
{
if (!(srv.cap.flags & SMTP_CAP_AUTH))
{
Note:
The check in line 1735 was the one making the trouble.
I patched the on in line 667 only because the if-block looks the same.
Thanks for msmtp and regards,
Thomas
--
Thomas Weißschuh
xmpp:thomas@...320...
mailto:thomas@...320...