Re: GMail SMTP: no authenticators available?

2021-01-26 Thread Baron Fujimoto

On Fri, 22 Jan 2021, Robin Sommer wrote:




On Wed, Jan 20, 2021 at 16:22 -1000, Baron Fujimoto wrote:


Our org's email is hosted by Gmail (via GSuite). I had been using
neomutt (built from MacPorts) successfully for years.


Maybe I can point you in some useful direction: I had exactly this
problem with a self-built mutt recently after upgrading macOS and
rebuilding all the ports (and mutt). It took me a while to find what
was going on: MacPorts' libsasl2 seemed to have trouble with GMail. I
uninstalled that and had mutt link against /usr/lib/libsasl2.2.dylib,
and everything went back to working normally for me.

Now, here's the funny thing: as I'm writing this, I just double
checked my mutt binary. Turns out it's back to linking against
MacPorts (now /opt/local/lib/libsasl2.3.dylib). I've rebuilt mutt in
the meantime a couple of times, so things must have reverted. But it's
all still working fine, which probably means that it was libsasl2
version thing somehow that's been corrected by now.


Hmm, I'm certainly willing to test that out, but a couple of hurdles:

- I don't seem to have /usr/lib/libsasl2.2.dylib (I can't find any libsasl2* in 
/usr)
- Assuming I did have an alternate version of libsasl2 available, how would I 
link to that library specifically when building mutt?

I do have the following MacPorts installed versions available:

/opt/local/lib/libsasl2.3.dylib
/opt/local/lib/libsasl2.dylib

Also using MacOS 11.1, if that helps


Re: GMail SMTP: no authenticators available?

2021-01-26 Thread Baron Fujimoto

On Wed, 20 Jan 2021, Will Yardley wrote:


On Wed, Jan 20, 2021 at 04:22:04PM -1000, Baron Fujimoto wrote:


The following in my muttrc was used successfully util this problem began:

set smtp_url = smtp://u...@example.org@smtp.gmail.com


Do you have smtp_authenticators (unset by default) set?

set smtp_url = "smtps://lu...@example.com@smtp.gmail.com"
set smtp_authenticators = 'gssapi:login'

Are you using an "app password"? Typically, you'll need to (at least I
did)
https://support.google.com/mail/answer/185833?hl=en-GB

If not, you may want to switch to one. If so, you may want to make sure
it's still active, and check to see if your organization changed any
policies that might be causing the issue, whether that's disabling
certain protocols, or enforcing MFA.

FWIW, when I was using gsuite with Mutt (for work), I would typically
have to auth once for IMAP and once for SMTP.

Good idea trying alternate ports, but you may also want to doublecheck
that your provider is not blocking or hijacking SMTP (and see what you
get using telnet and / or openssl s_client to connect to smtp.gmail.com
directly). Kevin's suggestion should also help show any issues along
those lines.

w


Sorry, I should have added that I do not have smtp_authenticators set, so it 
should be trying all available as the default.

I also tried using an app password, which also works for IMAP, but not for SMTP, same as 
before. The "No available authenticators" error occurs before I am even 
prompted for a password when trying to send.

When I experiment with "openssl s_client", I can only connect to port 465, but 
I don't see any obvious problems there either. I'm not quite sure how to satisfiy GMail's 
AUTH requirements via interactive SMTP commands. (I tried AUTH LOGIN, with base64 encoded 
responses to Username: and Password: but get a Bad Credentials response using either my 
app password or original password).

Below is a excerpt of "mutt -d 2" output. Based on what I see there, it doesn't 
appear that them SMTP is being hijacked. But apparently not even LOGIN or PLAIN AUTH 
mechanisms appear to be available to mutt?

-
Sending message...
Looking up smtp.gmail.com...
Connecting to smtp.gmail.com...
ssl_load_certificates: loading trusted certificates
ssl_socket_open: Error loading trusted certificates
ssl_verify_callback: checking cert chain entry /OU=GlobalSign Root CA - 
R2/O=GlobalSign/CN=GlobalSign (preverify: 1 skipmode: 0)
ssl_verify_callback: checking cert chain entry /C=US/O=Google Trust 
Services/CN=GTS CA 1O1 (preverify: 1 skipmode: 0)
ssl_verify_callback: checking cert chain entry /C=US/ST=California/L=Mountain 
View/O=Google LLC/CN=smtp.gmail.com (preverify: 1 skipmode: 0)
ssl_verify_callback: hostname check passed
TLSv1.3 connection using TLSv1.3 (TLS_AES_256_GCM_SHA384)
Connected to smtp.gmail.com:465 on fd=8
8< 220 smtp.gmail.com ESMTP s76sm6536334pfc.35 - gsmtp
8> EHLO MacBook-Pro.local
8< 250-smtp.gmail.com at your service, [192.160.100.100]
8< 250-SIZE 35882577
8< 250-8BITMIME
8< 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
8< 250-ENHANCEDSTATUSCODES
8< 250-PIPELINING
8< 250-CHUNKING
8< 250 SMTPUTF8
SASL local ip: 172.19.100.162;59923, remote ip:74.125.20.109;465
External SSF: 256
External authentication name: u...@example.org
SASL: No worthy mechs found
smtp_auth_sasl: LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 
unavailable
No authenticators available
mutt_free_body: unlinking 
/var/folders/2y/zz20bmnx69zbk82vm71syr5wgp/T//mutt-MacBook-Pro-502-51733-18433303713026120095.
Mail not sent.
-
(email address and client IP address redacted)


GMail SMTP: no authenticators available?

2021-01-20 Thread Baron Fujimoto

Our org's email is hosted by Gmail (via GSuite). I had been using neomutt (built from 
MacPorts) successfully for years. Recently though, I can no longer send email 
successfully using GMail's SMTP servers. I get the error, "No authenticators 
available". IMAP still works fine. This change occurred while I had a neomutt 
session open; it was working one day when I left, but the next day, no bueno.

Although I had been using neomutt above (because it's what's available as mutt 
in MacPorts), I also tried compiling and installing real mutt (2.0.4) from 
source and I am seeing the same behavior with real mutt as well[*].

I don't know if it's relevant, but prior to not working at all, I'd had to 
enter my password whenever I start mutt for IMAP access, as well as *each time* 
I wanted to send a message via the SMTP server.

The following in my muttrc was used successfully util this problem began:

set smtp_url = smtp://u...@example.org@smtp.gmail.com

Where u...@example.org is my hosted gmail address.

I also tried the following with the same results:

set smtp_url = smtp://u...@example.org@smtp.gmail.com:587
set smtp_url = smtps://u...@example.org@smtp.gmail.com

I haven't seen any other traffic about this on the list, so presumably it's not 
a general problem.

Any suggestions would be appreciated.

[*] Built on MacOS 11.1 with "./configure --enable-sidebar --enable-compressed 
--enable-imap --enable-smtp --enable-debug --enable-hcache --with-ssl=/opt/local 
--with-sasl=/opt/local"


cache/session related problem for (neo)mutt

2017-05-11 Thread Baron Fujimoto

I recently upgraded my MacPorts-installed version of (neo)mutt. Since then
I freqently encounter situations where I cannot refresh mailboxes, or
otherwise delete and expunge messages. Even (q)uitting doesn't work, so
maybe it's any attempt to save changes to the mailbox? I can work around
this problem if I e(x)it mutt and delete the .mutt/cache directory before
restarting the app. Eventually however the broken behavior returns. I've
noticed at least once that this happens right after my session expired,
but I'm not sure that's a prerequisite.

Is this a known issue with either the MacPorts port specifically or this
version or more generally? Any ideas or suggestions?

$ mutt -version
NeoMutt 20170428 (1.8.2)
Copyright (C) 1996-2016 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Darwin 16.5.0 (x86_64)
libidn: 1.33 (compiled with 1.33)
hcache backends: gdbm

Compiler:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Configure options: '--prefix=/opt/local' '--enable-compressed' 
'--disable-debug' '--disable-gpgme' '--enable-imap' '--disable-nntp' 
'--disable-notmuch' '--disable-pop' '--disable-sidebar' 
'--disable-silent-rules' '--enable-smtp' '--disable-warnings' 
'--mandir=/opt/local/share/man' '--with-docdir=/opt/local/share/doc/mutt' 
'--with-libiconv-prefix=/opt/local' '--with-curses=/opt/local' '--without-bdb' 
'--with-gdbm=/opt/local' '--without-gnutls' '--without-gss' 
'--with-idn=/opt/local' '--without-kyotocabinet' '--without-lmdb' 
'--without-qdbm' '--with-sasl=/opt/local' '--with-ssl=/opt/local' 
'--without-tokyocabinet' 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' 
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64' 
'CPPFLAGS=-I/opt/local/include'

Compilation CFLAGS: -pipe -Os -arch x86_64

