On 13 Dec 2006 07:48:54 -0600,
"Charles Cazabon" <qmail@discworld.dyndns.org> wrote:
> Craig Stillman <stillmc@yahoo.com> wrote:
>> I am in need of a script which can recursively delete mail messages marked
>> for deletion via IMAP. Any ideas?
>
> Your question isn't clear. If an IMAP client marks a message for deletion,
> surely the IMAP server software then deletes the message from the mailstore?
That's not quite correct. IMAP has two commands: delete marks a message
for deletion, purge removes all marked messages from a mail folder.
If you have your IMAP mail folders in Maildir format, a purge can be
done easily using find:
find /home/*/Maildir -name '*:2,*T*' -exec rm -fv {} \;
T is the Maildir flag for "marked for deletion", see also
http://cr.yp.to/proto/maildir.html
Greetings
--
Robert Sander Senior Manager Information Systems
Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany
phone:+49-30-24345-0 fax:+49-30-24345-555
http://www.epigenomics.com robert.sander@epigenomics.com
|