mutt doesn't send messages
ivrntsv opened this issue · comments
Description / Steps to reproduce the issue
An attempt to send a message gives the error:
No authenticators available
Expected behavior
I expect a message to be sent.
Actual behavior
I tried and failed different methods. In commit 8c62cbe I saw code in PKGBUILD file that renamed dlls in /usr/lib/sasl2 directory by replacing msys2- prefix to lib and dll extension to so. I made this change for msys-plain-3.dll file (I suppose it's used for PLAIN authentication) so it became libplain-3.so, and it helped.
Verification
- I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MSYS_NT-10.0-19045
Are you willing to submit a PR?
No response
What are the error messages?
Maybe it's worth running mutt in a pipe and adding the debug switch into the cmd line, eg:
https://askubuntu.com/questions/135120/problem-sending-an-email-via-mutt/360090#360090
https://debianforum.de/forum/viewtopic.php?t=154616#:~:text=Test%20Nachricht%20mit%20Anhang
$ cat ~/.mutt/muttrc
set realname = Me
set from = me@yandex.ru
set folder = imaps://me:pass@imap.yandex.ru:993
set smtp_url = smtps://me:pass@smtp.yandex.ru:465
set spoolfile = +Inbox
$ mutt -d 5 -s Foo me@yandex.ru 0<<<Bar
Debugging at level 5.
No authenticators available
Could not send the message.
$ cat ~/.muttdebug0
[2024-04-08 10:38:39] Mutt/2.2.13 (2024-03-09) debugging at level 5
[2024-04-08 10:38:39] Reading configuration file '/etc/Muttrc'.
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4bb8, *ldata = 0x0
[2024-04-08 10:38:39] parse_attach_list: added */.* [9]
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0x0
[2024-04-08 10:38:39] parse_attach_list: added text/x-vcard [7]
[2024-04-08 10:38:39] parse_attach_list: added application/pgp.* [2]
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0xa00008fd0
[2024-04-08 10:38:39] parse_attach_list: skipping text/x-vcard
[2024-04-08 10:38:39] parse_attach_list: skipping application/pgp.*
[2024-04-08 10:38:39] parse_attach_list: added application/x-pkcs7-.* [2]
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4ba8, *ldata = 0x0
[2024-04-08 10:38:39] parse_attach_list: added text/plain [7]
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0xa00008fd0
[2024-04-08 10:38:39] parse_attach_list: skipping text/x-vcard
[2024-04-08 10:38:39] parse_attach_list: skipping application/pgp.*
[2024-04-08 10:38:39] parse_attach_list: skipping application/x-pkcs7-.*
[2024-04-08 10:38:39] parse_attach_list: added message/external-body [4]
[2024-04-08 10:38:39] parse_attach_list: ldata = 0x1004f4ba0, *ldata = 0x0
[2024-04-08 10:38:39] parse_attach_list: added message/external-body [4]
[2024-04-08 10:38:39] Reading configuration file '/home/me/.mutt/muttrc'.
[2024-04-08 10:38:39] Using default IMAP port 143
[2024-04-08 10:38:39] Using default IMAPS port 993
[2024-04-08 10:38:39] Setting $hostname
[2024-04-08 10:38:39] $hostname set to ...
[2024-04-08 10:38:39] send.c:1934: mutt_mktemp returns ...
[2024-04-08 10:38:39] send.c:1185: mutt_mktemp returns ...
[2024-04-08 10:38:39] mwoh: buf[Subject: Foo] is short enough
[2024-04-08 10:38:40] Connected to smtp.yandex.ru:465 on fd=4
[2024-04-08 10:38:40] 4< 220 mail-nwsmtp-smtp-production-main-18.iva.yp-c.yandex.net ...
[2024-04-08 10:38:40] 4> EHLO ...
[2024-04-08 10:38:40] 4< 250-mail-nwsmtp-smtp-production-main-18.iva.yp-c.yandex.net
[2024-04-08 10:38:40] 4< 250-8BITMIME
[2024-04-08 10:38:40] 4< 250-PIPELINING
[2024-04-08 10:38:40] 4< 250-SIZE 53477376
[2024-04-08 10:38:40] 4< 250-STARTTLS
[2024-04-08 10:38:40] 4< 250-AUTH LOGIN PLAIN XOAUTH2
[2024-04-08 10:38:40] 4< 250-DSN
[2024-04-08 10:38:40] 4< 250 ENHANCEDSTATUSCODES
[2024-04-08 10:38:40] SASL local ip: ..., remote ip:77.88.21.158;465
[2024-04-08 10:38:40] External SSF: 256
[2024-04-08 10:38:40] External authentication name: me
[2024-04-08 10:38:40] SASL: No worthy mechs found
[2024-04-08 10:38:40] smtp_auth_sasl: LOGIN PLAIN XOAUTH2 unavailable
[2024-04-08 10:38:41] mutt_free_body: unlinking ...
[2024-04-08 10:38:41] mutt_buffer_pool_free: 10 of 10 returned to pool
$ cd /usr/lib/sasl2
$ ln -s msys-plain-3.dll plain-3.so
$ mutt -d 5 -s Foo me@yandex.ru 0<<<Bar
Debugging at level 5.
$ cat ~/.muttdebug0
[2024-04-08 10:51:19] Mutt/2.2.13 (2024-03-09) debugging at level 5
[2024-04-08 10:51:19] Reading configuration file '/etc/Muttrc'.
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4bb8, *ldata = 0x0
[2024-04-08 10:51:19] parse_attach_list: added */.* [9]
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0x0
[2024-04-08 10:51:19] parse_attach_list: added text/x-vcard [7]
[2024-04-08 10:51:19] parse_attach_list: added application/pgp.* [2]
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0xa00008fd0
[2024-04-08 10:51:19] parse_attach_list: skipping text/x-vcard
[2024-04-08 10:51:19] parse_attach_list: skipping application/pgp.*
[2024-04-08 10:51:19] parse_attach_list: added application/x-pkcs7-.* [2]
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4ba8, *ldata = 0x0
[2024-04-08 10:51:19] parse_attach_list: added text/plain [7]
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4bb0, *ldata = 0xa00008fd0
[2024-04-08 10:51:19] parse_attach_list: skipping text/x-vcard
[2024-04-08 10:51:19] parse_attach_list: skipping application/pgp.*
[2024-04-08 10:51:19] parse_attach_list: skipping application/x-pkcs7-.*
[2024-04-08 10:51:19] parse_attach_list: added message/external-body [4]
[2024-04-08 10:51:19] parse_attach_list: ldata = 0x1004f4ba0, *ldata = 0x0
[2024-04-08 10:51:19] parse_attach_list: added message/external-body [4]
[2024-04-08 10:51:19] Reading configuration file '/home/me/.mutt/muttrc'.
[2024-04-08 10:51:19] Using default IMAP port 143
[2024-04-08 10:51:19] Using default IMAPS port 993
[2024-04-08 10:51:19] Setting $hostname
[2024-04-08 10:51:19] $hostname set to ...
[2024-04-08 10:51:19] send.c:1934: mutt_mktemp returns ...
[2024-04-08 10:51:19] send.c:1185: mutt_mktemp returns ...
[2024-04-08 10:51:19] mwoh: buf[Subject: Foo] is short enough
[2024-04-08 10:51:20] Connected to smtp.yandex.ru:465 on fd=4
[2024-04-08 10:51:20] 4< 220 mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net ...
[2024-04-08 10:51:20] 4> EHLO ...
[2024-04-08 10:51:20] 4< 250-mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net
[2024-04-08 10:51:20] 4< 250-8BITMIME
[2024-04-08 10:51:20] 4< 250-PIPELINING
[2024-04-08 10:51:20] 4< 250-SIZE 53477376
[2024-04-08 10:51:20] 4< 250-STARTTLS
[2024-04-08 10:51:20] 4< 250-AUTH LOGIN PLAIN XOAUTH2
[2024-04-08 10:51:20] 4< 250-DSN
[2024-04-08 10:51:20] 4< 250 ENHANCEDSTATUSCODES
[2024-04-08 10:51:20] SASL local ip: ..., remote ip:77.88.21.158;465
[2024-04-08 10:51:20] External SSF: 256
[2024-04-08 10:51:20] External authentication name: me
[2024-04-08 10:51:20] mutt_sasl_cb_authname: getting authname for smtp.yandex.ru:465
[2024-04-08 10:51:20] mutt_sasl_cb_authname: getting user for smtp.yandex.ru:465
[2024-04-08 10:51:20] mutt_sasl_cb_pass: getting password for me@smtp.yandex.ru:465
[2024-04-08 10:51:20] 4> AUTH PLAIN ...
[2024-04-08 10:51:20] 4< 235 2.7.0 Authentication successful. ...
[2024-04-08 10:51:20] SASL protection strength: 0
[2024-04-08 10:51:20] SASL protection buffer size: 65536
[2024-04-08 10:51:20] 4> MAIL FROM:<me@yandex.ru>
[2024-04-08 10:51:20] 4< 250 2.1.0 <me@yandex.ru> ok ...
[2024-04-08 10:51:20] 4> RCPT TO:<me@yandex.ru>
[2024-04-08 10:51:20] 4< 250 2.1.5 <me@yandex.ru> recipient ok ...
[2024-04-08 10:51:20] 4> DATA
[2024-04-08 10:51:20] 4< 354 Start mail input, end with <CRLF>.<CRLF>
[2024-04-08 10:51:20] 4> Date: Mon, 8 Apr 2024 10:51:19 ...
[2024-04-08 10:51:20] 4> From: Me <me@yandex.ru>
[2024-04-08 10:51:20] 4> To: me@yandex.ru
[2024-04-08 10:51:20] 4> Subject: Foo
[2024-04-08 10:51:20] 4> Message-ID: <...>
[2024-04-08 10:51:20] 4> MIME-Version: 1.0
[2024-04-08 10:51:20] 4> Content-Type: text/plain; charset=us-ascii
[2024-04-08 10:51:20] 4> Content-Disposition: inline
[2024-04-08 10:51:20] 4>
[2024-04-08 10:51:20] 4> Bar
[2024-04-08 10:51:20] 4> .
[2024-04-08 10:51:20] 4< 250 2.0.0 Ok: queued on mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net ...
[2024-04-08 10:51:20] 4> QUIT
[2024-04-08 10:51:20] sendlib.c:3149: mutt_mktemp returns ...
[2024-04-08 10:51:20] mwoh: buf[Subject: Foo] is short enough
[2024-04-08 10:51:20] mutt_free_body: unlinking ...
[2024-04-08 10:51:20] mutt_buffer_pool_free: 10 of 10 returned to pool
I redacted logs a little bit in hope to leak nothing personal.
Evidently, the SASL library (libsasl) can't load the authentication plugin because it expects different naming convention.
What helped me:
$ cd /usr/lib/sasl2
$ cp msys-plain-3.dll [lib]plain-3.so # [lib] means optional prefix lib
or
$ mv msys-plain-3.dll [lib]plain-3.so
or
$ ln -s msys-plain-3.dll [lib]plain-3.so # I use MSYS=winsymlinks:sys for MSYSTEM=MSYS
Patching sources also comes to mind, but I don't think I'm capable.
Thanks for the log. Somehow I missed "No authenticators available" in the 1st message. No further suggestions from me though.
Evidently, the SASL library (libsasl) can't load the authentication plugin because it expects different naming convention.
Thank you for the hint. I have added a pull request to fix the plugin loading mechanism in libsasl. Would you like to test the package from CI artifacts? Link https://github.com/msys2/MSYS2-packages/actions/runs/8605187974
I installed libsasl from CI artifacts, and it seems to work. Apparently, only file extension matters.