Not really perl-related but the best way of stopping spam is at the MTA level with RBLs (Runtime Black Lists.)
These are lists of the IP addresses of confirmed spammers and other machines which should not be sending mail such as open relays, home machines, etc. Some RBLs are rather trigger-happy and add blacklist legitimate users sometimes but the following, which I use with postfix, are considered pretty reputable:
For the first six months I used RBLs, I kept copies of rejected mail just to make sure I wasn't bouncing legitimate mail but I didn't have one false positive. However there is a small chance this could happen. But to me that risk is worth it for the dramatic reduction in spam. For spam that manages to evade the RBLs, the combination of spamassassin (with regular updates of the rulesets), clamav, and some procmail recipes provide a secondary line of defense.
I used to get 200-300 spam messages a day. Now thanks to these methods, I get 1 or 2.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.