Spamassassin on different Server

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
I'm interested in doing similar. Part of the problem is that if the spam checking server is going to hold or delete spam, it's not going to show up in the user's spam box, or provide an easy way for user to check for false positives, etc.

I'm wondering what kinds of setups are available in this department. I'd even be willing to pay a service to take some of the spam processing load off. Thanks to aggressive SA with DCC, my customers are used to getting close to zero spam, but the CPU tax is high...
 

jester.ro

Well-Known Member
PartnerNOC
Feb 6, 2004
304
0
166
Bucharest, Romania
cPanel Access Level
DataCenter Provider
i'm using this on non-cpanel servers, but it might work for cpanel too.

in exim.conf search for a refference to "spamc"


should be something like

transport_filter = "/usr/bin/spamc"

You would need to modify that to read something like

transport_filter = "/usr/bin/spamc -d host.name.com -p 783"

A working spamassasin instalation should be active on host.name.com, and allow connections to spamd on port 783 from the ip of the cpanel server.
For this you need to modify the config file for spamd so that it starts with a parameter like

-A ip.of.cpanel.server

Then restart spamd on the spam-checking-server and exim on the cpanel server.

Maybe chirpy would be able to help more, i've never used this for exim, only for qmail on non-cpanel servers. But it's all about calling the spamc client, should be feasable on cpanel servers too.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
If anyone can figure out a good system to make this work, that is easy to implement, then it will be popular.

Would be nice if cpanel were able to do this with clustering (run mail services on another machine), but they don't seem to care too much about this "feature"...

... so if anyone can figure out how to at least do it with spam assassin (or some other mail washer system) that plugs into cpanel easily and reliably, then it would be a great addition.
 

Elikster

Well-Known Member
Feb 8, 2003
118
1
168
Offloading Spamassassin + ClamAV

Greetings,

I finally resolved that project just now after nearly 1 1/2 month of working on it. I just need to find a programmer who is familiar with Cpanel's API and some PHP to modify it one last thing, but it works so far with the IMAP authentication system of what I am using here now and intregrated into Cpanel itself by replacing the spamassassin configuration page.
 

bornonline

Well-Known Member
Nov 19, 2004
139
0
166
Earth
I think I'm may be doing what you are trying to do.
I'm doing this with exim smart router. I have one cpanel box running Mailscanner +SpamAssassin and relay mail from my other cpanel box through it. I'm still testing, but it seems to be working fine.

I create the account on box1 then "edit MX entry" in WHM change that to the IP of box2.

Then I'm adding that domain to /etc/staticroutes and /etc/secondarymx on box2.

Then I change the mailscanner config on box2 to scan everything by default and not what is only in /etc/localdomains. Then it sends that mail back to box1 via the exim smart router on box2.

This may not be the best way to do this, but it seems to be working fine so far.

I'm still messing with it, but I'll post up if I run across anything.
Take a look at this post.
http://forums.cpanel.net/showthread.php?t=18201&highlight=smart+router
 
Last edited:

Elikster

Well-Known Member
Feb 8, 2003
118
1
168
bornonline said:
I think I'm may be doing what you are trying to do.
I'm doing this with exim smart router. I have one cpanel box running Mailscanner +SpamAssassin and relay mail from my other cpanel box through it. I'm still testing, but it seems to be working fine.

I create the account on box1 then "edit MX entry" in WHM change that to the IP of box2.

Then I'm adding that domain to /etc/staticroutes and /etc/secondarymx on box2.

Then I change the mailscanner config on box2 to scan everything by default and not what is only in /etc/localdomains. Then it sends that mail back to box1 via the exim smart router on box2.

This may not be the best way to do this, but it seems to be working fine so far.

I'm still messing with it, but I'll post up if I run across anything.
Take a look at this post.
http://forums.cpanel.net/showthread.php?t=18201&highlight=smart+router
Mine is not even remotely close to what you are doing. Mine is sort of works with existing setup, with only change to the Spamassassin Configuration page and the backend part by modifying the spamc part and having it sent all traffic for spamassassin over to 2 spamassassin server for processing including ClamAV and send it back to server where it orignated.

I am currently rolling it out on my 20 servers right now and so far, people are happy with the setup so far. They are asking to remove the cpanel login part which is needed to authenticate to the IMAP and have it done automatically by Cpanel. That is the only thing left, but for now, it works and I am satisfied with it.
 

kokoman

Active Member
Nov 28, 2002
27
0
151
BA, Argentina
jester.ro said:
i'm using this on non-cpanel servers, but it might work for cpanel too.

A working spamassasin instalation should be active on host.name.com, and allow connections to spamd on port 783 from the ip of the cpanel server.
For this you need to modify the config file for spamd so that it starts with a parameter like

-A ip.of.cpanel.server
Hello,

doing this, spamc will send every mail to the remote spamd... it work great but there´s a detail, the user preferences ($HOME/.spamassassin/user_prefs) are not on the remote server and spamc (the local part) don´t read that user preferences. The profit of this is the spam classification load is on the remote server, the problem is that all preferences defined by users via cpanel are ignored by the spamd running on the remote server.

Anyone knows how this problem may be solved?

Regards.