MTA Pickup for spamc of SpamAssassin

Discussion, support and announcements for third party applications that work with MailEnable.
Post Reply
whiteknight
Posts: 19
Joined: Tue Nov 18, 2003 6:17 am
Location: Singapore
Contact:

MTA Pickup for spamc of SpamAssassin

Post by whiteknight » Thu Nov 17, 2005 8:54 pm

Hi I have created an MTA pickup for spamc of SpamAssassin. I have just submitted it to the MailEnable administrators, not too sure when they will put it up, but anyway just to share. If anyone is interested, I can share the application. I can quickly do one for spamassassin.bat as well.
The application is written in C#, and piping the mail directly to spamc and piping the output to a file.
White Knight

someone_else
Posts: 302
Joined: Tue Jul 19, 2005 1:12 pm
Location: 404

WinSpamC

Post by someone_else » Fri Nov 18, 2005 7:04 am

I also made something similar, some time ago, for WinSpamC (MTA Pickup Event and MailBox Delivery Event).

Using spamc/WinSpamC is much less resource intensive than passing the mail to SpamAssasin directly, so those who currently use the SpamAssasin pickup should give either spamc or WinSpamC a try.
MailEnable plugins:
DKeyEvent - DomainKeys/DKIM
MESpamC - SpamAssassin integration

whiteknight
Posts: 19
Joined: Tue Nov 18, 2003 6:17 am
Location: Singapore
Contact:

SpamAssassin

Post by whiteknight » Mon Nov 21, 2005 1:47 am

Yes, spamc and WinSpamc is more efficient because spamd runs in the background.
Another problem is with the supplied MTA pickup for SpamAssassin. The codes show that it uses a loop to check for the exit of SpamAssassin. This takes up a lot of processing power. That means that not only is SpamAssassin less efficient, the MTA pickup supplied is inefficent.
White Knight

netblue
Posts: 13
Joined: Wed Oct 05, 2005 4:40 pm

Post by netblue » Wed Jan 18, 2006 8:12 pm

I have installed Win32 SpamAssassin following the guidelines in http://www.openhandhome.com/howtosa310.html.

Can your pickup be used with this? Also, I am a VB dev, so any thoughts on how you wrote yours, i could contribute my own.

whiteknight
Posts: 19
Joined: Tue Nov 18, 2003 6:17 am
Location: Singapore
Contact:

Win32 SpamAssassin

Post by whiteknight » Tue Jan 24, 2006 7:15 pm

Hi netblue,

SpamAssassin has 2 modes of operation.
1) Call SpamAssassin.exe - This will load the application up everytime you call it.
2) Load spamd - This will load the application once into the memory and allows a client to connect to it many times.

Many windows users are using SpamAssassin.exe, it is much easier to use, but it takes up quite a lot of processing power expecially since it loads up all the support files whenever it is called. Spamd however is a load-once-use-many program. Once loaded, all the support files are kept in memory and are used when a client connects to it. The pickup event I created is for use with spamc or winspamc which is the client that is used to connect to spamd.

So to answer your question, if you are using spamassassin.exe, then you can't use my pickup event. But if you are using spamd and spamc, then you can.

On my thoughts on developing the pickup event. If you want to create a pickup event for spamassassin.exe, take note of the loop used to check the exit of spamassassin.exe. That is a killer for the processor. You can either insert some more sleep or wait states, or implement some event handling when the spamassassin process exits. That will make it more efficient. Try sleep with 200 or 500. You should time spamassassin to see what is the typical time it takes to complete, then tune the amount accordingly.
White Knight

labsy
Posts: 148
Joined: Sun Nov 16, 2003 6:49 am
Location: Slovenia

Post by labsy » Thu Feb 02, 2006 3:58 am

As I understand, combination of spamd and spamc are used in some server-to-server environment, where spamd runs on machine, which actually hosts spamassassin application, and spamc connects to this machine and issues just a query, whether mail is a SPAM or not.

Now, regarding to your post, it seems to be possible to run this on a single machine and gain in performance and resources usage with spamd's posibilities to load spamassassin into memory just once and using spamc localy.
Am I right?

If that is true, where can I get spamd for windows and spamc client/pickup event for ME? I have spamassassin environment ready to test with this pickup event.

whiteknight
Posts: 19
Joined: Tue Nov 18, 2003 6:17 am
Location: Singapore
Contact:

Post by whiteknight » Fri Apr 14, 2006 10:29 am

I am not sure if there is a spamd for windows, but you can certainly run spamd in the Cygwin environment. Overall, the gain in performance is still greater than the extra execution layer introduced by Cygwin.
White Knight

Post Reply