Mailbox cleaner on an IMAP basis?

Dominic oblivious at web.de
Tue Sep 23 10:55:14 CEST 2003


> server for mails having attached EXE files and delete all those mails on the
> server. This would save me a lot of traffic over my phone line connection.

I use a Python script which is run via cron every hour on
a machine with internet connectivity.

It downloads all mails, parses them and does whitelist
filtering but could be easily extentend.

All filtered mails are removed from the mailbox and
stored locally. This mbox file can then be
retrieved by scp/ftp.

Cleaning only every hour has proved to be enough.

Since my script has been running without any
trouble for almost half a year I thought it
may be a basis for ideas or customizing, so
I'll append it to this posting.

Ciao,
  Dominic

P.S. You'll need the tpg-parser generator for Python.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 5921 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030923/25b47c93/attachment.py>


More information about the Python-list mailing list