Re: [OT-ish] Want command line program to selectively delete emails
Answering late: * Ed Blackman , 2023-08-04 14:34:44 Fri: > Any suggestions for a command line program to select emails for > deletion based on command line options? I specifically want one > that can remove emails that were received more than X days ago, but > can also express "but don't delete if they're flagged". [...] > > When I recently upgraded to Debian 12, I found that archivemail has > been removed from Debian because it's an unmaintained Python 2 > program. I went through the same realization some time ago. Checking my configuration, I see that I have replaced archivemail with mail-expire: https://manpages.debian.org/bookworm/mail-expire/mail-expire.1.en.html It does not seem to support your requirement to avoid deleting flagged messages, sadly, but this might be useful to others looking to move off archivemail. -- David Haguenauer
Re: It's still 2020. :-(
Hi Alan, * Alan Mackenzie , 2021-01-04 12:59:34 Mon: > I'm now seeing dates from 4 January as 2021, those of 3 January and > before as 2020. It is almost as though some piece of software thinks the > year begins on 4th Jan, not 1st Jan. > > Here's a short section of my inbox, with mails from various time zones > straddling midnight: > > 164997 Os3 Jan 2020 Michael ( 92 / 3.5K) └─> > 164998 N 4 Jan 2021 Dr Rainer Woito ( 45 / 1.4K) └─> It looks almost as if you have a date display format that uses the year from the Posix week, instead of the year from the day. Indeed, week 53 of 2020 ended on Jan 3; today, Jan 4, starts week 1 of 2021. Perhaps check for a custom display format? -- David Haguenauer signature.asc Description: PGP signature
Re: Remove my alias emails from CC lists.
Hi Brandon, * Brandon Amos ba...@cs.cmu.edu, 2015-04-08 09:33:46 Wed: I forward many email accounts to a primary email account. When I group-reply to emails sent to my non-primary account, the other account is (reasonably) added to the CC list. Is there a way to ignore a set of emails when I group-reply so my aliases aren't added to the CC list? You can use the `alternates' command to tell Mutt about e-mail addresses that are yours. Once this is done, group-reply should properly avoid sending to your addresses. -- David Haguenauer pgpj_PpyZZJN8.pgp Description: Digital signature
Re: Can not delete attachements
Hi, * Brian Salter-Duke brian.james.d...@gmail.com, 2015-02-21 07:11:58 Sat: I am receiving emails from a colleague that have the following attachements:- 1 [ 10M] no description7bit multipart/alternative [...] 9 [ 7.2K] smime.p7s base64 application/pkcs7-signature I can save the docx and pgf files, but having done so, I want to delete them from the email, which of course I want to save. However it will not let me. It is something to do with the smime.p7s signiture. Presumably, Mutt doesn't let you delete attachments because doing so would render the signature invalid. If you don't care about breaking signatures, and would rather be able to delete attachments no matter what, I have a patch: http://www.kurokatta.org/hacks/src/mutt-1.5.13-rmattach.patch It was meant for PGP-encrypted messages; hopefully it works for S/MIME as well. -- David Haguenauer pgpSuzoucWI8X.pgp Description: Digital signature
Re: Date: header line
* Derek Martin inva...@pizzashack.org, 2014-06-13 14:57:59 Fri: On Fri, Jun 13, 2014 at 08:33:21PM +0200, Matthias Apitz wrote: for example 'To:' and 'Subject:', I do not see how to configure the exact form of the 'Date:' header. Is this configurable somehow and if not, what defines the time format, either as 'local time +0200' (for Germany) or as 'UTC time +'? The date must conform to RFC (2)822 date format, so it is not configurable. The timezone is determined by your system's time configuration. Correct. It should also be possible to override the system timezone by setting TZ (e.g., run `TZ=America/Montreal mutt' to pretend to be out of Germany). -- David Haguenauer pgp8Eyq6aiUvz.pgp Description: Digital signature
Re: multiline input for fields: To/CC
Hi Eugene, * Eugene Dzhurinsky jdeve...@gmail.com, 2014-02-11 16:56:41 Tue: From time to time I need to either send an email to a group of people, or respond to such group e-mails. And every time I want to review the list of recipients - I need to scroll to the right. [...] I looked through the documentation and didn't find any option to set displaying of To/CC fields to multiline mode. I don't know of a way to do exactly what you ask, but, in similar circumstances, I resort to calling edit-headers (bound to `E' by default) from the sending screen. Then I'm thrown back into my text editor, where I can see each To: and Cc: member neatly expanded on its own line. -- David Haguenauer pgpOw3EgeX36A.pgp Description: Digital signature
Re: Sending attachments without crypt_autosign
* Stefan Wimmer swim...@xs4all.nl, 2013-03-01 13:31:26 Fri: * Will Fiveash will.five...@oracle.com [2013-03-01 00:14]: On Thu, Feb 28, 2013 at 05:03:23PM -0600, Will Fiveash wrote: On Thu, Feb 28, 2013 at 03:35:44PM -0500, David Haguenauer wrote: I patched my copy of mutt so that it will let me delete attachments Thanks for the idea. I've attached a patch Thank you very much David (for the initial idea) Will (for creating that patch)! It works perfectly B-) Wow, I sure am happy, and surprised, to find out that I'm not the only one to find it useful to knowingly break e-mail signatures. By the way, my simplistic version of the patch (attached) was slightly different. I didn't try the new patch, and it's not as if anyone is trying to get it merged into the official code base, but there is a chance it will allow the user to try deleting attachments from encrypted (rather than just signed) messages, which is likely to fail. Regarding the discussion that diverged from this thread, a topical xkcd strip, posted yesterday: PGP http://xkcd.com/1181/ -- David Haguenauer --- orig.recvattach.c Tue Nov 28 16:27:34 2006 +++ recvattach.c Tue Nov 28 16:56:00 2006 @@ -1087,7 +1087,7 @@ } #endif -if (WithCrypto hdr-security ~PGP_TRADITIONAL_CHECKED) +if (WithCrypto (hdr-security ENCRYPT)) { mutt_message _( Deletion of attachments from encrypted messages is unsupported.); pgpmkLsqIGZ8O.pgp Description: Digital signature
Re: Sending attachments without crypt_autosign
* Stefan Wimmer swim...@xs4all.nl, 2013-02-28 12:55:39 Thu: I recently started to sign all my mails and it took me little time to find out that you can't delete attachments in signed/encrypted mails ... ;-) I patched my copy of mutt so that it will let me delete attachments from encrypted messages (breaking the signature along the way). I can try to find said patch if there is some interest (it's a one-liner). -- David Haguenauer pgptU6VAS7xj2.pgp Description: Digital signature
Re: Stupid reply tricks
Hi John, * John Long codeb...@inbox.lv, 2012-08-12 14:01:37 Sun: [...] I don't understand why I get a prompt when replying to messages with set fast_reply=yes [...] I get a message Reply to so-and-so? It looks like you want the `reply_to' quadoption set to `yes' or `no' rather than the default `ask-yes': If set, Mutt will ask you if you want to use the address listed in the Reply-To: header field when replying to a message. If you answer no, it will use the address in the From: header field instead. This option is useful for reading a mailing list that sets the Reply-To: header field to the list address and you want to send a private message to the author of a message. Personally, I like to be asked about funky Reply-To headers, but the setting exists so that you can tune Mutt to your own idea of what's best :o). -- David Haguenauer pgpV1U1M4FmTp.pgp Description: Digital signature
Re: Stupid reply tricks
* John Long codeb...@inbox.lv, 2012-08-12 15:01:17 Sun: On Sun, Aug 12, 2012 at 10:39:17AM -0400, Patrick Shanahan wrote: Without *any* research, I'll hazzard a guess that fast_reply will only work when the recipient is unambiguous. I hear you. I think that's it, but I haven't figured out why it is in certain cases and not othersIOW what is the common denominator. Well, in my experience, people and lists rarely set Reply-To: that could explain why you do not get the prompt very often. I sent an e-mail your way, with Reply-To set, so you can try out the different values of reply_to. -- David Haguenauer pgpyGJwLlktoI.pgp Description: Digital signature
Re: can't read attached file docx
* Marcelo Laia marcelol...@gmail.com, 2012-04-25 08:25:06 Wed: 2012/4/24 Gerard ROBIN g.rob...@free.fr: When I receive a message with a attached .docx file, sometime I can read it with libreoffice and sometime I get: [Sometimes, Gérard gets No matching mailcap entry found.] Sometime I got the same problem here. However, I see that I only get this issue when libreoffice is already running! I believe this is a different issue. What probably happens in your case is that, when Mutt starts LibreOffice, it blocks until LibreOffice returns (probably when you close it), after which Mutt destroys the temporary file it created for the e-mail attachment. On the other hand, if LibreOffice is already running, Mutt's call does not start a new instance; rather, the second invocation returns very quickly after forwarding the filename to the existing LibreOffice instance: there is a race condition between Mutt (that deletes the attachment file) and LibreOffice (that tries to open it). -- David Haguenauer pgpo34TnfF9jc.pgp Description: Digital signature
Re: bouncing a message
* gt codere...@gmail.com, 2011-10-29 21:45:24 Sat: When bouncing a message received from someone to someone else, is it supposed to change the From: header to my email id? No, only the envelope From, as Cameron mentioned, but if you're sending through Gmail's servers, I wouldn't be surprised to learn that they rewrite From: to use either that account or an alternate address that you've registered with them. -- David Haguenauer pgpJFj6CcGW8J.pgp Description: Digital signature
Re: bouncing a message
* Leo Vegoda l...@bind.org, 2011-10-29 16:34:06 Sat: On Sat, Oct 29, 2011 at 07:24:33PM -0400, David Haguenauer wrote: if you're sending through Gmail's servers, I wouldn't be surprised to learn that they rewrite From: Gmail sets the bouncer's address as Sender but does not change the From: header. OK, in that case, the problem must be elsewhere. A quick web search, however, indicates that Gmail's behavior has varied over time, so I would still consider them a potential culprit. -- David Haguenauer pgpHQEkk3Jnbj.pgp Description: Digital signature
Re: renaming temporary files
Hi Pau, * Pau vim.u...@googlemail.com, 2011-02-17 16:48:16 Thu: Sometimes the connection breaks and then I have to dig into the tmp directory where the file was created. You can probably work around this problem by running mutt from within screen. Then you only need reattach to your screen session when your connection comes back up: Mutt and Vim will be just in the state you left them. http://www.gnu.org/software/screen/ -- David Haguenauer pgpmASjuE2P2V.pgp Description: PGP signature
Re: mailboxes
Hi Ken, * Ken Stevens kens7...@gmail.com, 2010-12-26 19:26:13 Sun: It is my understanding that when I change mailboxes it should cycle through the ones with new mail. This is not happening. So, what am I doing wrong? A similar-sounding question was asked a few weeks ago: http://www.mail-archive.com/mutt-users@mutt.org/msg42239.html I hope this solves your problem, otherwise, please post more information so we can tell which kind of unexpected behavior you observe. -- David Haguenauer pgpp3N5NQVmiX.pgp Description: PGP signature
Re: mailboxes directive not working correctly
* emmanuel_mays...@lynceantech.com emmanuel_mays...@lynceantech.com, 2010-11-19 12:01:46 Fri: On 09:26 Fri 19 Nov , emmanuel_mays...@lynceantech.com wrote: When I change mailbox (with c), mutt goes successively to my 2 FIRST mailboxes directives. But doesn't go to the 3rd, 4th, etc Actually, mailbox 1 and 2 round robin. When I expect to switch to mailbox 3, I am actually redirected to mailbox 1. Oh. After you are shown a mailbox name, press space to cycle through mailboxes that have new mail. On my system, just hitting `c' shows the first non-open mailbox with new mail. -- David Haguenauer pgpcHXXaF4V7W.pgp Description: PGP signature
Re: Using Find, Exclude one mailboxes folder
Hi, * rog...@sdf.org rog...@sdf.org, 2010-07-14 21:01:01 Wed: How can I exclude one folder from my mailbox list using a find pipe? muttrc: mailboxes `find ~/.maildir/ -type d -name cur -printf '%h '` [...] To clarify, I only want to omit my /home/roger/.maildir/.roger folder and not my other folders such as /home/roger/.maildir/.rog...@isp.net folder(s). I'd use grep; something like the following: find ~/.maildir/ -type d -name cur -printf '%h ' | grep -v '\.roger/' (Adapt the regexp depending on how strict you need to be.) -- David Haguenauer pgpX0rewUqfn6.pgp Description: PGP signature
Re: Using Find, Exclude one mailboxes folder
* rog...@sdf.org rog...@sdf.org, 2010-07-14 23:26:53 Wed: On Thu, Jul 15, 2010 at 08:06:17AM +0200, David Haguenauer wrote: I'd use grep; something like the following: find ~/.maildir/ -type d -name cur -printf '%h ' | grep -v '\.roger/' I just tried both of these, and they don't filter using the grep -v. If I'm not mistaken, find within the above incantation, finds every dir with a subfolder named cur, as such, the grep -v filter is simply ignored ... because find already passed every folder on one line instead of multiple lines with a newline at the end of each folder. Absolutely. I guess that shows how hard I tested my code before posting it ;o). I'm sure you have found a command that actually solves your problem by now. -- David Haguenauer pgpAPdMuZC9bo.pgp Description: PGP signature
Re: searching in search results
Hi, * lee [EMAIL PROTECTED], 2008-11-19 20:36:43 Wed: is it possible to somehow search within search results? For example, if I want to find a message of which I know the From: header and a word or some words of the body, how do I find it when going by either the From: line or the body only would give too many results? I recommend Mairix as well, but otherwise you can simply use a more complex search pattern, such as `~fuser~bword', where `user' and `word' stand for the strings you are looking for. This pattern will only match messages that are both from `user' and contain `word'. -- David Haguenauer pgpQlaXhgp7Wk.pgp Description: PGP signature
Re: Customize To: field
* Michael Elkins [EMAIL PROTECTED], 2008-11-17 21:46:02 Mon: On Mon, Nov 17, 2008 at 09:32:52PM -0800, Brendan Cully wrote: Seems fine. Does anyone object? I think this makes sense. The user is already requesting that it be displaying this way in the index, so it should not be a problem to display it this way when replying. I was about to suggest making the To: change conditional on the value of a configuration variable, because reverse aliases may be used to reply to people who don't know how to spell their own name properly, and we may want to keep that kind of fix private. But then I noticed that the reverse-alias name is already being used in attribution lines, leaking the local alias to the recipient, so that adding it to the To header as well does not change the situation much. So, unless someone else advocates in favor of an extra configuration variable controlling this behavior, I guess I consider this change acceptable. -- David Haguenauer pgpaoJnY1fAF9.pgp Description: PGP signature
Re: sync mailbox
* Albert Shih [EMAIL PROTECTED], 2008-10-17 08:19:10 Fri: Le 17/10/2008 à 04:34:56+, Michael Kjorling a écrit On 16 Oct 2008 22:06 +0200, by [EMAIL PROTECTED] (Albert Shih): It's working but the mail a edit disapear from the mailbox and...and the new one not come. I must exit mutt and re-launch. Maybe I can wait long-time. What happens if you simply reload the mailbox? Stupid question : How I do that ? Do change-folder to the same mailbox, which you do by hitting c ^, with the default bindings. -- David Haguenauer pgp8TdFQd6IzC.pgp Description: PGP signature
Re: to hook script
Hi Albert, * Albert Shih [EMAIL PROTECTED], 2008-03-18 14:40:04 Tue: How can I write a to hook script ? For example : When I send a mail to X I want modify my From field When I send a mail to Y I want modify my Reply_to field. Do you mean something like the following? send-hook . 'my_hdr from: default-from; my_hdr reply-to: default-reply-to' send-hook X 'my_hdr from: x-from' send-hook Y 'my_hdr reply-to: y-reply-to' -- David Haguenauer pgpGd2RM3xOyz.pgp Description: PGP signature
Re: how does threading get disabled?
* [EMAIL PROTECTED] [EMAIL PROTECTED], 2008-03-06 16:07:25 Thu: Every once in a while I find that email is no longer shown as threaded, and I can't figure out how to turn it back on. Hitting esc-V makes it say that threading is disabled. Any help? You want sort-mailbox thread, which you get, with the default bindings, by typing ot. -- David Haguenauer pgpk4WskBh7Q4.pgp Description: PGP signature
Re: mutt limit command
* [EMAIL PROTECTED] [EMAIL PROTECTED], 2007-06-13 17:11:31 Wed: I would like to search for mails from a specific author but would like to include all related threads You can use a pattern such as ~(pat), which will select all threads that contain a message matching pat. Thus, ~(~fauthorname) should do what you want. The ~() thread-pattern syntax is a relatively recent introduction, though. -- David Haguenauer pgp4gVok8FGtH.pgp Description: PGP signature
Re: No new email in certain folder?!
* Joel Esler [EMAIL PROTECTED], 2007-06-05 23:27:06 Tue: On Jun 5, 2007, at 11:14 PM, David Haguenauer wrote: * Joel Esler [EMAIL PROTECTED], 2007-06-05 23:03:11 Tue: Or you can use a procmail recipe to mark the email as read upon insertion into the mailbox. How? That would definitely be nice, but I did not notice that procmail had the ability to deliver mail read (not to Maildir, at least). There are several ways to do it. http://www.google.com/search?rls=enq=maildir+procmail+%22mark+as+read%22ie=UTF-8oe=UTF-8 Thanks. At first I was worried that there could be a race condition, but since `mv' is atomic, and moving from new to cur adding info to the filename is a correct Maildir operation, everything should be fine. * Dave Patterson [EMAIL PROTECTED], 2007-06-06 12:52:06 Wed: * David Haguenauer [EMAIL PROTECTED] [2007-06-05 23:14:40 -0400]: How? :0 * ^X-Spam-Status: Yes { foldername=trash/spam :0c .$foldername/ # stores in .$foldername/new/ :0 * LASTFOLDER ?? /\/[^/]+$ { tail=$MATCH } TRAP=mv $LASTFOLDER .$foldername/cur/$tail:2,S HOST } Thanks to you too. What is the last line for (`HOST')? Although I guess we're getting slightly off-topic now. -- David Haguenauer pgpMqJrvJnpMh.pgp Description: PGP signature
Re: No new email in certain folder?!
Hi all, * Joel Esler [EMAIL PROTECTED], 2007-06-05 23:03:11 Tue: On Jun 5, 2007, at 10:47 PM, Nick Hastings wrote: * [EMAIL PROTECTED] [EMAIL PROTECTED] [070606 10:58]: is it possible to inhibt the setting of the N flag (new email) for a certain mailfolder? I don't know about removing that flag, but if you omit that mailfolder from your mailboxes list in your muttrc then mutt won't prompt you Or you can use a procmail recipe to mark the email as read upon insertion into the mailbox. How? That would definitely be nice, but I did not notice that procmail had the ability to deliver mail read (not to Maildir, at least). -- David Haguenauer pgpE9uQUE1kLf.pgp Description: PGP signature
Re: Breaking a GPG signature for demonstrative purposes
* mal content [EMAIL PROTECTED], 2007-03-31 21:05:08 Sat: This may sound like a phenomenally idiotic question, but I'd like to somehow send an email to a friend with a broken signature to make it look as if the message has been modified in transit. One way to achieve this would be to send the message normally (possibly to a non-existent address), then edit the raw sent message with a text editor, and finally use Mutt to bounce the altered message to its intended recipient. Bouncing doesn't cause the message to be re-signed, and you get to see the bad signature before sending the final message. -- David Haguenauer pgpprTipW1BtG.pgp Description: PGP signature
Re: get filenames for maildir emails
* Javier Rojas [EMAIL PROTECTED], 2007-02-11 13:32:21 Sun: On Sun, Feb 11, 2007 at 12:21:20PM -0500, Derek Martin wrote: On Sun, Feb 11, 2007 at 09:19:48PM +1300, Chris Bannister wrote: The filenames are cryptic and knowing their name is not generally useful. The names are definitely cryptic, which is the whole point of asking for a way to get them from mutt... Mutt knows what the names are. searching for some mail with mairix in order to put all the matched messages in the proper mailbox, or to find to which real mailbox do they belong to go there and do the proper moving of messages. my version of mairix seems to add a X-source-folder header to messages, at least when they are saved to a mbox. Would that be the piece of information that you are looking for? -- David Haguenauer pgpeFjaJuTPYh.pgp Description: PGP signature
Re: get filenames for maildir emails
* Javier Rojas [EMAIL PROTECTED], 2007-02-09 00:18:39 Fri: Is there any way of get or view the filename of the mail I'm viewing in mutt? When using Maildir... of course :) I would suggest looking for it my Message-ID: `grep ^Message.*XXX -r $MAILDIR' should do the job (with XXX replaced with the actual Message-ID and $MAILDIR your actual Maildir). -- David Haguenauer pgpR2qTiaArUi.pgp Description: PGP signature