HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=19)
-   -   spamc/spamd quick setup for Ubuntu server (http://www.howtoforge.com/forums/showthread.php?t=28534)

gwa7 8th November 2008 19:39

spamc/spamd quick setup for Ubuntu server
 
I just setup my Ubuntu server to use the spamc/spamd combination so I thought I would write this howto. Doing this reduced the load on my server and made spamassassin work faster. There is a lot of information about spamc/spamd on this forum, however I could not find one post that told me exactly what I needed to do. I am going to try to do that here. There may be better ways of doing this, but this worked for me. If you know a better way please let me know.

1. Install spamc.
Quote:

sudo aptitude install spamc
2. Then, edit /etc/default/spamassassin to enable startup of the spamd process. In this file, change:
Quote:

ENABLED=1
Also, do this at the bottom of the file:
Quote:

CRON=1
(the above is supposed to make sa-update run every night)

3. Start the spamd process:
Quote:

sudo /etc/init.d/spamassassin start
4. Edit this file: /root/ispconfig/isp/conf/spamassassin.rc.master and change
Quote:

| {SPAMASSASSIN_PATH} --prefs-file={PREFS_FILE}
to
Quote:

| /usr/bin/spamc
5. In ISPconfig change a setting on one user for each domain you have. (I had to do this to get Ispconfig to update the .spamassassin.rc file for every user in each domain.)

You should be finished now.

Notes:
Spamd should find the prefs file automatically in the homedir of the user. The current ISPConfig releases create a symlink for that.

Test new configuration: Start top on your server. Send send out a test email to users in all your domains. You should only see spamd in the list of processes. If you see spamassassin, make sure you did step 5 above.

While the steps above will take a lot of load off your server, converting to clamd will take even more load off. I believe both spamd and clamd are vital for busy servers.

Optional: You can add another spamassassin update channel to add more rules. This worked pretty well for me: http://saupdates.openprotect.com/

Hope this information helps someone. I appreciate all the help I have received here.
Thanks,
Gary

This information was collected from the following places:
This forum
http://samat.org/pages/speeding-up-s...nd-ubuntu.html
http://spamassassin.apache.org/

till 9th November 2008 11:52

Thanks for the howto :) I moved your post to the tipps & tricks forum.

HardyHarvey 5th January 2009 20:17

Thanks - tip: sa-update
 
Just a tip that your sa-update might not work out-of-the box. As part of this install I would suggest you try it.

If you get an error, I bet it's the one in this post, and the fix posted works:

http://www.howtoforge.com/forums/showthread.php?t=3680

Cheers

Hardy Harvey

Norman 6th January 2009 15:53

Running postgrey has mitigated most performance issues I've had with spam. As postgrey effectively removes majority of the spam and makes them not having to go through spamassassin.

This makes spamassassin only take CPU when actually having to investigate stuff that even bypasses postgrey.

paxpacis 19th March 2009 15:29

Hello,

I want to undo this installation and now I get errors in my mail.err log..

Mar 19 14:11:58 www spamc[13527]: connect to spamd on 127.0.0.1 failed, retrying (#1 of 3): Connection refused
Mar 19 14:11:59 www spamc[13527]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection refused
Mar 19 14:12:00 www spamc[13527]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): Connection refused
Mar 19 14:12:01 www spamc[13527]: connection attempt to spamd aborted after 3 retries

Did I miss some setting to restore to the ispconfig?

till 19th March 2009 15:33

If you have undone the spamd install you will have to do step 5) again from the instructions above.

paxpacis 19th March 2009 16:54

Thank you, this is not possible with an sql query to force an update?

Quote:

Originally Posted by till (Post 176037)
If you have undone the spamd install you will have to do step 5) again from the instructions above.


Rasputin 19th February 2010 20:37

Thank you for this great howto, worked like a charm.

Quote:

Originally Posted by paxpacis (Post 176053)
Thank you, this is not possible with an sql query to force an update?

There is a simple solution to update all users at once:

http://www.howtoforge.com/forums/sho...7&postcount=11


All times are GMT +2. The time now is 03:30.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.