• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

SPAMDOPTIONS location?

ylon

Basic Pleskian
I am having some issues where I need to limit the number of spamd children and have been unsuccessful at finding where I can define options for SPAMDOPTIONS. Can someone please direct as to where/how one can go about doing this as things do not appear to be quite in their standard locations with Plesk.

**Edit: I wanted to note that it seems that it would be as simple as adding "-m 5" to the end of the init line, for example, in /etc/init.d/psa-spamassassin start section, just tack on a -m 5, HOWEVER this appears to not work since this spamd is just a link to a "wrapper" binary image. What does one do?
 
Probably you want this file:

bash-2.05b# cat /etc/sysconfig/spamassassin
# Options to spamd
SPAMDOPTIONS="-d -c -a -m5 -H"
bash-2.05b#
 
Even though /etc/sysconfig/spamassassin is currently nonexistent adding this will cause it to read the file and apply those settings?

*Note: I did add this file, ran `/etc/init.d/psa-spamassassin stop` then start and it did not change anything. I did notice however that the following process is running which shows the number of max children (somehow it is doubling):

popuser 25484 0.0 18.0 28492 22636 ? S 15:40 0:01 /usr/bin/spamd --username=popuser --daemonize --helper-home-dir=/var/qmail --max-children 20 --create-prefs --nouser-config --virtual-config-dir=/var/qmail/mailnames/%d/%l --pidfile=/var/run/spamd_light.pid --socketpath=/tmp/spamd_light.sock --siteconfigpath=/dev/null
 
Well, still looking for some input from someone who knows how to permanently modify the spamd/spamassassin behavior, but I thought I'd post a very temporary thing that I did just to try to revive my dying server.

I simply did a `sudo killall spamd` and then reran the spamd process as the appropriate user with one change to the number of children allowed:

/usr/bin/spamd --username=popuser --daemonize --helper-home-dir=/var/qmail --max-children 5 --create-prefs --nouser-config --virtual-config-dir=/var/qmail/mailnames/%d/%l --pidfile=/var/run/spamd_light.pid --socketpath=/tmp/spamd_light.sock --siteconfigpath=/dev/null

As I said, this is just a temp fix, I would very much appreciate it if someone could tell me where to change the options so that I do not have this issue any more in the future after reboots and such.
 
Same old problem

Hello,

I am currently running Plesk 8.2.0, and have the same problem. I would like to increase the number of children of Spam Assassin, and modifying the /etc/sysconfig/spamassassin file is useless.

==> ps | grep spamd
popuser 15724 1 0 16:43 ? 00:00:00 /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 1 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/spamd_full.pid --socketpath=/tmp/spamd_full.sock

==> cat /etc/sysconfig/spamassassin
# Options to spamd
SPAMDOPTIONS="-d -c -H -s local1 --max-children=5"

There has to be a way to configure this... Anyone who knows how to achieve this?

Thanks
 
Re: Same old problem

Originally posted by jcortina
Hello,

I am currently running Plesk 8.2.0, and have the same problem. I would like to increase the number of children of Spam Assassin, and modifying the /etc/sysconfig/spamassassin file is useless.

==> ps | grep spamd
popuser 15724 1 0 16:43 ? 00:00:00 /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 1 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/spamd_full.pid --socketpath=/tmp/spamd_full.sock

==> cat /etc/sysconfig/spamassassin
# Options to spamd
SPAMDOPTIONS="-d -c -H -s local1 --max-children=5"

There has to be a way to configure this... Anyone who knows how to achieve this?

Thanks

Same Problem here. Where's the config file for plesk-spamd? (It's not /etc/sysconfig/spamassassin !) :(
 
Aside from setting it to 1-5 through Plesk directly, this works to set it to an arbitrary number (only tested on 8.2.1) (Use at your own risk):

Code:
echo "UPDATE misc SET val = '15' WHERE param = 'spamfilter_max_children'" | mysql -uadmin -p`cat /etc/psa/.psa.shadow` --database=psa

service psa-spamassassin restart
 
Fix (or at least part of one)

After opening a thread over at atomiccorp.com I finally figured this out over there and thought I would post the information I found out here, as it may be helpful to someone in the future.

psa-spamassassin reads its options from the psa database in mysql. Changing max children can be done there by simply updating the variable spamfilter_max_children and then restarting spamassassin.

However, there were no options in there for log file, debugging etc. - I guess the folks at Plesk figure we don't or would not possibly need them.

Anyway, to get the log to go where I needed it I did the following:

vi /usr/bin/spamd

:s/spamd.log - that gets you near the default logging definition
find and change my $log_facility = $opt{'syslog'} || 'mail'; to my $log_facility = $opt{'syslog'} || 'file';
a few lines down from there:
find and change my $log_file = "spamd.log"; to my $log_file = "full path and filename of where you want the log"; (make sure that popuser can write to it)

This will continue to work until spamassassin or psa-spamassassin gets updated, then you need to do it again.

As for other options that plesk sets you can do the following:

ps -AF |grep spamd and see what options plesk starts spamd with, those you probably can't modify (well you could, but you would really have to hack on spamd)

I would suspect you could modify spamd to simply default to any other options you might need to run.

Another way to modify how it runs (at least until a psa-spamassassin restart is):
ps -AF |grep spamd
You will get something like:
/usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 7 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/spamd_full.pid --socketpath=/tmp/spamd_full.sock

Then you can simply do a killall -9 spamd

Then paste the command line back out there with your additional or replacement options and restart it. In my case, I simply wanted to start it with --debug=all to check on another problem so I pasted this:

/usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 7 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --pidfile=/var/run/spamd/spamd_full.pid --socketpath=/tmp/spamd_full.sock --debug=all

and it works great.
 
I found out that having:
--virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin
will create lots of bayes_??? files if bayes is enabled- -- and getting to be huge in size -- in every mailbox..
Perhaps it's best to avoid per-user spamassassin directories altogether?
-t
 
Btw, changing the spamassassin settings from PLESK has the effect of deleting the /etc/mail/spamassassin/local.cf and replacing with a 2-liner.
you may wish to back up your local.cf file against its wrath before doing any changes to that page in PLESK.
 
Back
Top