http://qs321.pair.com?node_id=369524

DaWolf has asked for the wisdom of the Perl Monks concerning the following question:

Greetings.

First of all, please don't yell "SpamAssassin" on my ears. I know it's a wonderful tool, but I really wanna reinvent some wheels and dig some concepts on this :)

I want to develop a tool that checks some POP3 accounts and based on user defined filters classify incoming e-mails (something like "Friend" or "Foe", "valid" or "spam").

After classification, my soon-to-be-born tool should be able to delete the e-mails marked by the user.

So, in a preliminary look into some modules on ActiveState's PPM I've found some that I would like to hear your opinions:

email-address 1.2
mail-box 2.054
mail-pop3client 2.15
mail-sendeasy 1.2
mail-sender 0.8.10
mail-sendmail 0.79
mail-rfc822-address 0.3

Has any of you wise monks have experienced some of the modules above? Am I missing some module that I sould be aware of?

Can anyone give me some tips over these subjects?

TIA,

my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");
  • Comment on Email checking and filtering tool on Windows: call for help

Replies are listed 'Best First'.
Re: Email checking and filtering tool on Windows: call for help
by tachyon (Chancellor) on Jun 25, 2004 at 02:52 UTC

    You quote a disparate list of modules that suggest you don't have a firm idea of what you want to do and how you plan to implement it. But you did say you want to learn....

    The modules broadly do:

    # access POP3 mail, enumerate, download, delete mail-pop3client 2.15 # validate email addresses email-address 1.2 mail-rfc822-address 0.3 # sendmail to an SMTP server mail-sendeasy 1.2 mail-sender 0.8.10 mail-sendmail 0.79 # mish mash of above mail-box 2.054

    The first thing to do is decide WHERE your tool is going to run, and how users interact with it. This will typically be either client side or server side, although a combo of clientside and server side is possible if you want to make it really complex.

Re: Email checking and filtering tool on Windows: call for help
by ysth (Canon) on Jun 25, 2004 at 04:45 UTC
    Mail::Audit will do a lot of the work for you, but you still have to code the actual filter.
Re: Email checking and filtering tool on Windows: call for help
by tstock (Curate) on Jun 25, 2004 at 02:41 UTC
    I'm not sure if ActiveState or PPM's are an absolute requirement for you, but another very cool module you might be able to use is File::Scan

    Seems like a good chunk of the spam I get comes from windows worms.

    Tiago
Re: Email checking and filtering tool on Windows: call for help
by castaway (Parson) on Jun 25, 2004 at 07:56 UTC
    You're missing Mail::Address and the complete set it goes with called MailTools. Also Net::POP3. Both of which I used to write a pre-filtering mail tool (which is hiding somewhere in code catacombs I believe).

    As you are running on Windows, Mail::SendMail probably wont be of much use, since it requires a local sendmail installation, I think. Also, since you say you want to check accounts and delete mails, why have you listed mail sending tools at all? Mail::Sender, Mail::SendEasy and Mail::SendMail are all useless to you for your stated goal.

    Mail::Box seems to be mostly for handling local mbox or maildir type mailboxes, usually found on unix-like systems. I doubt this would be all that useful on a Windows system.

    All you actually need is something to contact your email account(s), like Net::POP3 or Mail::Pop3client, and something to parse the actual mails. ie MailTools.

    C.

Re: Email checking and filtering tool on Windows: call for help
by Zero_Flop (Pilgrim) on Jun 25, 2004 at 05:05 UTC
    Caugh caugh PopFile Caugh... But seriously, checkout popfile and maybe expand on it rather than rolling your own. 99.15% Accuracy. Gotta Love it. You can at least check it out and learn from it.
Re: Email checking and filtering tool on Windows: call for help
by Mercio (Scribe) on Jun 25, 2004 at 05:14 UTC
    They are right. Those modules are used for many different things. You can find a module that will do the majority of what you want, but you will have to build the spam filter by yourself.