Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th November 2008, 18:39
gwa7 gwa7 is offline
Member
 
Join Date: Jan 2007
Posts: 34
Thanks: 2
Thanked 10 Times in 6 Posts
Default 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/

Last edited by gwa7; 5th January 2009 at 04:20. Reason: correction: /usr/bin/spamc
Reply With Quote
The Following 3 Users Say Thank You to gwa7 For This Useful Post:
falko (9th November 2008), Rasputin (19th February 2010), till (9th November 2008)
Sponsored Links
  #2  
Old 9th November 2008, 10:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

Thanks for the howto I moved your post to the tipps & tricks forum.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 5th January 2009, 19:17
HardyHarvey HardyHarvey is offline
Junior Member
 
Join Date: Apr 2008
Posts: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Default 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
Reply With Quote
  #4  
Old 6th January 2009, 14:53
Norman Norman is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 242
Thanks: 0
Thanked 18 Times in 14 Posts
Default

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.
__________________
http://www.xh.se
Reply With Quote
  #5  
Old 19th March 2009, 14:29
paxpacis paxpacis is offline
Member
 
Join Date: Jan 2009
Posts: 31
Thanks: 11
Thanked 0 Times in 0 Posts
Question

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?
Reply With Quote
  #6  
Old 19th March 2009, 14:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,486
Thanks: 813
Thanked 5,256 Times in 4,121 Posts
Default

If you have undone the spamd install you will have to do step 5) again from the instructions above.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
paxpacis (19th March 2009)
  #7  
Old 19th March 2009, 15:54
paxpacis paxpacis is offline
Member
 
Join Date: Jan 2009
Posts: 31
Thanks: 11
Thanked 0 Times in 0 Posts
Default

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

Quote:
Originally Posted by till View Post
If you have undone the spamd install you will have to do step 5) again from the instructions above.
Reply With Quote
  #8  
Old 19th February 2010, 19:37
Rasputin Rasputin is offline
Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

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

Quote:
Originally Posted by paxpacis View Post
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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Server, postfix, gmail relay sjau Server Operation 3 14th December 2010 18:20
Webmail problems with only one domain? compner Installation/Configuration 14 16th February 2010 16:59
Going to setup a small company server... but how? LINUXstarter Server Operation 13 23rd December 2007 18:33
Proper Environment Setup fishtenors Installation/Configuration 1 28th September 2007 18:09
Rejecting outbound mail tristanlee85 General 11 20th May 2007 17:04


All times are GMT +2. The time now is 06:15.


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