Discussion:
[courier-users] Rerun .mailfilter?
Lucio Crusca
2017-07-15 09:29:22 UTC
Permalink
Hello,

I've just edited my .mailfilter. Is it possible to run it once again for
every already delivered message in my INBOX root maildir only, so that
maildrop moves my messages in the respective new subfolders, according
to the new .mailfilter rules?
Sam Varshavchik
2017-07-15 13:22:08 UTC
Permalink
Post by Lucio Crusca
Hello,
I've just edited my .mailfilter. Is it possible to run it once again for
every already delivered message in my INBOX root maildir only, so that
maildrop moves my messages in the respective new subfolders, according to
the new .mailfilter rules?
There's no automatic way to do it. But, what you can do is manually move all
messages from INBOX to a temporary directory, and then have a short script
run maildrop in a loop, for each message on its standard input.

Something like:

cd $HOME
mkdir inbox.tmp
mv Maildir/cur/* inbox.tmp
for f in inbox.tmp/*
do
maildrop <$f
done

Loading...