Re: New to Mutt, unable to send messages in *any* attempted way

2022-05-07 Thread Kevin J. McCarthy

On Sat, May 07, 2022 at 11:11:35AM -0500, X Tec wrote:
By the way, in Mutt default pager for reading emails, your words 
between underscores '_' (_not_, _may_, etc...) are not being 
displayed... Why?


Possibly your color settings, or the color settings shipped with your 
packaged version of mutt.


Try adding 'uncolor body *' to the bottom of your muttrc to remove all 
body coloring add see if that makes a difference.



"man mutt" says that:

 -n Do not read the system-wide Muttrc configuration file.

If you're getting an exit 1, I'd expect some kind of error message as
well.

No command line output whatsoever; only an exit '1' code when checking 
with "echo $?"


I can't duplicate this, but it's possible a bug got fixed related to 
this.  If you could specify the exact command you are running I'll try 
to look at it again.


When browsing emails in Mutt, why do sizes inside () -for example, 
(1.1K)- change to something different and smaller -( 6)- when hitting 
enter to display the message?


The IMAP code updates the message body size when it actually downloads 
the message.  When opening the mailbox, it only displays an estimate 
based on the subset of headers it downloads.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: New to Mutt, unable to send messages in *any* attempted way

2022-05-05 Thread Kevin J. McCarthy

On Thu, May 05, 2022 at 11:24:36AM -0500, x...@trimaso.com.mx wrote:
printf "%b\n" "$msg" | mutt -s "Test message" -e "set 
my_user=u...@domain.tld; set my_url=smtp.domain.tld; set from='User'; 
set use_from=yes; set smtp_url=smtp://$my_user@$my_url; set 
smtp_pass=p4ss; set ssl_starttls=yes; set ssl_force_tls=yes" 
recei...@domain.tld


Two general suggestions to try:

1) On the command line, the shell will expand shell variables inside 
double quoted strings, before Mutt even sees it.


So in the part "set smtp_url=smtp://$my_user@$my_url" Mutt is probably 
only seeing "set smtp_url=smtp://@", because $my_user and $my_url are 
unset in your shell.  You may want to use single-quotes around the whole 
"-e" expression, but then be careful with nested single quotes, e.g. the 
set from='User' part.


Alternatively, consider using the 'source' command and putting the 
configs into a file.


2) You most likely *do* want to set a port number in $smtp_url, as 
you've done below, e.g. smtp://xxx:587 or smtps://xxx:465.



[Since you're new to Mutt, I'll also gently remind to please reply to 
the mailing list, not to me directly.]


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Gmail config

2022-05-01 Thread Kevin J. McCarthy

On Sun, May 01, 2022 at 08:34:22PM -0400, Rob Pyott wrote:

Here's the debug output from "connecting to smtp" to the end.  Should
have sent all of it previously.  Thanks --



[2022-05-01 18:40:05] 5< 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN 
OAUTHBEARER XOAUTH


This shows that the server is offering possible authenticators, 
including LOGIN and PLAIN, so the problem doesn't seem to be on Gmail's 
side.



[2022-05-01 18:40:05] smtp_authenticate: Trying method login


It looks like you've set $smtp_authenticators.  I'm assuming you 
previously had it unset and were getting the same error, and are trying 
Andrzej's suggestion here.


In any case, "login" is clearly being offered by the server, but:


[2022-05-01 18:40:05] SASL: No worthy mechs found


The Cyrus SASL library is reporting it can't use it and then:


[2022-05-01 18:40:05] smtp_auth_sasl: login unavailable


Mutt gives up and tries the next one.

This looks like something is wrong with your Cyrus SASL installation. 
On Debian, for instance, the authentication modules come in a different 
package from the libsasl2 package: libsasl2-modules.  I would check to 
make sure you have at least the standard modules installed on your 
system.


If you can't find out the problem, you could also try compiling Mutt 
with gsasl support instead.  It's new in Mutt 2.2.x, and so isn't well 
tested yet, but might work for you.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Gmail config

2022-05-01 Thread Kevin J. McCarthy

On Sun, May 01, 2022 at 01:50:33PM -0400, Rob Pyott wrote:
Hello, I seem to receive emails ok with mutt, but when sending, I get 
an error saying 'no authenticators found.'  Any thoughts?  Thank you!


Try running mutt with debug enabled: 'mutt -d 2', which will generate 
debugging output in ~/.muttdebug0.  See what the file says starting with 
a line containing 'Connecting to smtp.gmail.com'.  Maybe that will give 
a hint as to what the problem is.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.2.4 released

2022-04-30 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.2.4.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing some regressions with Maildir/mh 
mailbox path normalization that were added in 2.2.0.


To be honest I debated between completely reverting the path 
normalization or trying to fix it in a stable release.  For now, I've 
decided to try a somewhat aggressive fix.


There is one known minor side-effect with $header_cache: a directory 
must already exist for the value to be treated as a directory (also see 
the UPDATING file).  However, if you notice any additional regressions 
that impact your workflow please let me know.


Thanks to everyone who reported this issue and helped test the fix.

-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA




signature.asc
Description: PGP signature


mutt 2.2.3 released

2022-04-12 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.2.3.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, addressing CVE-2022-1328: a buffer overread 
in the uuencoded decoder routine.  For more details please see GitLab 
ticket 404: <https://gitlab.com/muttmua/mutt/-/issues/404>.  The commit 
fixing this issue is at 
<https://gitlab.com/muttmua/mutt/-/commit/e5ed080c00e59701ca62ef9b2a6d2612ebf765a5>


Also fixed were a possible integer overflow issue in the general iconv 
and rfc2047-conversion iconv functions.  These are not believed to be 
exploitable.


A huge thank you to Tavis Ormandy for reporting these issues, suggesting 
a patch for the iconv issue, helping test, and providing constructive 
feedback.  Hurray for the white-hats!


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA



signature.asc
Description: PGP signature


Re: pgp Sign as: config

2022-04-11 Thread Kevin J. McCarthy

On Mon, Apr 11, 2022 at 08:49:35PM +0200, Orm Finnendahl wrote:

Am Montag, den 11. April 2022 um 10:33:57 Uhr (-0700) schrieb Kevin J. McCarthy:


That's the part that makes no sense to me.  Simply unsetting and 
resetting "sign" will just display the value of $pgp_sign_as.  Did 
something else happen in your workflow?


It's getting clearer thanks to your explanations: I was unaware of the 
difference of s/mime and pgp signing. The mail, I replied to was signed 
with s/mime, so replying to it set signing to (S/MIME). When unsetting 
and resetting it in my reply it gets set to (PGP/MIME), the key is set 
correctly and it works. It's not even possible to select s/(m)ime when 
selecting the encryption type manually even though it's displayed in 
the selection menu.


Oh good, that explains what's happening!  If you don't have S/MIME 
configured, you may want to add 'unset crypt_autosmime' to your .muttrc. 
I believe that will take care of the problem.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: pgp Sign as: config

2022-04-11 Thread Kevin J. McCarthy

On Mon, Apr 11, 2022 at 06:09:01PM +0200, Orm Finnendahl wrote:
when replying to a signed Email, my response Mail is automatically set 
to be signed by me.


Are you doing that via $crypt_replysign or via some other method?  Are 
you replying to a PGP-signed message to an S/MIME message?  The behavior 
you are describing below is not normal, so I suspect something more is 
going on.



The pgp line concerning my key says

"sign as: "


The compose menu will display this when $pgp_sign_as is unset.  In that 
case, Mutt will use the value in $pgp_default_key, or what is configured 
in your gpg.conf.  If neither of those are set, then I'm guessing this 
is the error returned by GPGME when it tries to sign with no key 
defined.



Unsetting and then resetting Security to "sign" results in the line

"sign as: 0xA1XX"

with the value of my Hex pgp Key configured in my .muttrc as

"set pgp_sign_as = 0xA1XXX"

and everything works as expected.


That's the part that makes no sense to me.  Simply unsetting and 
resetting "sign" will just display the value of $pgp_sign_as.  Did 
something else happen in your workflow?


Also, what version of Mutt are you using?

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.2.2 released

2022-03-25 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.2.2.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing a few smaller issues.  Of note, the 
 and IMAP create/rename mailbox prompts were fixed to use the 
mailbox history list.


Thanks to everyone who submitted patches, filed tickets, and helped 
test!


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA


signature.asc
Description: PGP signature


Re: ssl_starttls unknown variable

2022-03-17 Thread Kevin J. McCarthy

On Thu, Mar 17, 2022 at 06:34:30PM +0100, Christoph Klassen wrote:

On 3/17/22 18:22, Kevin J. McCarthy wrote:
In the source directory you built in, what does 'grep USE_SSL 
config.h' output?

That's the output:

#define USE_SSL 1

/* #undef USE_SSL_GNUTLS */

#define USE_SSL_OPENSSL 1


That would indicate it was configured with OpenSSL, and should support 
$ssl_starttls.  However:



What does 'mutt -v | grep SSL' output?
-USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSASL  -USE_GSS 
+HAVE_GETADDRINFO


That doesn't line up with the build directory configuration.  Here, the 
first two words indicate both OpenSSL and GnuTLS were disabled at build 
time.


Is it possible you are invoking a different mutt binary in your search 
path?


