spamc/spamd quick setup for Ubuntu server

Discussion in 'Tips/Tricks/Mods' started by gwa7, Nov 8, 2008.

  1. gwa7

    gwa7 New Member

    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.
    2. Then, edit /etc/default/spamassassin to enable startup of the spamd process. In this file, change:
    Also, do this at the bottom of the file:
    (the above is supposed to make sa-update run every night)

    3. Start the spamd process:
    4. Edit this file: /root/ispconfig/isp/conf/spamassassin.rc.master and change
    to
    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-spamassassin-rule-processing-on-debian-and-ubuntu.html
    http://spamassassin.apache.org/
     
    Last edited: Jan 5, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

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

    HardyHarvey New Member

    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
     
  4. Norman

    Norman Member HowtoForge Supporter

    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.
     
  5. paxpacis

    paxpacis Member

    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?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

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

    paxpacis Member

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

     
  8. Rasputin

    Rasputin New Member

Share This Page