spamc/spamd instead of spamassassin

Discussion in 'Installation/Configuration' started by arnaud, Oct 30, 2007.

  1. arnaud

    arnaud New Member

    Hello,
    I want to use spamc/spamd instead of spamassassin to decrease the load average of my server. But I don't know how to do this.
    I found on a web site that I must edit /root/ispconfig/isp/conf/spamassassin.rc.master
    and remplace
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file={PREFS_FILE}
    with just
    | /usr/bin/spamc
    But I think, It take effect only when the user's .spamassassin.rc is updated.
    Questions :
    -Did I edit the right file ?
    -How to force the config to take effect ?

    Thank you.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    yes.

    Run the following sql command in the database:

    update isp_isp_user SETT status = 'u' WHERE status = '';

    Then change a setting in one user account in the interface and click on save.
     
  3. jnsc

    jnsc rotaredoM Moderator

    Pay attention, SET has just 1 T
     
  4. arnaud

    arnaud New Member

    Thank you, it seems to work well.
    But, I'm wondering how to use the spamd provided by ISPConfig, it will need some start scripts ?
     
  5. arnaud

    arnaud New Member

    I'm testing this :
    on Debian, I had this to
    /etc/default/spamassassin
    Code:
    DAEMON=/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamd
    
    need a
    Code:
    /etc/init.d/spamassassin restart
    It seems to work with the Debian spamc, but I think I must change the "pipe spamc" in /root/ispconfig/isp/conf/spamassassin.rc.master
    Code:
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamc
    (not tested yet because to apply this configuration it take some time (need to change every user pref file with till's tips))
     
  6. arnaud

    arnaud New Member

    stats of mail trafic

    Hello,
    (notice : now my server use the ISPConfig spamc, It seems ok)
    I've noticed that on this server, there is no stats of mail trafic for november (today is 08/nov). Is it normal ? Or is it the spamc/spamd that produce this behaviour ?
    Have you an idea ?

    Thank you.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check if you get any cron errors in the syslog for the mail_logs.php script.
     
  8. arnaud

    arnaud New Member

    I've found no error.
    The last log of /home/admispconfig/mailstats/ stuff is (grep'ed by
    Code:
    grep /home/admispconfig/mailstats/ /home/admispconfig/ispconfig/ispconfig.log
    is
    28/10 was a sunday.
    (I've installed spamd certainly between on monday 29/10 and wednesday 31/10)
    But /home/admispconfig/mailstats/web70_xxxxxxxxx is now full of logs (numbers), so I think stats are logged but not analysed.
     
    Last edited: Nov 8, 2007
  9. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    crontab -l
    ?
     
  10. arnaud

    arnaud New Member

    Code:
    # crontab -l
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null
    0,30 * * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/check_services.php &> /dev/null
    15 3,15 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/quota_msg.php &> /dev/null
    40 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/traffic.php &> /dev/null
    05 02 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/backup.php &> /dev/null
    
    today (19/11/2007) there is still no mail stats for November in ISPConfig web interface.
     
  11. arnaud

    arnaud New Member

    I've found the error

    Hello,
    I've change in crontab
    Code:
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
    to
    Code:
    59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /root/cron.log 2>&1
    and cat /root/cron.log show this :
    Code:
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 51247942 bytes) in /root/ispconfig/scripts/shell/mail_logs.php on line 73
    
    so I will configure a higher memory limit
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, please set the memory limit to a higher value in /root/ispconfig/php/php.ini.
     
  13. arnaud

    arnaud New Member

    Yes it's the solution.
    It worked during a few days, but the php script needs more than 128M on this server.

    Suggestion : why not log by default the ispconfig cron output ?
     
  14. nerolauda

    nerolauda New Member

    I suppose that spamc -u username should be more correct.
    Or not?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    spamc is called as the user of the mailbox, so it should not be nescessary to set the username explicitely as the spamassassin config file is in his home directory.
     

Share This Page