Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-01-2011, 04:52 AM
Member
 
Posts: 13
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
Reply With Quote
  #2 (permalink)  
Old 08-03-2011, 12:21 PM
ikt ikt is offline
Junior Member
 
Posts: 8
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?
Reply With Quote
  #3 (permalink)  
Old 08-04-2011, 12:32 AM
Member
 
Posts: 13
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
Reply With Quote
  #4 (permalink)  
Old 10-10-2011, 05:02 PM
Moderator
 
Posts: 1,432
Default

If you haven't seen it: Updating Spamassassin In ZCS 7.1.2
__________________
Elliot Wilen
Berkeley, CA

Don't forget to enter your Zimbra version in your forum profile.
Reply With Quote
  #5 (permalink)  
Old 10-13-2011, 02:17 AM
Member
 
Posts: 13
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
Reply With Quote
  #6 (permalink)  
Old 10-20-2011, 10:16 AM
New Member
 
Posts: 3
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?
Reply With Quote
  #7 (permalink)  
Old 10-21-2011, 12:22 AM
Member
 
Posts: 13
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..
Reply With Quote
  #8 (permalink)  
Old 11-03-2011, 01:46 AM
Member
 
Posts: 13
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.