Results 1 to 8 of 8

Thread: sa-update

  1. #1
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    5

    Default sa-update

    Hi,
    how can I update spamassassin rules on zimbra?

    I found /opt/zimbra/zimbramon/bin/sa-update but it updates directory /var/spamassassin/ when spamassassin uses /opt/zimbra/conf/spamassassin/

    I am using Zimbra 6.0.9

  2. #2
    Join Date
    Mar 2011
    Posts
    8
    Rep Power
    4

    Default

    Cheers, I'd been looking for where spamassassin is for ages!

    In regards to your issue, are you logged in as zimbra or are you using a root account or something else?

  3. #3
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    5

    Default

    I found that dirs relating to spamassassin:
    /opt/zimbra/conf/spamassassin
    /opt/zimbra/zimbramon/lib/Mail/SpamAssassin

    and binaries under
    /opt/zimbra/zimbramon/bin/

    I login as root, but execute sa-update as zimbra

  4. #4
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

  5. #5
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    5

    Default

    thanks, that's what I was looking for.
    now I'm updating spamassassin rules with that:
    Code:
    /opt/zimbra/zimbramon/bin/sa-update --updatedir /opt/zimbra/conf/spamassassin --allowplugins && /opt/zimbra/bin/zmamavisdctl restart

  6. #6
    Join Date
    Apr 2007
    Posts
    3
    Rep Power
    8

    Default zmamavisdctl doesn't work in cron

    When I run the command you listed via cron, it doesn't seem to do anything with amavisd. Nothing shows up in /var/log/zimbra.log about it starting up like it does when I run the command manually in a terminal.
    So, to that end, I put it on a separate line, and just had it sleep a bit before running (to give the sa-update time to finish).
    Here's what I get now:
    Code:
    Stopping amavisd... done.
    Starting amavisd...failed.
    Indeed, all messages after that get deferred into the queue, and I must run 'zmamavisdctl restart' manually to kick it back online. Any ideas?

  7. #7
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    5

    Default

    sa-update only returns 0 if it updates the rules, so using && only restarts amavis if rules are updated. It avoids unnecessary restarts of amavisd
    to make something appear on log you can use a script and redirect stdout to /var/log/sa-update.log when calling it at cron, for example

    Code:
    #!/bin/bash
    source /opt/zimbra/.bashrc
    /opt/zimbra/zimbramon/bin/sa-update --updatedir /opt/zimbra/conf/spamassassin --allowplugins
    if [ $? -eq 0 ]; then
      echo "`date +"%b %d %X"`: Spamassassin rules updated, restarting amavis"
      /opt/zimbra/bin/zmamavisdctl restart
    else
      echo "`date +"%b %d %X"`: Spamassassin rules already up to date"
    fi
    I don't know why your amavisd refuses to start, you should look at zimbra log for clues
    Last edited by tictacbum; 11-03-2011 at 01:45 AM.

  8. #8
    Join Date
    Jan 2010
    Posts
    14
    Rep Power
    5

    Default

    I added "source /opt/zimbra/.bashrc" to above script to load zimbra paths, since zimbra was refusing to start due to missing perl modules

Similar Threads

  1. Replies: 7
    Last Post: 02-13-2013, 01:36 AM
  2. update from network edition to open source
    By nashwa_sowelam@avit.com.eg in forum Administrators
    Replies: 7
    Last Post: 07-14-2011, 12:33 PM
  3. Update 6.0.6_GA_2324.UBUNTU8 UBUNTU8 FOSS edition.
    By kline in forum Administrators
    Replies: 2
    Last Post: 05-05-2011, 02:29 AM
  4. Cannot update ZCS connector to newest version
    By widow in forum Zimbra Connector for Outlook
    Replies: 2
    Last Post: 01-31-2011, 11:01 AM
  5. i am so tired for zimbra update too quickly!!
    By nxzwt in forum Administrators
    Replies: 7
    Last Post: 05-08-2007, 09:47 AM

Tags for this Thread

Posting Permissions

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