PDA

View Full Version : How about using SpamAssassin / Amavisd-new?


jrn
11-25-2006, 12:58 AM
I just had a thought about all the problems with spam.

My server is running SpamAssassin and Amavisd-new ( on Linux ) which does a *very* good job of catching spam.

Anybody ever think about trying to leverage the power of the more popular anti-spam tools to help *detect* comment spam in PixelPost?

I believe most anti-spam tools have some sort of command line operation that would have a program to pass the text of a comment to be tested.

So perhaps PixelPost might be able to use SpamAssassin Amavisd-new in some manner to help weed out comment spam?

The type of spam that people post to photoblogs are *very* easily detected by common anti-spam tools..

Any thoughts?

jrn
11-25-2006, 01:27 AM
Perhaps there is a PHP API to call SpamAssassin directly?
SpamAssassin is set of Perl modules... but *if* there is a way to call directly call SpamAssassin from within PHP we could avoid having to execute a shell type command like this:

spamassassin < test.mail 2>/dev/null | grep -c "X-Spam-Flag: YES"

Where the file test.mail includes the comment with To: From: headers added.

It would be nasty to execute a system command for every message to use spamassassin to detect spam... but it might work.....

GeoS
11-25-2006, 09:17 AM
1.Most of web accounts doesnt have shell access.
2. Perl script must be executed to get result of its work.
3. I didnt check it but IMHO SpamAssassin has got interface only for email servers.
4. SpamAssassin isnt on every Linux based server so it can be hard to connect all this things together.

But whole idea is interesting.

jrn
11-25-2006, 06:06 PM
1.Most of web accounts doesnt have shell access.
2. Perl script must be executed to get result of its work.
3. I didnt check it but IMHO SpamAssassin has got interface only for email servers.
4. SpamAssassin isnt on every Linux based server so it can be hard to connect all this things together.

But whole idea is interesting.

Actually, on a system with SpamAssassin installed you can communicate via TCP/IP to a daemon which allows you to send a message to SpamAssassin and get back a result as to whether or not SpamAssassin considers the message Spam. Now it's possible to code a funtion in PHP to talk to the SpamAssassin Daemon.

I might just go ahead and try to implement this feature.. perhaps as a plugin. This would then not require shell access and could be installed by only those who are being hosted on systems with SpamAssassin installed.

BTW, I did some checking around and the other common "blog" software seem to already have these types of plugins.

I think this idea merits some serious consideration...

GeoS
11-26-2006, 10:52 AM
So if it looks like this then it seems to be a nice addon (if you code it) :)

jrn
11-27-2006, 02:02 AM
So if it looks like this then it seems to be a nice addon (if you code it) :)

Ok,

I have no experience writing plugins for pixelpost, but I will write the code that talks with the SpamAssassin daemon and perhaps when that is done I could get some help in turning it into a plugin...

Dennis
11-27-2006, 05:43 AM
I'll be happy to be of some help incorporating your code in an addon.

Rob
01-05-2007, 05:47 PM
Check out the Askimat spam addon in the addons section. Askimat is designed for blog comments and works really well.

se.nsuo.us
01-06-2007, 08:06 AM
The problem with Akismet is that it is a third party hosted solution and also that it requires a key from the Wordpress site to work. Some people don't like it.

Something talking to SA would be cool

Dennis
01-06-2007, 02:22 PM
I've found some old wordpress addons that do that, but it has been obsolete since the release of bad behavior (http://www.homelandstupidity.us/software/bad-behavior/). Raminia has made a addon for that long time ago, and since then multiple changes have been made.

I've contacted the author of the wordpress addon.

Spudooli
01-07-2007, 12:45 AM
I wonder if spamassassin will be as good at sorting out comment spam given it's really designed for email spam.

A good number of the SA checks are against the email headers (which comment spam has none) and related to any HTML and images in the email (again, not that relevant to comment spam) and the sending servers etc.

I would imagine most of the checks will not be relevant and therefore you'll get a higher amount of spam getting through than what you would with say the akismet addon (which is excellent by the way)

GeoS
01-08-2007, 10:41 PM
So guys there is nice idea - go and create new solution for comments with similar rules of work to SpamAssassin.