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

Hi, I'm after a Anti-Spam program written ideally in perl. What I currently have is my emailed piped into a perl script, which enters the email into a MySQL database, so that it can be accessed from our support helpdesk. I wrote this software, so modifcation is no problem. Recently, we've been getting a large amount of spam into the help desk, and i really need a way of getting rid of it. Any ideas?

Replies are listed 'Best First'.
Re: Perl Anti-Spam Program
by shmem (Chancellor) on Aug 24, 2006 at 10:37 UTC
    As Corion already suggested in the CB, have a look at SpamAssassin.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: Perl Anti-Spam Program
by marto (Cardinal) on Aug 24, 2006 at 10:55 UTC
Re: Perl Anti-Spam Program
by Anonymous Monk on Aug 24, 2006 at 12:46 UTC
    Take a look at disspam.

    Been using it for 3-4 years and it's good stuff. It's using RBL or Spamassassin to check emails. You can also configure own filtering options.

    Basicly it's just a CGI script with a config file, so it's easy to set up. Run it as cron and forget about it.

    Thanks Mina Naguib (whoever u are).

      Basicly it's just a CGI script with a config file

      Perl != CGI.

      --MidLifeXis

        Sorry, of course I meant PERL script, not CGI - got nothing to do with CGI.
Re: Perl Anti-Spam Program
by Velaki (Chaplain) on Aug 24, 2006 at 10:32 UTC

    Since you've written the program, it shouldn't be too difficult to toss in something to scan the headers and subject line, and shunt mail meeting some criteria on an exclusion list -- which you would work out -- to /dev/null.

    I'm not sure of any specific modules/packages out there for this off the top o' me head, but I'm sure there are a few out there, and if not, do what we all do from time to time: write your own. :)

    Hope this helped,
    -v.

    "Perl. There is no substitute."
Re: Perl Anti-Spam Program
by jcoxen (Deacon) on Aug 24, 2006 at 19:20 UTC
    Another alternative would be PopFile. It's a Bayesian spam filter written in Perl. It uses SQLite on the backend but can be modified to use MySQL.
Re: Perl Anti-Spam Program
by CountZero (Bishop) on Aug 24, 2006 at 22:18 UTC
    Yes, POPfile is the way to go. You can use it as a sort of proxy and it works totally transparant. You just connect to POPfile as you would connect to your e-mail POP-server and POPfile picks out the spam for you.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law