PDA

View Full Version : spamc/spamd instead of spamassassin


arnaud
30th October 2007, 12:50
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.

till
30th October 2007, 13:00
-Did I edit the right file ?

yes.

-How to force the config to take effect ?

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.

jnsc
30th October 2007, 14:41
Pay attention, SET has just 1 T

arnaud
5th November 2007, 14:22
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 ?

arnaud
5th November 2007, 17:37
I'm testing this :
on Debian, I had this to
/etc/default/spamassassin
DAEMON=/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamd

need a /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
| /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 (http://www.howtoforge.com/forums/showpost.php?p=91457&postcount=2)))

arnaud
8th November 2007, 11:52
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.

till
8th November 2007, 13:55
Please check if you get any cron errors in the syslog for the mail_logs.php script.

arnaud
8th November 2007, 16:31
I've found no error.
The last log of /home/admispconfig/mailstats/ stuff is (grep'ed by
grep /home/admispconfig/mailstats/ /home/admispconfig/ispconfig/ispconfig.log
is
28.10.2007 - 23:59:31 => INFO - /root/ispconfig/scripts/shell/mail_logs.php, Line 123: rm -f /home/admispconfig/mailstats/web70_xxxxxxxxx
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.

falko
9th November 2007, 19:29
What's the output of crontab -l?

arnaud
19th November 2007, 12:39
# 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.

arnaud
29th November 2007, 11:11
Hello,
I've change in crontab
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
to
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 :
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

till
30th November 2007, 13:17
Yes, please set the memory limit to a higher value in /root/ispconfig/php/php.ini.

arnaud
10th December 2007, 12:52
Yes, please set the memory limit to a higher value in /root/ispconfig/php/php.ini.
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 ?

nerolauda
11th December 2007, 01:22
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.
I suppose that spamc -u username should be more correct.
Or not?

till
11th December 2007, 09:25
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.