Results 1 to 6 of 6

Thread: How to install dspam in 5.0

  1. #1
    Join Date
    Jul 2007
    Posts
    72
    Rep Power
    8

    Default How to install dspam in 5.0

    Here is how I did it, for those of you wondering how to get dspam to work w/ 5.0

    nano /opt/zimbra/conf/amavisd.conf.in

    uncomment this line
    #$dspam = '/opt/zimbra/dspam/bin/dspam';

    Save

    chown -R zimbra:zimbra /opt/zimbra/dspam-3.8.0


    nano /opt/zimbra/bin/zmtrainsa

    replace
    for f in ${spamdir}/*; do
    test -f ${f} && ${zimbra_home}/dspam/bin/dspam_corpus --addspam zimbra ${f}
    done
    for f in ${hamdir}/*; do
    test -f ${f} && ${zimbra_home}/dspam/bin/dspam_corpus zimbra ${f}
    done

    with
    ${zimbra_home}/dspam/bin/dspam_train zimbra ${spamdir} ${hamdir}


    That should do it....

  2. #2
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    74
    Rep Power
    8

    Default

    Great summary!

    Additionally you should uncomment the Dspam cleanup lines in crontab.

    crontab -e

  3. #3
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    ..... and you also need the 'Feature Chained' changed to 'Tokenizer chain' in the dspam.conf.
    Last edited by phoenix; 03-26-2008 at 04:35 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  4. #4
    Join Date
    Feb 2007
    Location
    Germany
    Posts
    74
    Rep Power
    8

    Default

    I looked at /opt/zimbra/bin/zmtrainsa and saw this lines:

    Code:
      if [ x"$DSPAM" = "xenabled" ]; then
        timestampit "Starting dspam training"
            ${zimbra_home}/dspam/bin/dspam_train zimbra ${spamdir} ${hamdir}
    
        ${zimbra_home}/dspam/bin/dspam_clean -p0 $USER
        timestampit "Finished dspam training"
      fi
    
      if [ x"$DSPAM" = "xenabled" ]; then
        timestampit  "Starting dspam $MODE training for $USER using folder $FOLDER"
        if [ $MODE == "ham" ]; then
                MODE="innocent"
        fi
    
        ${zimbra_home}/dspam/bin/dspam --user zimbra --class=${MODE} --source=corpus --mode=teft \
          --feature=chained,noise --stdout
    
        ${zimbra_home}/dspam/bin/dspam_clean -p0 $USER
        timestampit  "Finished dspam $MODE training for $USER using folder $FOLDER"
      fi

    Should $DSPAM be set to "enabled"? If yes where should I do it? In this file?

  5. #5
    Join Date
    Jul 2007
    Posts
    72
    Rep Power
    8

    Default

    Also found this in bugzilla

    This problem still occurs in ZCA 5.x, relevant code from the zmfixperms script
    is here:

    if [ -L ${zimbra_home}/dspam ]; then
    printMsg "Fixing ownership and permisions on ${zimbra_home}/dspam"
    chown ${root_user}:${root_group} ${zimbra_home}/dspam-*
    chown -R ${root_user}:${root_group} ${zimbra_home}/dspam/*
    fi

    ownership should be zimbra:zimbra for these directories/files.

    This can be an annoying problem if you're doing a disaster recovery and apply
    this script expecting that DSPAM to be working (obviously after enabling it in
    current versions), unless you check the logs it can be easy to miss.

    The corrected code for zmfizperms should be:

    if [ -L ${zimbra_home}/dspam ]; then
    printMsg "Fixing ownership and permisions on ${zimbra_home}/dspam"
    chown ${zimbra_user}:${zimbra_group} ${zimbra_home}/dspam-*
    chown -R ${zimbra_user}:${zimbra_group} ${zimbra_home}/dspam/*
    fi

  6. #6
    Join Date
    Sep 2006
    Posts
    11
    Rep Power
    9

    Default

    Shouldn't the last two lines in the crontab entry for log cleanup be the following instead?
    Code:
    /opt/zimbra/dspam/bin/dspam_logrotate -a 60 -l /opt/zimbra/dspam/var/dspam/system.log
    /opt/zimbra/dspam/bin/dspam_logrotate -a 60 -d /opt/zimbra/dspam/var/dspam

Similar Threads

  1. Replies: 9
    Last Post: 12-21-2007, 12:09 PM
  2. ZCS 5.0 FOSS is Released!!!
    By jholder in forum Announcements
    Replies: 1
    Last Post: 12-21-2007, 11:21 AM
  3. dspam errors after 5.0 upgrade
    By Krishopper in forum Administrators
    Replies: 2
    Last Post: 12-20-2007, 04:57 PM
  4. Replies: 21
    Last Post: 09-27-2007, 11:49 AM
  5. Configuring and using DSPAM
    By JoshuaPrismon in forum Administrators
    Replies: 55
    Last Post: 03-02-2007, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •