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 11-18-2005, 09:53 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default Problem with zmtrainsa

I used zmtrainsa without problems in the last release of Zimbra, now it throw up errors.

If I use zmtrainsa (with a correct host/user/password/spam/folder from the zimbra account I get the following errors:

Code:
/opt/zimbra/bin/zmtrainsa: line 56: /opt/zimbra/.fetchmailrc: No such file or directory
chmod: cannot access `/opt/zimbra/.fetchmailrc': No such file or directory
Enter password for bpye@chinook:
fetchmail: lock creation failed.
config: configuration file "/opt/zimbra/conf/spamassassin/20_body_tests.cf" requires version 3.000004 of SpamAssassin, but this is code version 3.001000. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Conf/Parser.pm line 342.
It produces one error line for each file in the conf folder.

Has this been changed in this release, It is possible that I may have updated a cpan spamassassin module would this cause the problem?

Regards


Bill
Reply With Quote
  #2 (permalink)  
Old 11-18-2005, 09:59 AM
Zimbra Employee
 
Posts: 2,103
Default permissions

This is a permissions issue - when we dropped IPtables and went to an all-sudo approach, we set /opt/zimbra to root ownership for security reasons.

Fetchmail is trying to write .fetchmailrc in /opt/zimbra - you can bypass this error by touching the file (as root) and chowning it to zimbra

Another error will then show up, though - fetchmail can't create lock file. I haven't figured out how to force it to create the lock in /tmp, instead of ${HOME} - so the only workaround I've got so far is:

su - root
chown zimbra /opt/zimbra
su - zimbra
zmtrainsa ...
su - root
chown root /opt/zimbra
Reply With Quote
  #3 (permalink)  
Old 11-18-2005, 10:28 AM
Zimbra Employee
 
Posts: 2,103
Default Fix

Ok, I've taken another look, and have a fix.

Update zmtrainsa to use a different fetchmailrc by changing these lines.

echo "server $SERVER user $USER@$SERVER password $PASS keep" > ${zimbra_home}/conf/.fetchmailrc
chmod 600 ${zimbra_home}/conf/.fetchmailrc

export HOME=${zimbra_home}/conf # Add this line

/usr/bin/fetchmail -f ${zimbra_home}/conf/.fetchmailrc -n -a -u $USER $FOLDER -m "${zimbra_home}/bin/sa-learn -p ${zimbra_home}/conf/salocal.cf --dbpath ${zimbra_home}/amavisd/.spamassassin/ --no-sync --showdots -L --${MODE}" ${SERVER}


# This line is unchanged
${zimbra_home}/bin/sa-learn -p ${zimbra_home}/conf/salocal.cf --dbpath ${zimbra_home}/amavisd/.spamassassin/ --sync


rm -f ${zimbra_home}/conf/.fetchmailrc
Reply With Quote
  #4 (permalink)  
Old 11-18-2005, 10:44 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Thanks for that, it works a treat although I still get the errors about the code version being wrong:
Code:
reading message emailaddress[at]none.com :1 of 4 (1922 header octets) . (467 body octets) .config: configuration file "/opt/zimbra/conf/spamassassin/20_body_tests.cf" requires version 3.000004 of SpamAssassin, but this is code version 3.001000. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Conf/Parser.pm line 342.
Is it my cpan spamassassin update causing this?

Regards

Bill
Reply With Quote
  #5 (permalink)  
Old 11-18-2005, 10:50 AM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by phoenix
Thanks for that, it works a treat although I still get the errors about the code version being wrong:
Code:
reading message emailaddress[at]none.com :1 of 4 (1922 header octets) . (467 body octets) .config: configuration file "/opt/zimbra/conf/spamassassin/20_body_tests.cf" requires version 3.000004 of SpamAssassin, but this is code version 3.001000. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Conf/Parser.pm line 342.
Is it my cpan spamassassin update causing this?

Regards

Bill
Yep. I ran into the same thing. If you upgrade your version of SpamAssassin to the newest version, some of the rules in zimbra are hardcoded with a older version requirement. I just removed the offending line and things seemed to work.
Reply With Quote
  #6 (permalink)  
Old 11-18-2005, 10:50 AM
Zimbra Employee
 
Posts: 2,103
Default Probably

You can copy your conf files to /opt/zimbra/conf/spamassassin to get past this, most likely. (I'm not sure where CPAN puts them.)
Reply With Quote
  #7 (permalink)  
Old 11-18-2005, 11:08 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Thanks to you both for that, I'll dig around and see what the files have got in them and where the new ones are.
Reply With Quote
  #8 (permalink)  
Old 11-23-2005, 11:25 AM
Active Member
 
Posts: 29
Default

Hi Marc

Again a bit confused ....sorry for the ignorance at this stage, which conf files should i replace?

Many thanks for your time

JD
Reply With Quote
  #9 (permalink)  
Old 11-23-2005, 11:34 AM
Zimbra Consultant & Moderator
 
Posts: 20,314
Default

Hi

A lot of the files in this directory /opt/zimbra/conf/spamassassin have this entry in them 'require_version 3.000004' (I'm afraid you'll have to check them all) - just comment it out or remove it and the problem goes away.
__________________
Regards


Bill

Last edited by phoenix; 11-23-2005 at 11:55 PM..
Reply With Quote
  #10 (permalink)  
Old 11-23-2005, 11:46 AM
Active Member
 
Posts: 29
Default

Many Thanks Phoenix

By the way...there does not seem to be many rules in this sa....is this normal?

JD
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.