Page 1 of 1

mutt and old mail

Posted: Tue Mar 20, 2018 12:36 pm
by nhdesign
Since my access to maildir is gone my crontab cannot delete mail
files older than xx days. Or can it? I don't know, please share
if you have a trick for scripting that can access imap files.

From my muttrc I find these lines. I am pretty sure I used them
at one time, but do not remember which. I do not remember what
the ~r or ~d are for. I googled them but all I get is stuff
about push up bras.

I checked http://www.mutt.org/, http://www.fefe.de/muttfaq/faq.html, Sven's is all about neomutt now.

#### delete mail older than XX days, old mail,
#push D~r>32d\n
#push D~d>32d\n

Thanks,
Vic

Re: mutt and old mail

Posted: Tue Mar 20, 2018 5:12 pm
by scott
nhdesign wrote:Since my access to maildir is gone my crontab cannot delete mail
files older than xx days. Or can it? I don't know, please share
if you have a trick for scripting that can access imap files.

From my muttrc I find these lines. I am pretty sure I used them
at one time, but do not remember which. I do not remember what
the ~r or ~d are for. I googled them but all I get is stuff
about push up bras.

I checked http://www.mutt.org/, http://www.fefe.de/muttfaq/faq.html, Sven's is all about neomutt now.

#### delete mail older than XX days, old mail,
#push D~r>32d\n
#push D~d>32d\n

Thanks,
Vic
Basically, "push" puts keystrokes into the command buffer. So the first "D" starts a process, "delete messages matching", then you can give it a specification of what messages you want to delete. The one that seems to work with our version of mutt is "~r>32d\n", which means "messages with date-received older than 32 days".

There's a whole lot of documentation for mutt in /usr/share/doc/mutt-1.5.21/ . I've created a command, "mutt_manual.sh", that displays the text manual (not the man page, but the full documentation from the doc directory). If you use less to search in there for \~r then it should find the documentation for that escape.

-Scott

Re: mutt and old mail

Posted: Wed Mar 21, 2018 4:29 am
by nhdesign
Thanks,