Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Problem with zmtrainsa

  1. #1
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,474
    Rep Power
    56

    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

  2. #2
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

    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

  3. #3
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

    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

  4. #4
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,474
    Rep Power
    56

    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

  5. #5
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    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.

  6. #6
    marcmac is offline Expert Member
    Join Date
    Sep 2005
    Posts
    2,103
    Rep Power
    13

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

  7. #7
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,474
    Rep Power
    56

    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.

  8. #8
    johndevine is offline Active Member
    Join Date
    Nov 2005
    Posts
    29
    Rep Power
    9

    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

  9. #9
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,474
    Rep Power
    56

    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.
    Last edited by phoenix; 11-24-2005 at 12:55 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  10. #10
    johndevine is offline Active Member
    Join Date
    Nov 2005
    Posts
    29
    Rep Power
    9

    Default

    Many Thanks Phoenix

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

    JD

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 12-18-2006, 11:50 PM
  2. zmtrainsa problem
    By rvissers in forum Administrators
    Replies: 0
    Last Post: 09-26-2006, 11:25 AM
  3. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 11:11 PM
  4. zmtrainsa problem
    By Splat in forum Administrators
    Replies: 7
    Last Post: 01-17-2006, 01:37 PM

Posting Permissions

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