(On a different topic, if you use the built-in SMTP, you'll also want to 
enable SASL at build time, to support authentication).


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: ssl_starttls unknown variable

2022-03-17 Thread Kevin J. McCarthy

On Thu, Mar 17, 2022 at 05:56:19PM +0100, Christoph Klassen wrote:


On 3/17/22 17:45, Patrick Shanahan wrote:

shouldbe

:set ssl_starttls=yes
:set ?ssl_starttls
That's what I configured in muttrc. But when I start mutt I get: 
"Error in /home/mint/.muttrc, line 9: ssl_starttls: unknown variable"


In the source directory you built in, what does 'grep USE_SSL config.h' 
output?


What does 'mutt -v | grep SSL' output?

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Domain Mangling Regression

2022-03-01 Thread Kevin J. McCarthy

On Tue, Mar 01, 2022 at 06:23:44PM -0600, sunnycemet...@gmail.com wrote:
After upgrading from 1.10.1 to 2.0.2, mutt began forcefully 
lower-casing "From:" headers!


I believe this behavior is from libidn2.


Does anyone know how to prevent this?


You could try unsetting $idn_encode, if you don't deal with 
international domains; or alternatively try compiling with libidn 
instead.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-22 Thread Kevin J. McCarthy

On Tue, Feb 22, 2022 at 02:34:05PM -0600, Ranjan Maitra wrote:

On Tue Feb22'22 02:06:57PM, Ion wrote:

As instructed I changed it to...

set smtp_url ="smtp://ionm...@eml.cc@smtp.fastmail.com:587"

and also tried

set smtp_url ="smtp://ionm...@eml.cc@smtp.fastmail.com:465"



set smtp_url ="smtps://ionm...@eml.cc@smtp.fastmail.com:465"


Thanks Ranjan - that's right.  Remember port 465 uses smtps://


both produced "Invalid SMTP URL: smtp.fastmail.com:465"


Check your muttrc to make sure you don't have the value specified twice 
or something.  That error message prints out the full value of 
$smtp_url, so somehow Mutt has the value minus the 
'smtps://ionm...@eml.cc@' prefix stored in $smtp_url.


You can also check the value at runtime by typing ':set ?smtp_url' and 
hitting return.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Saving email, forward to compose

2022-02-22 Thread Kevin J. McCarthy

On Tue, Feb 22, 2022 at 09:32:50AM -0800, Kevin J. McCarthy wrote:

On Tue, Feb 22, 2022 at 08:02:03AM +, Piet wrote:

macro index,pager  'source 
~/.config/mutt/conf/imap1!'
macro index,pager  'source 
~/.config/mutt/conf/imap2!'


But if I sync manually with key "$" before shifting to the other 
account, Mutt asks me to delete the message in the actual folder.


The $delete quadoption prompt is happening after .  The 
prompt tries to read from input: in this case the contents of your 
macro.  Try unsetting $delete, either in your muttrc or at the start 
of the macro.


Sorry, I meant setting $delete to "yes".

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Saving email, forward to compose

2022-02-22 Thread Kevin J. McCarthy

On Tue, Feb 22, 2022 at 08:02:03AM +, Piet wrote:

macro index,pager  'source 
~/.config/mutt/conf/imap1!'
macro index,pager  'source 
~/.config/mutt/conf/imap2!'


But if I sync manually with key "$" before shifting to the other 
account, Mutt asks me to delete the message in the actual folder.


The $delete quadoption prompt is happening after .  The 
prompt tries to read from input: in this case the contents of your 
macro.  Try unsetting $delete, either in your muttrc or at the start of 
the macro.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-21 Thread Kevin J. McCarthy

On Mon, Feb 21, 2022 at 06:10:51PM -0600, Ion wrote:

I tried both set smtp_url ="smtp://smtp.fastmail.com:465" and set
smtp_url ="smtp://smtp.fastmail.com:587" and got "SMTP session failed:
530 5.7.1 Authentication required".


You'll need to add your username to the $smtp_url, so something like
  set smtp_url = "smtp://ionm...@eml.cc@smtp.fastmail.com:587"

I used the same password as IMAP as the Fastmail help page tells me 
"Your app-specific password.  You cannot use your regular Fastmail 
password."


Yes that's right.


So does the "set ssl_force_tls =yes" not cover authentication?


No that just makes sure encryption is used for 'smtp://' URLs.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-21 Thread Kevin J. McCarthy

On Mon, Feb 21, 2022 at 02:46:11PM -0600, Ion wrote:

set smtp_url ="smtp://smtp.fastmail.com:465"



But the response was...

"SMTP session failed: read error"


The prefix 'smtps://' should be used with port 465:
  set smtp_url ="smtps://smtp.fastmail.com:465"

Alternatively you can use 'smtp://' with port 587 to use STARTTLS:
  set smtp_url ="smtp://smtp.fastmail.com:587"


set timeout=15
set mail_check=1


You didn't ask, but as an aside, $mail_check of 1 is a bit too 
aggressive for IMAP.  <http://www.mutt.org/doc/manual/#imap> suggests

  set mail_check=90
  set timeout=15
which I think is a fairly balanced approach.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-20 Thread Kevin J. McCarthy

On Sun, Feb 20, 2022 at 01:49:45PM -0600, Ion wrote:

Here are my account settings from Thunderbird. They work.

IMAP server mail.messagingengine.com ionm...@eml.cc 993 SSL/TLS
SMTP server smtp.pobox.com i...@pobox.com 587 STARTTLS

So doesn't that indicate that I have an accessible "Sent" folder?


No, that is only telling Thunderbird how to connect to your IMAP and 
SMTP servers.


But here's more. In Thunderbird settings Copies and Folders are all on 
Pobox. So perhaps that's the problem.


It's been a long time since I've used Thunderbird.  Maybe someone else 
can chime in.


But, yes, it sounds like you are saying Thunderbird is saving copies to 
your pobox.com server account, instead of mail.messagingengine.com.  Do 
you have IMAP settings configured for pobox.com too?


$record can have a full 'imaps://' URL in it, but it seems a bit strange 
to be reading from one place and writing to another.  Perhaps you can 
re-check the correct settings with your provider.


A quick search found 
<https://www.pobox.help/hc/en-us/articles/360058663654-Default-settings-for-sending-and-receiving-mail>, 
but please check for yourself what is "correct".


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-20 Thread Kevin J. McCarthy

On Sun, Feb 20, 2022 at 01:13:56PM -0600, Ion wrote:

On 20/02/2022 12:37, Kevin J. McCarthy wrote:

Are you sure you have a "Sent" folder on your mail.messagingengine.com
account, that you can access and write to?


Well if I don't have access to it why does...

:~> echo "" | mutt -s "subject" -i file.txt ionm...@gmx.us" work when it
uses the same .muttrc file?


Fcc'ing to an IMAP mailbox is not supported in batch mode.  So the batch 
mode send is not trying to record the sent message to '+Sent'.



On Fastmail, for instance, the correct setting is:
  set record = "+Sent Items"
but perhaps their 'pobox' users are configured differently.


I changed it to "+Sent Items".  Nothing changed.


Did you check that you have a "Sent" or "Sent Items" folder, that you 
can access and write to?  Perhaps you could try another mailbox that you 
are sure exists and you can write to?


It may also be useful to run mutt in debug mode, e.g. with '-d 2' as an 
argument.  If it's compiled with debug mode, that will generate a file, 
~/.muttdebug0 with commands sent to the SMTP and IMAP servers.  Perhaps 
that will give a clue as to where the error is coming from.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-20 Thread Kevin J. McCarthy
Please don't reply to me personally, it's poor etiquette.  Redirecting 
back to the mailing list.


On Sun, Feb 20, 2022 at 11:55:06AM -0600, Ion wrote:

Thanks for the speedy reply. There was no prompt. So I added "set
confirmcreate = yes" to my .muttrc file and tried gain. No change.
Another observation. Mutt shows my IMAP inbox. It seems the problem lies
with the SMTP request.


I'm not sure why you aren't seeing a "Create xxx?" prompt first.  Still, 
I hypothesize this is from your 'set record ="+Sent"' setting.


Are you sure you have a "Sent" folder on your mail.messagingengine.com 
account, that you can access and write to?


On Fastmail, for instance, the correct setting is:
  set record = "+Sent Items"
but perhaps their 'pobox' users are configured differently.

-Kevin


signature.asc
Description: PGP signature


Re: Unexplained mutt error

2022-02-20 Thread Kevin J. McCarthy

On Sun, Feb 20, 2022 at 10:56:05AM -0600, Ion wrote:

...while executing mutt and using the menus, with the same addresses
leaves me with...

Code:
CREATE failed: Permission denied


That's an IMAP permission error.  It would usually be preceded by a 
prompt to create a mailbox that doesn't exist yet, unless $confirmcreate 
was turned off in your muttrc.


Did you see any kind of prompt?

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.2.1 released

2022-02-19 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.2.1.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing a header-cache and body-cache naming 
regression.  Some internal URL handling fixes accidentally resulted in 
the username being omitted from the header cache in some cases.  Thanks 
to exg on IRC for notifying me of the regression.


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA



signature.asc
Description: PGP signature


Re: Save external imap emails to a local maildir folder

2022-02-19 Thread Kevin J. McCarthy

On Sat, Feb 19, 2022 at 10:32:07AM +, Piet wrote:
If press key "s" here followed by "?"  I have only the choice to save 
in the for the external imap folders and can't switch to the local 
maildir.


