[Italian Flag]
  Italiano


Mailsweeper Home page

Author    Fulvio Cogrossi
 Version   (I don't have such skill to make one)

Download

Mailsweeper is a program to filter the emails from server mailbox(es) and report as undesired one or delete them. This according the specified filters set. Mailsweeper can handle POP3 and IMAP4 server. Mailsweeper is quite fast because will read only emails headers.
Mostly I choose this way when I want to clean "spam" by GPRS connection (some time in roaming).
Mailsweeper can synchronize deletion of  server mails with locally removed.
 
FOREWORD
I have no idea for any kind of copyrights, simply use Mailsweeper as it is or erase it. I've started the development of Mailsweeper just for fun and for learning Python.
The publication of this program is mostly on the view to have some feedback regarding how to make more efficient the program, rather than itself use. My first intention was to mimic the power of Andreas Bauer's "mailfilter", which may need some extra effort to make it running on a different platform. Of course, even  Mailsweeper will need Python interpreter, but on the other hand, Python may become useful for other several purposes -as per win32 users, for Linux users it's installed, on most of the cases.


DISCLAIMER
NO direct or indirect warranty are given implied, or whatsoever. Mailsweeper name has been chosen without intention to copy any other program around the globe (It's a tough issue to find an unique name in the whole Internet).
Mailsweeper may fail for some unpredictable reason, therefore use it with care. Caution is suggested to avoid important email loss.
I'm going to pay some efforts to improve the Mailsweeper performances and catch all possible flaws. Any bug fix or improvement are welcome, and taken in account. For personal use are granted for free modifications, redistribution and partial inclusions into other programs. For commercial use in whole or partial of this program it will requires author permission.


How it works
First need to set up the configuration file (Cfile hereafter). An example is enclosed with Mailsweeper. The source and Cfile are fairly documented. Cfile follow a "INI" style, with sections and some compound to let do a word replacement on the option's value.
Once the Cfile is set, just launch Mailsweeper on the prompt followed by (optionally) the config file path. If you start the first time it's compulsory to give the Cfile, since no records have been saved.
Subsequently, if the Cfile still same, Mailsweeper will load its own saved records. In order to force loading the configuration one must provide a Cfile path after the program name.
There are some command line options which can override the Cfile setting. Details are enclosed into the Cfile as *_HLP option. These descriptions will appear also if you'll type Mailsweeper -h at the prompt. A good care it's needed to these options, Mailsweeper checks and compute on them.
CFile options ending with _HLP  will ease to develop convertion of the help comments into  a different language. I don't know whether it can take Unicode.
You may have an options variety for a log file, which let you decide for the log, append to an existing previous file (which may set a quota)
There is option to set a limit size for the log file, 123456 or 123k or 435M are valid options which give the file size in bytes, Kbytes and Mbytes respectively.
If there are several servers to process, Mailsweeper can process all simultaneously, reducing then its connection's idle time. This can be done by enabling multi thread option by setting either into the Cfile or issuing -m 1 ('yes' or similar boolean value).
Mailsweeper have been tested mainly on Linux platform, I've spent some time to run test also on Win32 platform and I may say it's similar behavior.
For Win32 I think Mailsweeper may need some little effort to set up the convenient folder for the program and its files.

Mailsweeper need cfgparse module to work.  Download cfgparse and put in either the same folder of  Mailsweeper or  Python's searching path.
Running Mailsweeper will show some information of the progress. It's also possible to redirect the entire log on the screen, but just careful that lines are rather long, that they may impact visibility.

FILTERING.- This is the core of the email handling. If wrong input may cause misinterpretation on what you want to remove or to keep. It's advisable to start testing and with "SETTING FILTER" set to 'no' or 0 (zero) or similar boolean value, which will simply mark the emails BAD, but will be no actions on the server(s) and in conjunction with the logging facility to check if result fit the expectations.

The configuration let you define 2 way of filtering. Options names starting by 'A' and followed by any character (just for making an unique option name),it will means "Allowed". Mailsweeper will keep those emails that matching such criteria. Options names starting by 'D', and any characters after, means "Denied" and Mailsweeper will mark in the log or immediately remove from the server. Denial have highest priority on filter rules.
The filter mode is dictated by "Regular Expression" and I suggest some reading at it , to whom isn't familiar on its use.

For anything unclear point, it will be a pleasure of mine to help you for Mailsweeper best use. Developers may also expose or share some idea.
The project still a long way to go, this isn't the complete Mailsweeper description, therefore better read the README_NOW.txt inside the zip file.

The development of Mailsweeper is going at the pace of solely hobby term, do not expect changes in short periods. I'll may grow some interest as the demand and feedback will increase.

Click the link to download Mailsweeper


APPRECIATIONS
Thanks to all Python developers, they've made such wonderful tool, that gaves me the chance to come up with Mailsweeper. More thanks to SpamBayes staff and Rui Carmo for some part of their program which have been adapted for my use.

PS. Italian is my own language, any wrong grammar herein is purely unknown, sorry.

Hosted by www.Geocities.ws

1