mutt and old mail

Advanced feature discussion, beta programs and unsupported "Labs" features.
3 posts Page 1 of 1
by nhdesign » Tue Mar 20, 2018 12:36 pm
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
by scott » Tue Mar 20, 2018 5:12 pm
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
by nhdesign » Wed Mar 21, 2018 4:29 am
Thanks,
3 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 2 guests