You can use  'c' to change to a local directory in the 
browser.  It might be convenient to have macros to switch between 
commonly used locations.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: How do I rebind the keys in the attachment prompt?

2022-02-17 Thread Kevin J. McCarthy

On Wed, Feb 16, 2022 at 05:23:51PM -0700, li...@ifohancroft.com wrote:
When you are on the compose screen and you hit 'a' (attach-file) you 
get an attachment prompt, that says:

Attach file ('?' for list):

There you have 3 options (that's how many I found):
1. Hit ? and you get a list of your mailbox folders


'?' is hard-coded, and occurs outside of the browser or editor menus.

If you type '?' it launches the browser menu in *file* mode.  The first 
time it is run, the file browser will default to $folder, but it will 
remember the last directory used when launched again.


2. Hit Tab and you get the browser showing your local files (and you 
can select an attachment from there
3. Just type the path to an attachment (and you can use Tab to 
autocomplete the name).


Any other key besides '?' will launch the editor menu.  There is no 
help, but you can see the bindings at 
<http://www.mutt.org/doc/manual/#editor-map>.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.2.0 released

2022-02-12 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.2.0.

Instructions for downloading are available at 
<http://www.mutt.org/download.html>, or the tarball can be directly 
downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take the time 
to verify the signature file against my public key[1].


This release has new features as well as many bug fixes.  Please see the 
UPDATING file, and also please take a look at the release notes: 
<http://www.mutt.org/relnotes/2.2/>.


My thanks to everyone who contributed patches, tickets, documentation 
updates, and helped test.


Thank you,

-Kevin


[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA


signature.asc
Description: PGP signature


Re: Hotmail Sending

2022-02-06 Thread Kevin J. McCarthy

On Sat, Feb 05, 2022 at 11:21:36PM -0500, nua kount wrote:

Hi.  New to Mutt, but all set up on SailfishOS, with 4 accounts, (2
Gmail, 1 Hotmail, 1 Fastmail), and sendingreceiving working fine -
except for sending from Hotmail. "No Authenticators Found" error. I've
tried several different smtp urls.


Try running with debug enabled, e.g. 'mutt -d 2'.  This will generate a 
file, ~/.muttdebug0, showing the interaction between the SMTP server and 
Mutt.  See if there is an AUTH line from the server and what values it 
lists.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: How is this spam hiding from mutt search?

2022-02-01 Thread Kevin J. McCarthy

On Tue, Feb 01, 2022 at 10:36:29AM -0500, Ofer Inbar wrote:

From: "WeTeachSex"   



One feature they all share is that "support_id:" prefix in the fake
email address.


The ':' isn't allowed in the address local part, so I believe the mutt 
parser is rejecting the email address.  Because of that there is no 
address stored in the "from" list internally.


You may have to use something like ~h or =h to find the prefix.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: How to 'hook' different programs to view text/html?

2022-01-18 Thread Kevin J. McCarthy

On Tue, Jan 18, 2022 at 05:44:04PM +, Chris Green wrote:

Is there a straightforward way to do this?  It's easy enough to use a
message hook to catch the messages from the site but what do I need to
do then to convert the messages and feed them into the pager?


You could use the mailcap 'test=' field combined with an environment 
variable set/unset by the hook.


message-hook ~A 'unsetenv MUTT_USE_ALT_VIEWER'
message-hook ~C 'your-l...@example.com' 'setenv MUTT_USE_ALT_VIEWER yes'

In .mailcap:

text/html; altviewer %s; test=[ -n "$MUTT_USE_ALT_VIEWER" ]; copiousoutput; 
nametemplate=%s.html
text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html

Another idea might be to swap $mailcap_path to use another mailcap file 
for that mailing list.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: sidebar_format Not Showing Number of Unread Emails

2022-01-03 Thread Kevin J. McCarthy

On Mon, Jan 03, 2022 at 12:40:17PM +0100, Michael Klemm wrote:
I have a small issue with sidebar_format that I cannot really sort 
out. If I set this sidebar_format


set sidebar_format = '%B%* %n'

Mutt highlights the folder with unread messages, but does not show the 
number, but no count at all:


To make sure I'm understanding you, %n will display 'N' when the mailbox 
has new mail, not a count.


However, note that $mail_check_recent can affect this for mailboxes you 
have already visited.  Also note that 'unread' isn't the same as 'new'. 
For example, 'old' messages are unread but not new.


I cannot make it work to only show the number for the mailboxes count 

0.  I have also tried


set sidebar_format = '%B%* %?N%N'


Try:   set sidebar_format = "%B%* %?N?%N?"

http://www.mutt.org/doc/manual/#formatstrings-conditionals gives a 
review of the syntax.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.5 released

2021-12-30 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.1.5.  Instructions for 
downloading are available at <http://www.mutt.org/download.html>, or the 
tarball can be directly downloaded from <http://ftp.mutt.org/pub/mutt/>. 
Please take the time to verify the signature file against my public 
key[1].


This is a bug-fix release.  Fixes include:

* a regression with SMTP authentication, where Mutt would force 
authentication when a server advertised AUTH.


* a possible SMTP server response overread, although I don't believe 
there is a security issue here.


* a SEGV bug on NetBSD when trying to use low level terminfo routines. 
Because of this fix, Mutt now looks for the term.h header before 
enabling these routines.  Packagers should ensure this header is present 
in the build dependencies.


* format=flowed text is space-unstuffed before piping to 
$send_multipart_alternative_filter


Thanks to everyone who filed tickets and helped me debug and test the 
fixes.  A special thanks to rahl for his triaging the NetBSD bug, for 
which I didn't have an instance handy to debug/test myself.


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA



signature.asc
Description: PGP signature


Re: accommodating "possible special characters" in password?

2021-12-15 Thread Kevin J. McCarthy

On Wed, Dec 15, 2021 at 08:25:46AM -0600, mai...@email.com wrote:
so I am thinking that there must be something in the password amongst 
the special characters used that mutt does not like reading from the rc 
file. I am wondering what those characters are, and how do I get around 
it in my muttrc? Probably an Escape sequence?


In general, you'll want to use single quotes to avoid any kind of 
interpretation by Mutt when processing the string. e.g.:

  set smtp_pass = 'cr@zyp$ssw0rd'

If your password contains a single quote you'll have to so something 
like, e.g. for cr@zy'p$ssw0rd:

  set smtp_pass = 'cr@zy'\''p$ssw0rd'

If you use backtick evaluation to obtain the password from a program, 
you should put the backticks inside double quotes to avoid reevaluation:

  set smtp_pass = "`gpg --batch -q --decrypt ~/.passwords/mypass.gpg`"

See <http://www.mutt.org/doc/manual/#muttrc-syntax> for more information 
about muttrc syntax.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.4 released

2021-12-11 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.1.4.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing a performance issue when interacting 
with DavMail.  Thanks to Michael Gernoth for debugging this problem and 
help testing the final commit!


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA


signature.asc
Description: PGP signature


Re: Tagging attachments - works but no indicator

2021-12-01 Thread Kevin J. McCarthy

On Wed, Dec 01, 2021 at 04:02:15PM +, Chris Green wrote:
But, unlike in the index view, tagging doesn't mark the tagged 
attachments in any way so with a long list and/or if you only want to 
attach some files from a long list it's a bit awkward.


$folder_format by default contains the %t expando to indicate tagged 
entries.  Perhaps you've changed the value of that variable?


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Undefining HAVE_BKGDSET in config.h doesn't work any more

2021-11-17 Thread Kevin J. McCarthy

On Wed, Nov 17, 2021 at 10:04:22AM +0100, Vegard Svanberg wrote:

To get around the rather annoying copy-and-paste problem[1] when running
Mutt in Screen or Tmux, I've up until now undefined HAVE_BKGDSET in
config.h and all has been well.

However from 2.1.x(?) this doesn't seem to be working any more. I've
also tried defining it explicitely to 0...


Mutt 2.1+ will use bkgrndset() if available.  Try undefining 
HAVE_BKGRNDSET too.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: gnutls_handshake

2021-11-06 Thread Kevin J. McCarthy

On Sat, Nov 06, 2021 at 09:14:46PM +0100, Jeff Abrahamson wrote:

On trying to send mail, I receive the following error:

    gnutls_handshake: An unexpected TLS packet was received


This usually happens when Mutt is misconfigured to use smtps for port 
587.  Your email shows it configured correctly, but you still may want 
to double check the value inside Mutt via ':set ?smtp_url'.


If that doesn't help, you might try running at debug level 2 (-d 2) or 
above and see if anything jumps out; it outputs to ~/.muttdebug0.  I 
believe Mutt would give a different error if there was a problem with 
the initial exchange or with the STARTTLS command, but maybe that would 
give some idea.


Finally, perhaps try connecting to port 587 via telnet and stepping 
through the EHLO and STARTTLS sequence yourself.  Perhaps the server is 
misconfigured and is giving an error message when trying to negotiate 
tls.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: I can't seem to make a message-hook work, what am I doing wrong?

2021-10-30 Thread Kevin J. McCarthy

On Sat, Oct 30, 2021 at 10:56:12AM +0100, Chris Green wrote:

So, I have the following lines in my muttrc file:-

   auto_view text/html
   alternative_order text/html text/plain text
   message-hook '~f .*ilovefreegle.org.*' 'alternative_order text/plain 
text/html'


Each invocation of alternative_order appends to the list - it doesn't 
erase and reset the values.  You'll want to use 'unalternative_order *' 
to clear out the list.


Also, don't forget the message-hook you have above will affect that 
message and all subsequent messages, unless you have a default 
message-hook to reset values back.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: display_filter and multipart mails

2021-10-19 Thread Kevin J. McCarthy

On Tue, Oct 19, 2021 at 07:52:28PM +, Mike wrote:

* On 19.10. Kevin J. McCarthy muttered:

   message-hook ~A 'unalternative_order *; alternative_order text/plain 
text/html'


Is it neccessary to set a (default) alternative_order after the
reset?


No, it's not necessary.  Mutt will follow its own default behavior then, 
described at <http://www.mutt.org/doc/manual/#alternative-order>.


I think step 3 there isn't quite complete: Mutt will select 
text/enriched over text/plain over text/html, and then finally choose 
any other renderable type.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: display_filter and multipart mails

2021-10-19 Thread Kevin J. McCarthy

On Mon, Oct 18, 2021 at 10:49:38PM +, mi...@posteo.nl wrote:

It seems display_filter always receives the first part of an email.


$display_filter is run with the text about to be sent to the pager for 
viewing.  It can't be used to select which alternative is rendered.


As Will Yardley mentioned, alternative_order can be used for that.

You could also try combining that with a message-hook, so text/html is 
preferred only for that particular contact:


  message-hook ~A 'unalternative_order *; alternative_order text/plain 
text/html'
  message-hook '~f person@example\.com' 'unalternative_order *; 
alternative_order text/html text/plain'

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Binding the pad-Enter key?

2021-09-28 Thread Kevin J. McCarthy

On Tue, Sep 28, 2021 at 09:38:28AM +0200, Bastian wrote:

On 27Sep21 11:12-0700, Kevin J. McCarthy wrote:

I'll try to dig into it if that's not the problem.  However, my keyboard
doesn't have a keypad so I may have some difficulty debugging.  :-)


Would this do it?

```
% xdotool key --window 0x100101 KP_Enter
```


Yes that works well.  Thank you!

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Binding the pad-Enter key?

2021-09-27 Thread Kevin J. McCarthy

On Mon, Sep 27, 2021 at 12:48:11PM -0400, Mark H. Wood wrote:

I wanted to bind the Enter key on the numeric pad so that it works the
same way as the Enter on the main key grid.  I entered ":exec
what-key", hit pad-Enter, and was told that it is "Char = , Octal
= 527, Decimal = 343".  So I entered ":bind generic 
select-entry", got no error back, but pressing pad-Enter still results
in "Key is not bound.  Press '?' for help."

What am I missing?


First, make sure you aren't hitting the pad-Enter key in the index - try 
it somewhere else, such as the query menu or alias menu.


The index had a bug (now fixed in git master) where it would display the 
"key is not bound" message when trying to invoke , because 
 is not actually implemented in the index.


If that fixes it, then also add
  bind index  display-message
to your muttrc.

If not, there may be some logic problem translating to/from the curses 
input.  I thought F## values in curses only went up to 64.  Typically, 
curses should handle keypad-enter and return a special value that Mutt 
would print as .


I'll try to dig into it if that's not the problem.  However, my keyboard 
doesn't have a keypad so I may have some difficulty debugging.  :-)


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Binding Space to select-entry gives Key is not bound.

2021-09-20 Thread Kevin J. McCarthy

On Tue, Sep 21, 2021 at 11:24:56AM +1000, raf wrote:

On Sat, Sep 18, 2021 at 07:28:14PM -0700, "Kevin J. McCarthy"  
wrote:

Do any old timers have an opinion on this?


I guess the difference is whether you
think that a "selection" can only contain a single item
and so the purpose of the selection should be performed
immediately (so display-message makes sense), or
whether a selection can contain multiple items and so
the purpose of the selection might need to be delayed
until the selection process is complete (so tag-entry
makes sense).


Thanks raf, I certainly can't say your opinion is due to a lack of 
experience with Mutt!  However, just to be clear to everyone, my 
opposition to the "tag" interpretation is because of Mutt's current 
usage of .


Menus that allow both single and multiple selection (e.g. alias list, 
file browser, query menu) use tagging for multiple selection and 
 for single selection.  Menus that allow single selection 
(e.g. background-edit list, key selection, postponed list) respond to 
 by immediately using/processing the entry (and usually, 
though not always, exiting the menu afterwards).


I understand that in general the term "selection" can be interpreted 
either way.  But consistent usage within Mutt is important to me, and I 
think is a good design principle.


The default bindings for  are overshadowed by the default 
bindings for  in the index.  But for those who re-bind 
it, I don't think there's a good reason to drastically change its 
behavior in the index, compared to everywhere else in Mutt.  As you 
noted, the way to operate on or select multiple entries in Mutt is 
already well established: via tagging.


Now, there *is* one case where the index is used as a selection menu: 
attaching messages.  Currently that interface forces selection (either 
one or multiple message) via tagging.  One could make an argument 
 could be used in that case for single selection and 
immediately returning.  But it would entail some technical changes to an 
already complicated menu, as well as requiring a *new* keybinding in the 
index.  Since that operation isn't all that common I don't know that it 
would be worth it, but I'd be open for that discussion (on mutt-dev).


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Binding Space to select-entry gives Key is not bound.

2021-09-18 Thread Kevin J. McCarthy

On Sat, Sep 18, 2021 at 04:34:10PM -0700, li...@ifohancroft.com wrote:

Personally, I see a couple of possible solutions for select-message in index:


Thanks for the feedback.

I don't agree with #3, though.  It sounds like you've recently started 
using Mutt and are still adjusting to some of the concepts.  I 
understand the initial confusion, but that's not a justification for 
changing basic functionality around.


#1 is awkward to implement.

So I'm still debating between making  equivalent to 
 or just having it print an error message.


If your expectation wasn't to display the message with this 
function, then perhaps it's better to not make it equivalent to 
display-message, but try to display a more appropriate error message 
instead.


This is exactly what I meant. I think it would be best to not make it 
equivalent to display-message in the index.


Since the function isn't currently implemented, I don't see the harm in 
making them equivalent.  Displaying the message seems the most natural 
interpretation of "selection" in the index when compared to its usage in 
the other menus.


Do any old timers have an opinion on this?

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA



signature.asc
Description: PGP signature


Re: Binding Space to select-entry gives Key is not bound.

2021-09-18 Thread Kevin J. McCarthy

On Sat, Sep 18, 2021 at 12:47:10PM -0700, li...@ifohancroft.com wrote:

I'll make select-entry equivalent to display-message for the next release.


I thought select-entry was supposed to select the message, not open 
it? Sort of like the tag command?


It makes more sense for a temporary menu that provides choices.  For 
example, for the query/alias menus it returns the address, and the 
result is typically appended to the current To/Cc/Bcc address list being 
composed.


Similar for the browser, although it can either select and return a 
mailbox or enter a directory.


The function doesn't appear to be implemented in all menus.  So perhaps 
the intent was not to implement it for menus where you aren't "choosing" 
anything.


If your expectation wasn't to display the message with this function, 
then perhaps it's better to not make it equivalent to display-message, 
but try to display a more appropriate error message instead.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Binding Space to select-entry gives Key is not bound.

2021-09-18 Thread Kevin J. McCarthy

On Sat, Sep 18, 2021 at 12:02:56PM -0700, li...@ifohancroft.com wrote:
I am trying to bind the space key to the `select-entry` function, but 
then when I start mutt and hit the key, I get 'Key is not bound. Press 
'?' for help.


I have this in my muttrc:

bind index  select-entry


Even though select-entry is a generic operation, it's actually not 
implemented in the index.  You'll want to use display-message instead 
for the index.


I'll make select-entry equivalent to display-message for the next 
release.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.3 released

2021-09-10 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.1.3.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is a bug-fix release, fixing some of the fixes in last release. 
IMAP users (and especially QRESYNC users) are again advised to upgrade.


Packagers, if you backported commit 647efbd1 from 2.1.2, please backport 
commit fa2fef46 from this release on top of that.  If you have any 
questions or need assistance please don't hesitate to contact me.


Thanks to everyone who reported problems and helped test for this 
release.


-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA



signature.asc
Description: PGP signature


Re: displaying html links inside mutt

2021-09-10 Thread Kevin J. McCarthy

On Fri, Sep 10, 2021 at 06:23:29PM +, Globe Trotter via Mutt-users wrote:
Thanks, Jon! I had not known bounce before mutt and I do use it when I 
do not have to add any comments. But other than that, can I send 
(forward) the original email as an attachment?


See the $mime_forward config variable to forward an email as an 
attachment.


Alternatively, you can use  ('A') to attach a message to 
an email.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: custom macro for "q" key

2021-08-31 Thread Kevin J. McCarthy

On Mon, Aug 30, 2021 at 07:39:00PM -0700, li...@ifohancroft.com wrote:

Would you mind pointing out where you got that information?  As far as
I know there is no need to do this, but maybe there is a problem I'm
not aware of.


Sorry. I meant to reply to the list.


Posting my reply to his back to the list too.


I'd be happy to.

Apparently, I was wrong and it was not in the manual, but in the Mutt 
Guide: 
https://gitlab.com/muttmua/mutt/-/wikis/MuttGuide/Macros#how-to-use


Under 'Usage: macro menu key sequence [ description ]', right before 
the first example, in the explanation of each part, there is the 
sentence:


"Though you can use the bound keys too, that is not
recommended!"


I see.  Thanks for replying and letting me know.

In this case, I believe they are saying to use the  syntax 
inside the macro, rather than the keys bound to the function.  For 
example, using "" rather than ":", or "" 
rather than "!".


That way, your macros are portable and don't break if you decide to map 
a different key to "" or "" in the future.


I thought there may be something about it, that may create a problem 
in a weird edge case, that if I encounter some day might confuse the 
hell out of me while trying to figure out the cause of, because I 
would have forgotten it by then, so I thought it's easier to just 
unbind the keys first.


I'd be more than happy if it turns out that's not needed.


It certainly didn't cause any problems, but I think you can safely 
remove the unbind before your macro declarations.  :-)


-Kevin

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: custom macro for "q" key

2021-08-30 Thread Kevin J. McCarthy

On Mon, Aug 30, 2021 at 05:28:35AM -0700, li...@ifohancroft.com wrote:
bind index,pager c noop # Unbinding the key first, because the manual 
says that macros shouldn't be bound to keys that are already bound


Would you mind pointing out where you got that information?  As far as I 
know there is no need to do this, but maybe there is a problem I'm not 
aware of.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: custom macro for "q" key

2021-08-30 Thread Kevin J. McCarthy

On Mon, Aug 30, 2021 at 08:55:19AM +0200, Fourhundred Thecat wrote:

 macro   index,pager  c  "?"


Also, see , allowing instead just:
  bind index,pager c browse-mailboxes

This has some small advantages with respect to the 
$browser_sticky_cursor setting.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Preventing Deletion (Detachment) of the Main Message

2021-08-29 Thread Kevin J. McCarthy

On Sun, Aug 29, 2021 at 09:33:01PM -0400, sunnycemet...@gmail.com wrote:
Hello.  The command is detach-file (bound to D by default).  I would 
like to prevent mutt from deleting the main message, as I will 
probably never find myself wanting to invalidate emails this way--but 
I *might* find myself accidentally pressing the wrong keyboard key and 
deleting with no recourse an entire, painstakingly composed message.


Ah, that sucks.  I'm sorry that happened.

Mutt prevents deleting the very last message part, but that doesn't help 
when the message has other attachments.


I'll add a prompt to confirm deleting the main message.

In the mean time, perhaps consider 'bind compose D noop'.  You could 
still manually ':exec detach-file' for the rare cases you need do that.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: disable gpg in mutt

2021-08-29 Thread Kevin J. McCarthy

On Sun, Aug 29, 2021 at 07:27:37PM +0200, Fourhundred Thecat wrote:

how can I show the message source?
ie the message in its encrypted form


You can use the attachment menu, reached by 'v' as the message suggests, 
and then one of the  functions to view a message part.


If you want to view the entire message in raw form, you can use '|' in 
the pager or message index, and pipe it to less, for example.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: disable gpg in mutt

2021-08-29 Thread Kevin J. McCarthy

On Sun, Aug 29, 2021 at 06:49:31AM +0200, Fourhundred Thecat wrote:

Why is mutt still trying to decrypt the message?


Please, reread my responses in this thread:

"you could try recompiling mutt using the '--disable-pgp' and 
'--disable-gpgme' configure options"


Have you reconfigured with both of those options?

"Check the output of mutt -v and look for -CRYPT_BACKEND_CLASSIC_PGP and 
-CRYPT_BACKEND_GPGME in the output."


Do you see *both* of those strings in the output.  Your most recent post 
still showed +CRYPT_BACKEND_CLASSIC_PGP, meaning you haven't disabled 
classic pgp mode (using --disable-pgp).


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: disable gpg in mutt

2021-08-28 Thread Kevin J. McCarthy

On Sat, Aug 28, 2021 at 06:31:12AM +0200, Fourhundred Thecat wrote:

This is strange. I have compiled mutt with "--disable-gpgme", and I can
see that it is no longer linked with the gpg library:

$ ldd /usr/bin/mutt
linux-vdso.so.1
libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
/lib64/ld-linux-x86-64.so.2

But "mutt -v" still shows the CRYPT_BACKEND variables:

$ /usr/bin/mutt -v | grep CRYPT_BACKEND
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
-CRYPT_BACKEND_GPGME


Note the "-" prefix in front of CRYPT_BACKEND_GPGME.  That means it's 
not included.  However classic pgp and smime support are compiled in. 
Those don't rely on the gpgme library.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: disable gpg in mutt

2021-08-27 Thread Kevin J. McCarthy

On Fri, Aug 27, 2021 at 07:33:52AM +0200, Fourhundred Thecat wrote:

On 2021-08-26 18:34, Kevin J. McCarthy wrote:
If that doesn't help, you could try recompiling mutt using the
'--disable-pgp' and '--disable-gpgme' configure options.


Now when I open gpg encrypted message, I get this error:


 [-- PGP output follows (current time: 2021-08-27T07:31:42 CEST) --]
 [-- Error: could not create a PGP subprocess! --]


Double check you are invoking the mutt you reconfigured and compiled. 
Those messages come from a part of the code which isn't compiled when 
configured with --disable-pgp.


Check the output of mutt -v and look for -CRYPT_BACKEND_CLASSIC_PGP and 
-CRYPT_BACKEND_GPGME in the output.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: disable gpg in mutt

2021-08-26 Thread Kevin J. McCarthy

On Thu, Aug 26, 2021 at 08:41:56AM -0700, Will Yardley wrote:

On Thu, Aug 26, 2021 at 03:06:18PM +0200, Fourhundred Thecat wrote:


how can I completely disable gpg integration in mutt ?

If message happens to be encrypted, I would like mutt to simply show me
the source (encrypted).

[...]

I don't know how that happened. I am using gpg on the same account, but
through Thunderbird client. I have Thunderbird set up locally on my
laptop with gpg, and I am using mutt to read messages remotely on the
server. That is why I don't want to use gpg in mutt, so that I don't
have to type my password on the remote server.


Are these traditional PGP (ASCII armored), or MIME encoded messages?

Either way, I think first try checking the "fine" manual (muttrc(5)) for
"pgp_auto_decode", and see if that helps.


If that doesn't help, you could try recompiling mutt using the 
'--disable-pgp' and '--disable-gpgme' configure options.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.2 released

2021-08-24 Thread Kevin J. McCarthy

Hello Mutt Users,

I've just released version 2.1.2.  Instructions for downloading are 
available at <http://www.mutt.org/download.html>, or the tarball can be 
directly downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take 
the time to verify the signature file against my public key[1].


This is an important bug-fix release, fixing a potential data-loss IMAP 
bug.  IMAP users are strongly advised to upgrade.  Sorry everyone, this 
bug has been in there for a while and is my fault.


Packagers, please consider backporting commit 647efbd1 if at all 
possible.  Feel free to contact me with any questions or help in 
backporting.


Thanks to everyone who helped with tickets, patches, and testing!

-Kevin

[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA


signature.asc
Description: PGP signature


Re: prbl w autosaving mail

2021-08-22 Thread Kevin J. McCarthy

On Sun, Aug 22, 2021 at 05:25:17PM +0200, k...@keldix.com wrote:

i am a long time user of mutt,
recently i switched to debian 19 and mutt does not save my resd mail
in ~/mbox - do i need to setup something?
i also tried with no .muttrc


Try adjusting the $move configuration variable.  Mutt 1.5.19 changed the 
default from "ask-no" to "no".


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Faster message body searching

2021-08-20 Thread Kevin J. McCarthy

On Sat, Aug 21, 2021 at 01:49:27AM +0530, Chinmaya Nagpal wrote:

Is there any way to make it faster to do ~b limits in maildir mailboxes?


$thorough_search, set by default, decodes each message before searching 
through it.  You most likely want to do this, but it does slow the 
searching down.


Each message is decoded to a temp file.  You might see some speedup by 
setting $tmpdir to memory, e.g. "/dev/shm", during the search.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: gnutls Cipher-Settings/Syntax

2021-08-20 Thread Kevin J. McCarthy

[Please reply to the mailing list, not directly to me.  Redirecting back to
the mailing list]

On Fri, Aug 20, 2021 at 07:16:56PM +0200, Stefan Rohnke wrote:

Am Fri, Aug 20, 2021 at 09:08:23AM -0700 schrieb Kevin J. McCarthy:
> What is the URL you have Mutt configured to connect to?



https://imap.arcor.de:465 is the url.


Port 465 is the smtps submission port.  I can't get a response from that port
myself.


When I change ssl_cipers to:
ssl_ciphers="NORMAL:+VERS-TLS1.2"
Or every other Parameters i get the following Message:
[2021-08-20 19:13:13] 
gnutls_priority_set_direct(NORMAL:+VERS.TLS1.2:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0):
 Die Anfrage ist ungültig.


"-VERS-TLS1.2" is appended to the string if $ssl_use_tlsv1_2 is unset.
However, by default, that variable is set.  You should check your muttrc to
see if you have unset it somewhere.

-Kevin


signature.asc
Description: PGP signature


Re: gnutls Cipher-Settings/Syntax

2021-08-20 Thread Kevin J. McCarthy

On Fri, Aug 20, 2021 at 03:00:50PM +0200, Stefan Rohnke wrote:

Hello,
I want to configure mutt to receive imap via arcor.de
This Message is in logile:
[2021-08-20 14:56:36] gnutls_handshake: A packet with illegal or unsupported 
version was received.


Sometimes this error occurs if the server is using an old version of TLS 
(1 or 1.1), which are disabled by default in Mutt.  See $ssl_use_tlsv1 
and $ssl_use_tlsv1_1 in the manual.


However, I tried running 'openssl s_client -connect imap.arcor.de:993' 
and it reported TLS 1.2, which should be fine.  What is the URL you have 
Mutt configured to connect to?


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: subject-hook ?

2021-07-29 Thread Kevin J. McCarthy

On Thu, Jul 29, 2021 at 06:33:10PM +0200, Andy Spiegl wrote:

I was expecting that this would work:
send-hook '~s "URGENT"'   'my_hdr X-Priority: 1'


That does work.  Although you'll want to make sure it's turned off in 
other cases by having both lines:

  send-hook ~A  'unmy_hdr X-Priority'
  send-hook '~s URGENT' 'my_hdr X-Priority: 1'


but apparently (acc. to the man page) send-hook only matches the recipients.


A send-hook can't be use to modify the recipients or subject of the 
current email.  But it's fine for changing user headers.  See 
<http://www.mutt.org/doc/manual/#compose-flow> for an overview of the 
composition process.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: toggle-new ... toggle-old ?

2021-07-29 Thread Kevin J. McCarthy
[As an aside, please don't reply to an existing message when creating a 
new thread.]


On Thu, Jul 29, 2021 at 08:17:44AM -0400, hy...@nasalinux.net wrote:

But sometimes I end up with waiting emails flagged with an O .

Is there a single-key command, or a way to create a single-key command,
that will toggle this flag off the same way?


 then 'o' will clear the flag.  You can bind it to a macro 
to make it single-key.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.1 released

2021-07-12 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.1.1.  Instructions for 
downloading are available at <http://www.mutt.org/download.html>, or the 
tarball can be directly downloaded from <http://ftp.mutt.org/pub/mutt/>. 
Please take the time to verify the signature file against my public key[1].


This is a bug fix release, fixing some redraw issues as well as a List 
Menu bug for mbox-style mailboxes.


Many thanks to everyone who filed bug reports and submitted patches!

Thank you,

-Kevin


[1]
My public key is available at:
  - my personal website: https://www.8t8.us/configs/80316BDA.asc.pubkey
  - the mutt website: http://www.mutt.org/keys/kevin.key
  - The keys.openpgp.org network

https://keys.openpgp.org/vks/v1/by-fingerprint/8975A9B33AA37910385C5308ADEF768480316BDA


signature.asc
Description: PGP signature


Re: Can one to a non-mail folder?

2021-06-22 Thread Kevin J. McCarthy

On Tue, Jun 22, 2021 at 08:51:36AM +0100, Chris Green wrote:

I was just wondering why the comands for changing directory in the
browser menu and index menu have different names.


 in the index changes the selected mailbox, while 
 changes the displayed directory in the browser.  I guess 
from a certain perspective they are analogous, but they aren't 
equivalent functions.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Can one to a non-mail folder?

2021-06-21 Thread Kevin J. McCarthy

On Mon, Jun 21, 2021 at 09:56:17PM +0100, Chris Green wrote:
While I'm here what's the difference between  and 
?


A good place to look when writing macros are the tables at: 
<http://www.mutt.org/doc/manual/#functions>


Breaking down the parts of the macro:

 - the change folder prompt in the index menu
?   - starts the file browser (the browser menu)
- changes the current listed directory in the browser menu

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Can one to a non-mail folder?

2021-06-21 Thread Kevin J. McCarthy

On Mon, Jun 21, 2021 at 08:54:08PM +0100, Chris Green wrote:
I want to create a macro to navigate to my "shopping" folder which 
holds directories where I save E-Mails about shopping.


Something like this seems to work for me:
macro index ,cs "?~/mail/shopping"

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.1.0 released

2021-06-12 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.1.0.

Instructions for downloading are available at 
<http://www.mutt.org/download.html>, or the tarball can be directly 
downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take the time 
to verify the signature file against my public key.


This release has new features as well as many bug fixes.  Please see the 
UPDATING file, and also please take a look at the release notes: 
<http://www.mutt.org/relnotes/2.1/>.


Several new features in this release came from external contributors, 
and several last minute (face-saving) fixes came from people helping to 
test.  My grateful thanks to everyone who participated - whether via new 
features, patches, testing, submitting tickets, or helping translate.


Major releases usually have a few issues to shake out, so please let me 
know about any problems you find.  Feel free to report them to our 
gitlab project, or by mailing mutt-...@mutt.org.


Thank you,

-Kevin



signature.asc
Description: PGP signature


Re: Moving from mutt 1.5 to 1.13.2

2021-06-03 Thread Kevin J. McCarthy

On Thu, Jun 03, 2021 at 11:42:25AM -0400, Andrew D. Arenson wrote:

Update:

Setting both of the following solves the first problem: "Encrypted connection 
unavailable"

set ssl_starttls=no
set ssl_force_tls=no


1.13.0 changed $ssl_force_tls to default set.  This was backed out in 
1.13.4.  However, I re-enabled it to default set in the 2.0.0 release. 


Unencrypted connections will need to turn $ssl_force_tls off.

I'm guessing this is related to 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963107, but I don't 
know exactly how. Perhaps my use case of connecting to davmail is 
unusual, or maybe I'm doing something insecure with davmail that I'm 
unaware of. Thoughts about that are appreciated.


That bug report from a CVE fixed in 1.14.3.  The fix was backported but 
then a regression was discovered and fixed in 1.14.5.  I believe Debian 
did backport the regression fix too.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: mailcap sanitization sanitizing too much...

2021-05-25 Thread Kevin J. McCarthy

On Tue, May 25, 2021 at 11:32:32AM +0800, Philippe Meunier wrote:
So would it be possible to change the sanitization so that it restricts 
file names to Unicode alphanumeric characters (plus a few other safe 
characters) rather than just ASCII alphanumeric characters?


There was a similar request a month or so ago, and I added a couple 
commits to git master hopefully addressing this.  The Mutt 2.1 release 
should be in about three weeks, or you are welcome to try to build from 
git.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Customizing "previous message" in reply editor

2021-05-05 Thread Kevin J. McCarthy

On Wed, May 05, 2021 at 11:29:58AM -0700, Joshua Vander Hook via Mutt-users 
wrote:

I'm trying somewhat successfully to use markdown to format my emails.
The method was covered here:
https://unix.stackexchange.com/a/108809/22520


You may also want to look at $send_multipart_alternative and 
$send_multipart_alternative_filter.  See the second half of 
<http://www.mutt.org/doc/manual/#alternative-order>.  There is a 
contrib/markdown2html script which might be a possible starter filter 
script.



One possible workaround is changing the way Mutt pre-populates the stuff
below my message (the On   wrote: things) to include a
 tag.


You can include a "\n" in $attribution if you want, e.g.
  set attribution = "On %d, %n wrote:\n"

Appending is a little trickier.  Perhaps:
  unset sig_dashes
and then have your signature file include the /pre and sigdashes:
  
  --*space*
  your signature

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.0.7 released

2021-05-04 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.0.7.

Instructions for downloading are available at 
<http://www.mutt.org/download.html>, or the tarball can be directly 
downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take the time 
to verify the signature file against my public key.


This release fixes several bugs, including a $imap_qresync bug.  If you 
use that feature, please do upgrade.


Thanks to everyone who reported issues, helped test, and contributed in 
all the various ways that help keep this project going!


-Kevin


signature.asc
Description: PGP signature


Re: Opening multipart/related (was: HTML email?)

2021-04-14 Thread Kevin J. McCarthy

On Wed, Apr 14, 2021 at 06:28:13PM +0200, Andy Spiegl wrote:
Do you know a way how to open the whole multipart/related and send it 
to a browser?


Christian Ebert has a utility, viewhtmlmsg, that may work for you.  (I 
haven't tried it myself, though).


<https://hg.phloxic.productions/muttils/file/>.  See the 
contrib/example-muttrc for invocation.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: connection to dovecot times out about every ten minutes

2021-04-13 Thread Kevin J. McCarthy

On Tue, Apr 13, 2021 at 10:09:32AM +0200, Marco Fioretti wrote:

imap_poll_layout was not set in my murttrc file.


If not set, it defaults to 15 seconds.


Setting it to 0, which according to manual should disable it, just
made mutt freeze


Setting it to 0 turns off the polling.  So Mutt is sending the 
IDLE/NOOP/STATUS and trying to read the response, without polling the 
connection first.


If Mutt freezes in that case, then the connection to dovecot has died.


set imap_poll_timeout = 600 made it freeze too, but eventually
recovered, and had to reopen the inbox


Setting it to 600 means Mutt will wait 10 minutes for a response from 
the server before declaring the connection is dead and trying to 
reconnect.  If it then reopened the mailbox, that also means the 
connection to dovecot died.



Launching mutt with the -d 2 option did not produce anything visible.
Where should debug messages appear, btw? In mutt itself, or in some
log file? What could I try next?


This flag produces a file ~/.muttdebug0 in your home directory with 
debugging output, including IMAP commands sent and received.


Perhaps you can compare that and the dovecot log, and see if you can 
find out why all the "logged out" messages are appearing.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Imap folders not listed in the sidebar

2021-04-12 Thread Kevin J. McCarthy

On Sun, Apr 11, 2021 at 09:43:24AM -0600, John Niendorf wrote:
I wanted to save a message I received. So I pressed s and was asked 
where I wanted to save the message.  I chose to create a new folder 
called TurboTax.  My question is what do I need to do for this new 
folder to appear in my sidebar?


In my .muttrc file I have:



set imap_check_subscribed


imap_check_subscribed will cause folders marked as "subscribed" on the 
IMAP server to be added to the "mailboxes" list automatically.  That 
list is used to display folders in the sidebar, among other things.


It sounds like "TurboTax" is not marked as subscribed on the IMAP 
server.



set imap_list_subscribed


Enabling this option will cause Mutt to *only* list subscribed folders 
when you browse folders (e.g., using  and then '?').  You 
may need to then type 'T' () to show the new TurboTax 
folder.


Once you see the TurboTax folder, you can type 's' () to mark 
the folder as subscribed on the IMAP server.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: connection to dovecot times out about every ten minutes

2021-04-12 Thread Kevin J. McCarthy

On Mon, Apr 12, 2021 at 05:13:10PM +0200, Marco Fioretti wrote:

after years when everything worked without a hitch, mutt started to
say "connection timed out" every ten minutes or so when connected to
my remote dovecot imap server. I would need help to figure out where
the problem is, on the client or server side, and then how to fix it.
Details already are in the dovecot mailing list here
https://dovecot.org/pipermail/dovecot/2021-April/121897.html


The default value of $timeout is 10 minutes.  At that time, Mutt would 
typically sent a STATUS command to check for new mail in your mailboxes.


Starting with version 1.9, Mutt added polling for IDLE, NOOP, and STATUS 
commands to check for a dead connection.  It sends the command and then 
waits $imap_poll_timeout seconds for a response from the server.


You might try increasing $imap_poll_timeout and seeing if that helps.

If not, you could enable debug output, using "-d 2", and see if that 
provides any clues.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Send automated GPG signed mail from cron job

2021-04-12 Thread Kevin J. McCarthy

On Mon, Apr 12, 2021 at 09:50:59AM +0200, Tom wrote:
I am trying to use a GnuPG key without a passphrase to send *signed* 
mails from a cron job for some non-critical, internal reporting. 
Searching the archives did not give me the answer.


Sorry, cryptographic operations are disabled in batch mode.

I thought I had added a note to the manual about this, but I only see it 
in the "batch composition flow" section (in git).  I'll add a note to 
the "encryption and signing" section too.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Is there any way to customise sorting of directories in the index?

2021-04-10 Thread Kevin J. McCarthy

On Sat, Apr 10, 2021 at 12:17:39PM +0200, Rene Kita wrote:
Additionally I have the following macro to make the folder browser 
always show the configured mailboxes:

macro index c "?" "open a different folder"
macro pager c "?" "open a different folder"


 was added in Mutt 1.13 and is bound by default to 
'y'.  Using the function has the advantage of working properly with 
$browser_sticky_cursor.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: signature and alternates

2021-04-07 Thread Kevin J. McCarthy

On Wed, Apr 07, 2021 at 01:52:44PM +0100, Steve Karmeinsky wrote:
The only thing not working properly is setting the signature back to 
normal after replying to an alternate.


I didn't see how you overrode the signature, so I can only guess it's 
something like:


  reply-hook  ."set signature=~/.sig-default"
  reply-hook  "~C alias1"  "set signature=~/.sig-alias1"
  reply-hook  "~C alias2"  "set signature=~/.sig-alias2"
  ...

It can be helpful to look at 
<http://www.mutt.org/doc/manual/#compose-flow> when adjusting these 
things.  Looking at that, you can see reply-hooks fire first, then 
send-hooks, and then three steps below the message and signature are 
generated.


So, replies not covered by one of the aliases will set the signature
back to default, but non-replies still need to reset back.

send-hooks can use the pattern !~Q to be invoked in the non-reply 
case, so you could try adding:


  send-hook  !~Q   "set signature=~/.sig-default"

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: S/MIME stopped working

2021-04-07 Thread Kevin J. McCarthy

On Wed, Apr 07, 2021 at 12:36:53PM +0100, isdtor wrote:

My S/MIME setup has died one from day to the next and I cannot find out why.

Symptom: trying to send e.g. signed email, the result is

error signing data: No CRL known?


This an error coming back from GPGME when trying to perform the sign 
operation.


TBH this looks more like a gpg than a mutt problem, and I haven't 
figured out how to debug this. Same error for encrypting.


Yes, it sounds like something changed with either the GPGME version, or 
perhaps a configuration file.  I can't offer much advice except to check 
those things. :(


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Automate standard replies

2021-03-27 Thread Kevin J. McCarthy

On Sat, Mar 27, 2021 at 08:19:51PM +0100, Andy Spiegl wrote:

I just noticed an interesting detail - or is it a bug?

When I run  in the attachment menu
mutt behaves like  and only pipes the selected part.


 isn't defined in the attachment menu, only  
is.  You can check this by trying to run ":exec pipe-message" in the 
attachment menu.


However, internally they are bound to the same op-code (OP_PIPE).  So in 
some cases, such as the push or macro commands, you can get away with 
using either.  This is because push/macro try to tokenize 
angle-bracketed functions and convert them to an op-code in a 
menu-agnostic manner; the whole string, including ops are then buffered 
and executed later.


OTOH, exec only accepts function arguments, so it looks them up using 
the active menu.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Colorizing index lines that match two patterns

2021-03-25 Thread Kevin J. McCarthy

On Thu, Mar 25, 2021 at 03:09:56PM -0600, Akkana Peck wrote:

"~N ~X 1-"
~N ~X 1-
"~N && ~X 1-"
"~N" "~X 1-"

but they all gave syntax errors.


For me,
  color index red white "~N ~X 1-"
works and gives no syntax errors.


"~N ~X 1-
Is this a bug?


It's semi-intentional.  Mutt's just automatically terminating the last 
argument for you at the end of the line.



Even better, is there a way I could have a rule that sets just the
foreground or just the background? E.g. if I could say

color indexbrightbluedefault  "~N"
color indexdefault   white"~X 1-"

and a message that was both new and had attachments would take the
foreground color from the first rule but the background color from
the second rule?


No, Mutt matches a single rule and uses that to color the line.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: /etc/mime.types is ignored

2021-03-18 Thread Kevin J. McCarthy

On Wed, Mar 17, 2021 at 10:46:28PM +0100, Andy Spiegl wrote:

PS: I'm using the Ubuntu package: 1.13.2-1ubuntu0.4



$ mutt -v
Mutt 2.0.0 (2020-11-07)
Configure options: '--prefix=/usr/local'


I suspect you have two version of mutt installed.  Try running `which 
mutt` and see if it's finding another one in your path at 
/usr/local/bin.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Attachment flag

2021-03-11 Thread Kevin J. McCarthy

On Thu, Mar 11, 2021 at 05:21:43PM -0500, Misha Velthuis wrote:
The only thing that I haven't been able to fix, is the fact that - in 
this version of mutt - the indexer does not show the number of 
attachments (or attachments yes/no) anymore. It just shows "0" or "-", 
even when an email actually does have attachments.



`set index_format="%4C %Z %?X?A&-? %-13.19{'%y %a %b %d %H:%M} %-20.20L 
(%?l?%4l&%4c?) %s"`


"%?X?A&-?" is going to print either 'A' or '-'.  I'm assuming you are 
seeing only "-"?


In order to get attachment counting working, you *may* need to define 
some attachment settings.  Take a look at 
<http://www.mutt.org/doc/manual/#attachments> for the details.


However, the default system Muttrc that ships with Mutt does have some 
basic attachment settings already.  These are listed starting about 
halfway down in 
<https://gitlab.com/muttmua/mutt/-/blob/master/doc/Muttrc.head>


You can see the current settings Mutt knows about by running 
":attachments ?" and hit enter.


You may want to check what is installed for your system Muttrc file. 
Perhaps it's missing those settings.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


mutt 2.0.6 released

2021-03-06 Thread Kevin J. McCarthy

Hello Mutt Users,

I'm pleased to announce the release of version 2.0.6.

Instructions for downloading are available at 
<http://www.mutt.org/download.html>, or the tarball can be directly 
downloaded from <http://ftp.mutt.org/pub/mutt/>.  Please take the time 
to verify the signature file against my public key.


This release fixes a few small bugs and cleans up the abort behavior in 
a couple prompts.


Thank you to everyone who reported the issues, provided fixes, and 
helped test.


-Kevin


signature.asc
Description: PGP signature


Re: group and alias

2021-03-01 Thread Kevin J. McCarthy

On Mon, Mar 01, 2021 at 01:32:47AM -0500, Jon LaBadie wrote:

And where/how do you use the group rather than the alias?


Groups are used in patterns.  See the modifiers starting with '%' in 
<http://www.mutt.org/doc/manual/#patterns>.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Background edit in new terminal window

2021-02-20 Thread Kevin J. McCarthy

On Sat, Feb 20, 2021 at 09:30:00AM +0100, Jakub Jindra wrote:
If you're familiar with tmux you can try solution from [1]this github 
issue.

I believe this should work with mutt as well.


No need for that, for mutt 1.14.0+.  See 
<http://www.mutt.org/doc/manual/#bgedit> and the 
contrib/bgedit-screen-tmux.sh script for screen/tmux.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Background edit in new terminal window

2021-02-20 Thread Kevin J. McCarthy

On Sat, Feb 20, 2021 at 12:54:46PM +0530, Chinmaya Nagpal wrote:
I'd like to be able to launch an editor in a new terminal window and 
continue browsing my emails, like the contrib/bgedit-detectgui.sh 
script does but with my editor wrapped in a terminal window instead of 
with gvim.


My editor is nvim and my terminal is alacritty.


I don't use that terminal (or editor), but usually a terminal doesn't 
detach when you run it.  So you could try:


  set background_edit
  set editor = "alacritty -e nvim"

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Deleting old maildir messages, is what I'm doing OK?

2021-02-15 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 10:12:50AM -0800, Felix Finch wrote:

On 20210215, Kevin J. McCarthy wrote:

once in a while you may want to regenerate your header caches.


Is there any way to do that from the command line?


You could write a script, I guess, something like:

cd $header_cache_dir
rm -f *

cd $mutt_folder_dir
for mb in *; do
  mutt -e 'set quit=yes; push ""' -f $mb
done


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Deleting old maildir messages, is what I'm doing OK?

2021-02-15 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 06:03:20PM +, Chris Green wrote:

Is that mutt's header caches?


Yes, that's what I meant to say. :)

If so I don't tend to leave mutt running all the time, I assume it 
refreshes things whenever it's started does it?


Unfortunately, for header caches, "refreshing" doesn't include removing 
no longer existing messages from the cache.  It just means the header 
cache will slowly grow, even though you are trimming the mailbox 
externally.  Not the end of the world, but at a certain point the cache 
will lose some efficiency by sheer size.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Deleting old maildir messages, is what I'm doing OK?

2021-02-15 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 04:21:11PM +, Chris Green wrote:

I currently have the following two lines in my crontab to delete old
mails in my junk catching directories, is it OK/safe to do it like
this?

   20 02 * * * find /home/chris/mail/Ju/*/cur -type f -mtime +7 -exec rm {} \;
   30 02 * * * find /home/chris/mail/Ju/*/new -type f -mtime +7 -exec rm {} \;


That should be fine.  The only caveat is header caching.  If you delete 
messages outside of mutt, those messages won't be removed from the 
header cache.  Probably not a big deal for "junk catching" folders, but 
once in a while you may want to regenerate your header caches.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Macro to apply on current mailbox

2021-02-15 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 10:35:25AM +0100, Angel M Alganza wrote:

# Need to upgrade to > 1.8.0 (setenv)
folder-hook . 'set my_folder=$folder;set folder="XXX";set visual=^'
folder-hook . 'setenv MYSYNCFOLDER $visual'
folder-hook . 'set folder=$my_folder'
macro index \! "!/usr/bin/mbsync \$MYSYNCFOLDER\n"


You've overridden , bound to '!' by default, with your 
macro.  But then you are trying to use '!' inside the macro.  That's a 
loop - instead of calling  you are calling your macro 
inside the macro.


Try (untested):
  macro index \! "/usr/bin/mbsync \$MYSYNCFOLDER\n"

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Background editing

2021-02-14 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 06:16:18AM +0100, Angel M Alganza wrote:
If I understand correctly, I allows you to compose email in an editor 
on another tmux window (or screen or graphical editor, but I don't use 
those), forking it out of Mutt.  I guess that Mutt would then be free 
to use to, for example, check another email, while still composing in 
the forked window, or maybe even start composing a new email on a third 
window?


Yes, that's right.

I've tried it out with the bgedit-screen-tmux.sh script, but it fails. 
I think the problem is that the Mutt version I'm running is a bit old 
(1.10.1).


Background editing was added in version 1.14.0.  A concise list of new 
features by version is at 
<https://gitlab.com/muttmua/mutt/raw/stable/UPDATING>.  More verbose 
descriptions of notable features can be found under 
<http://www.mutt.org/relnotes/>.


is there any pre-compiled binary I could use before trying to compile 
it myself?


I don't know if Devuan is package-compatible with Debian, but I believe
Debian has backported 2.0.2 into buster-backports.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Quoting character when replying

2021-02-14 Thread Kevin J. McCarthy

On Mon, Feb 15, 2021 at 03:55:35AM +0100, Angel M Alganza wrote:
At some point I must had done something that changed that behaviour to 
prepend it with just the greater sign (>) without the following space.


It looks like you have enabled $text_flowed.  That overrides the value 
of $indent_string.  You can read a bit more about it at 
<http://www.mutt.org/doc/manual/#ff>, but you'll want to do more 
research if you intend to compose format=flowed emails.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Dead url, returning 404 in wiki under configlist/Configs

2021-02-12 Thread Kevin J. McCarthy

On Fri, Feb 12, 2021 at 02:25:44PM +0530, Bhaskar Chowdhury wrote:

Please take out the dead url from the Configlist page under Configs


Thanks, I've removed the dead link.

Note, to anyone else: although the wiki is not directly publicly 
editable, you can clone the https://gitlab.com/muttmua/wiki repos and 
submit a merge request too.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: [unixbhas...@gmail.com: Notify-send pop up for specific mails]

2021-02-12 Thread Kevin J. McCarthy

On Fri, Feb 12, 2021 at 09:59:38AM +0530, Bhaskar Chowdhury wrote:
The problem it pops up for every new mail arrive. All I need to know 
about when I am in the TO or CC field or received mail from some 
specific individuals, then only the notify send pop up.


Any clue? I saw some rexexes but couldn't figure out how to apply them. 
More over is there any "in-built" way of getting that??


No, $new_mail_command doesn't provide anything sophisticated.  It 
operates at the same time as $beep_new - running when Mutt detects new 
mail in the open mailbox or any of the monitored mailboxes.


For more sophisticated notification, you'll need to use another tool.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Gmail - no authenticators available

2021-02-09 Thread Kevin J. McCarthy

On Tue, Feb 09, 2021 at 10:18:08PM +0100, Øyvind A. Holm wrote:

Using Mutt 1.10.1 (2018-07-13). Yes, it's kinda old and I've tried to
compile a newer Mutt, but modern Mutts won't work properly with Gmail.
When I send to my Gmail address, the mail doesn't appear in my inbox,
only in Sent.


You might trying setting $fcc_before_send and see if that solves it.

Alternatively, check if there is a GMail setting to disable automatic 
saving to "Sent Items" when you use their SMTP server.


I suspect fcc'ing after sending (which Mutt 12.0 switched to), GMail is 
ignoring the Fcc copy to a mailbox when the SMTP server has already 
stored the message in "Sent Items".


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Gmail - no authenticators available

2021-02-09 Thread Kevin J. McCarthy

On Tue, Feb 09, 2021 at 01:10:17PM -0500, Rob Pyott wrote:

Still getting “no authenticators available” with Gmail.  I’ve adapted the 
muttrc per suggestions — see below.  Welcome further tips!  :)

# to fix "no authenticators available" issue
set smtp_authenticators = 'gssapi:login'


I think it's better to leave smtp_authenticators unset, unless you have 
a specific reason to set it.


There was a thread a couple weeks ago about the same issue on MacOS: 
http://lists.mutt.org/pipermail/mutt-users/Week-of-Mon-20210118/002347.html


The SMTP connector relies on SASL entirely for authentication.  It 
sounded like there was an issue with the MacOS SASL libraries.  Perhaps 
that thread might help, or someone on that thread has more information 
about the problem now.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: trouble making my "messages needing a reply" pattern

2021-02-07 Thread Kevin J. McCarthy

On Mon, Feb 08, 2021 at 12:49:32PM +1100, Cameron Simpson wrote:

I've winnowed my failing pattern down to

   ~( !~>(~P) )

which is not accepted. A bare:


I think this is from a small bug with trailing whitespace inside 
parentheses.  Try

  ~(!~>(~P))

I'll work on fixing that quirk.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Placing Sent Emails in Folders

2021-02-05 Thread Kevin J. McCarthy

On Fri, Feb 05, 2021 at 10:25:50AM -0800, Kevin J. McCarthy wrote:
Also, make sure to put the above command in single quotes, to ensure 
'^' is expanded when the hook fires:

 folder-hook !INBOX 'set record=^'


Err... nevermind, that's not right.  8-)  It's still a good habit to put
the command in single quotes, but the ^ won't be expanded early.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Placing Sent Emails in Folders

2021-02-05 Thread Kevin J. McCarthy

On Fri, Feb 05, 2021 at 10:11:45AM -0800, Kevin J. McCarthy wrote:

On Thu, Feb 04, 2021 at 01:48:09PM +0100, Michael Klemm wrote:

.muttrc:



folder-hook !INBOX set record=^


Also, make sure to put the above command in single quotes, to ensure '^' 
is expanded when the hook fires:

  folder-hook !INBOX 'set record=^'

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


<    1   2   3   4   5   6   7   8   >