Compile options:
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME
-DEBUG +DL_STANDALONE +ENABLE_NLS -EXACT_ADDRESS -HOMESPOOL -LOCALES_HACK
-SUN_ATTACHMENT +HAVE_BKGDSET +HAVE_COLOR +HAVE_CURS_SET -HAVE_FUTIMENS
+HAVE_GETADDRINFO +HAVE_GETSID +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
+HAVE_LIBIDN +HAVE_META -HAVE_REGCOMP +HAVE_RESIZETERM +HAVE_START_COLOR
+HAVE_TYPEAHEAD +HAVE_WC_FUNCS +ICONV_NONTRANS +USE_COMPRESSED +USE_DOTLOCK
+USE_FCNTL -USE_FLOCK -USE_FMEMOPEN -USE_GSS +USE_HCACHE +USE_IMAP -USE_LUA
-USE_NOTMUCH -USE_NNTP -USE_POP +USE_SASL +USE_SETGID -USE_SIDEBAR +USE_SMTP
-USE_SSL_GNUTLS +USE_SSL_OPENSSL
-DOMAIN
-MIXMASTER
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/opt/local/share/mutt"
SYSCONFDIR="/opt/local/etc"
EXECSHELL="/bin/sh"

patch-attach-headers-color-neomutt
patch-compose-to-sender-neomutt
patch-compress-neomutt
patch-cond-date-neomutt
patch-encrypt-to-self-neomutt
patch-fmemopen-neomutt
patch-forgotten-attachments-neomutt
patch-forwref-neomutt
patch-ifdef-neomutt
patch-index-color-neomutt
patch-initials-neomutt
patch-keywords-neomutt
patch-kyoto-neomutt
patch-limit-current-thread-neomutt
patch-lmdb-neomutt
patch-lua-neomutt
patch-multiple-fcc-neomutt
patch-nested-if-neomutt
patch-new-mail-neomutt
patch-nntp-neomutt
patch-notmuch-neomutt
patch-progress-neomutt
patch-quasi-delete-neomutt
patch-reply-with-xorig-neomutt
patch-sensible-browser-neomutt
patch-sidebar-neomutt
patch-skip-quoted-neomutt
patch-status-color-neomutt
patch-timeout-neomutt
patch-tls-sni-neomutt
patch-trash-neomutt


Re: multiple criteria for index sort (thread+recv)?

2017-03-13 Thread Baron Fujimoto

On Mon, 13 Mar 2017, Till Smejkal wrote:


On Mon, 13 Mar 2017, Baron Fujimoto wrote:

Is it possible to apply multiple sort criteria at the message index? For
example, I generally want my messages threaded (Sort Thread)
but I would also secondarily like it sorted by Received (Sort Recv)
option) so that more recent responses in the thread pop the thread to the
most recent end of the message index. As it is now, long lived threads
tend to migrate backwards because they are anchored by the oldest retained
message in the thread. Or is there some other way to achieve this?


You should have a look at the 'sort_aux' option. With this option set to
'last-date-received' you can achieve exactly what you want.

I hope this helps.

Till


That's the trick! Groovy, thanks!

Aloha,
-baron


multiple criteria for index sort (thread+recv)?

2017-03-13 Thread Baron Fujimoto

Is it possible to apply multiple sort criteria at the message index? For
example, I generally want my messages threaded (Sort Thread)
but I would also secondarily like it sorted by Received (Sort Recv)
option) so that more recent responses in the thread pop the thread to the
most recent end of the message index. As it is now, long lived threads
tend to migrate backwards because they are anchored by the oldest retained
message in the thread. Or is there some other way to achieve this?


Re: toggle auto_view?

2011-10-26 Thread Baron Fujimoto
On Wed, 26 Oct 2011, Patrick Shanahan wrote:

: * Baron Fujimoto mutt@monkeybutt.com [10-26-11 20:09]:
:  Is there a way to toggle auto_view for a message?
:  
:  Normally, I prefer to have mutt use auto_view/mailcap display HTML
:  MIME parts for messages.  There are times though (such as forwarding
:  spam reports) that I would prefer the raw HTML to a rendered version.
:  Is there a way to toggle this from within the pager or message index?
:  I took a few stabs at creating a macro for the index or pager, but
:  wasn't able to find the right incantation to disable auto_view.
: 
: edit mode will give you the raw file
: you can then dump the file to a temp location and import it into a new msg

That's basically what I've been doing (actually, saving from the mime parts/
attachments menu, then reimporting the saved file into the editor), but I was
hoping for something a little less clunky so I could skip the save/import
steps.  [Al]pine does this when you toggle its full headers mode.