calling on spamc?

Discussion in 'Tips/Tricks/Mods' started by pjaric, Oct 19, 2006.

  1. pjaric

    pjaric New Member

    I've been trying to get the mail to go throught spamc/spamd rather than spamassassin, but no luck.

    I've selected enable Spamd in /etc/default/spamassassin and changed the .spamassassin.rc where it use to say:
    * < 256000
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin

    now it is

    * < 256000
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamc

    The mails do not get scanned. What other file can I look at to change this?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) /etc/default/spamassassin is not the config file for the ISPConfig spamassassin. The config file is in/home/admispconfig/ispconfig/tools/spamassassin/etc/

    2) The ISPConfig spamd is not started and there is no start script for it, because ISPConfig does not use it.

    3) The main problem with spamc is and thats why it is not enabled in ISPConfig is that spamd is not able to read the spamassassin preferences file that ISPConfig uses because spamc does not ahve a parameter to provide the location of the user_prefs file.
  3. pjaric

    pjaric New Member

    Thanks for the answer. Make sense to me now even thought I was beating my head against the wall trying to make it work.

    Is it possible to activate spamd and have it read another file, something that IspConfig does not create?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What you might try is this:

    1) Install spamc / spamd from your linux distribution and make shure it is automatically started at boot time.

    2) insert the path to the spamc program from your linux distribution in the file .spamassassin.rc instead of the ISPConfig spamc path.

    This will enable spamd with your global spamassassin settings.

    To use the settings from ISPConfig, you can try to create a symlink inside of the subdirectory .spamassassin that can be found in each users home directory like this:

  5. pjaric

    pjaric New Member

    I installed spamd and it works well now after the modifications.

    The problem I am having is that it is not reading any user_prefs file, nor any file.

    The mail is being scanned with 5.0 as required hits no matter what changes I make in any of the user_pref files. It seems that the default is 5 but I do not know where it is reading it from.

    Also, if I stay with ISPconfig's spamassassin rather than spamce, where do I install RulesDuJour? /etc/mail/spamassassin? or under /home/admispconfig/......./spamassassin?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you use the ISPConfig spamassassin, you must do all modifications and installations in /home/admispconfig/......./spamassassin
  7. jmroth

    jmroth ISPConfig Developer ISPConfig Developer

    I see the post is quite old, but it helped me a lot today.
    As a remark: the actual user_prefs file is called user_prefs and not .user_prefs (no dot)

    So the command is
    ln -s ../.user_prefs user_prefs
    (works only for users which are not domain administrators anyway)
    for them you have to point the link somewhere else
    ln -s ../user/<username>/.user_prefs user_prefs
    Currently I have not yet hacked the ispconfig scripts to do that. I leave that as an exercise ;-)
  8. tafkaz

    tafkaz Member HowtoForge Supporter

    Howto get spamd running with ispconfig ?

    Hi there.
    I tried to find some answer in the forum, but either i am to dumb to find it or there is nothing availlable here, that explains how to make ispconfig use spamc/spamd instead of spamassassin as default for all mail on the server.
    We updated to the neweset (2.2.16) version today, hoping thet spamd would now be working.
    We have an incredible amount of load here, just because spamassassin takes over all the potential of our server.
    We allready changed to clamd, that was easy....

    Any help ?

    Thanx very much in advance !
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig does not support spamd out of the box. To use spamd, install spamd from your linux distribution on your server and then change the spamassassin procmail recipe in /root/ispconfig/isp/conf/ to use the your spamd. All new or updated users will use the new configuration.
  10. tafkaz

    tafkaz Member HowtoForge Supporter

    Hi Till.
    Many thanks for your reply

    So in /root/ispconfig/isp/conf/spamassassin.rc.master i would change this line:

    * < 256000
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file={PREFS_FILE}


    * < 256000
    | //usr/bin/spamc --prefs-file={PREFS_FILE}

    Would that be correct ?
    And how would i best update every existing user to use spamc then ?

    Thanks again for your help !
  11. till

    till Super Moderator Staff Member ISPConfig Developer


    Run the following SQL statement in the database:

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

    then change one user in the interface and click on save to start the process.
  12. tafkaz

    tafkaz Member HowtoForge Supporter

    Tanks again for your fast help. But that didnt seem to work. We did exactly as described, but it's still the perl-spamassassin running !
    Any idea ?
  13. tafkaz

    tafkaz Member HowtoForge Supporter

    Some more input ;-)

    In the users spamassassin-file

    e.g /srv/www/web41/user/web41_user/.spamassassin.rc

    nothing actually changed.
    there is still this line:
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-f

    shouldnt that line have been changed with what we did ?

    Thanx !
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run the sql statement again that I posted above and then change a user record.e.g. quota in the interface and save the change. If you do not change something in the interface, the changes will not be written to disk.
  15. tafkaz

    tafkaz Member HowtoForge Supporter

    Hi Till.
    Yup...seems to have done something...
    In the users prefs now spamc is written in !
    buit i have a stron feeling that /usr/bin/spamc is not yet being used.
    At least though spamassassin isn't used for sure now....the average load is really beautyful !
    How can i make sure spamc is working now ?
    ps ax | grep spamc doesnt show me an process running (maybe due to fast processes vanishing ?)
    ps ax | grep spam says:
    7082 ? Ss 0:00 /usr/sbin/spamd -d -c -L -r /var/run/
    7083 ? S 0:00 spamd child
    7084 ? S 0:00 spamd child

    thanx for your help. heavilly appreciating it !!!
  16. teves

    teves Member

    Some more input:

    spamc seems to be running, but does not work correctly:
    in my mail.err i have dozens of entries like the following:

    Sep 11 10:39:49 whitespace spamc[20553]: invalid usage

    What can be wrong?

    regards, tom
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Please replce the line:

    | //usr/bin/spamc --prefs-file={PREFS_FILE}


    | /usr/bin/spamc

    in the template file and then force ISPConfig to update the files again.
  18. tafkaz

    tafkaz Member HowtoForge Supporter

    GREAT !

    That seems to have solved our problem...
    we'll see what the affect on the servers load will be, but for now:
    Many thanks...

    If everything is good, i will write a small howto, so the next one will not have to go through our whole thread !

  19. falko

    falko Super Moderator ISPConfig Developer

    That would be great! :)
  20. tafkaz

    tafkaz Member HowtoForge Supporter

    Hi till, hi all...

    Bad News....
    Spamd /Spamc seems to be running but all the spammails are just being sent nevertheless...
    I saw that the userprefs are not used...

    /srv/www/web1111/user/web1111_user/.spamassassin.rc says:

    * < 256000
    | /usr/bin/spamc

    So i guess, that spamd doesnt know what to do with spammails...

    shouldnt it say something like

    | /usr/bin/spamc --prefs-file={PREFS_FILE}

    ....this is indeed an enourmous problem...

    Many thanks for your reply

Share This Page