[neomutt-devel] Hi I need some mutt guidance

federico montaldo fmontaldo3 at gmail.com
Tue Aug 28 23:39:23 CEST 2018


Hi,

I am working ina bash script in order to clean up mutt mail archive. I
found a possible solution here:

http://koogmo.com/?p=7687

But I never used mutt and I want to know if the script is ok.

#!/bin/bash
#
#
# Usage:
# ~r : DELETE
# 1y! : 1 year
# 2y! : 2 years
# 7d! : 7 days
# 30d! : 30 days
#

mailbox="/path/to/user/mailbox"
deletePattern="7d!"

mutt -f $mailbox -F/dev/null -e "push
<delete-pattern>~r>${deletePattern}<enter><sync-mailbox>y<enter><exit>q"

The last syntax is ok.

Thanks for your help.

Regards


More information about the neomutt-devel mailing list