1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

SPAMDOPTIONS location?

Discussion in 'Plesk for Linux - 8.x and Older' started by ylon, Apr 19, 2005.

  1. ylon

    ylon Basic Pleskian

    23
    23%
    Joined:
    Apr 28, 2007
    Messages:
    39
    Likes Received:
    0
    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?
     
  2. worker

    worker Guest

    0
     
    Probably you want this file:

    bash-2.05b# cat /etc/sysconfig/spamassassin
    # Options to spamd
    SPAMDOPTIONS="-d -c -a -m5 -H"
    bash-2.05b#
     
  3. ylon

    ylon Basic Pleskian

    23
    23%
    Joined:
    Apr 28, 2007
    Messages:
    39
    Likes Received:
    0
    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
     
  4. ylon

    ylon Basic Pleskian

    23
    23%
    Joined:
    Apr 28, 2007
    Messages:
    39
    Likes Received:
    0
    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.
     
  5. jcortina

    jcortina Guest

    0
     
    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
     
  6. Aludrias

    Aludrias Guest

    0
     
    Re: Same old problem

    Same Problem here. Where's the config file for plesk-spamd? (It's not /etc/sysconfig/spamassassin !) :(
     
  7. justin samuel

    justin samuel Guest

    0
     
    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
    
     
  8. zeki

    zeki New Pleskian

    22
    57%
    Joined:
    Mar 4, 2008
    Messages:
    11
    Likes Received:
    0
    anybody figured out where the max-children is set at yet?
     
  9. Matt Sonnentag

    Matt Sonnentag Basic Pleskian

    23
    23%
    Joined:
    Mar 3, 2009
    Messages:
    29
    Likes Received:
    0
    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.
     
Loading...