Results 1 to 10 of 10

Thread: zmtrainsa - can't find site rules

  1. #1
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default zmtrainsa - can't find site rules

    one of our accounts only fills up with spam so i'm trying to train our filter from the command line, i ran the following command but it doesn't look like it's working and i'm not quite sure why.

    [zimbra@mail reza]$ zmtrainsa mail.rndcomputing.com dan@lethalnetworks.com **** spam inbox
    92 messages for dan@lethalnetworks.com at mail.rndcomputing.com (folder inbox).
    reading message dan@lethalnetworks.com@mail.rndcomputing.com:1 of 92 (1165 header octets) . (269 body octets) config: could not find site rules directory
    archive-iterator: raw location "-" is not supported at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/ArchiveIterator.pm line 734.

    Learned from 0 message(s) (0 message(s) examined).
    not flushed
    reading message dan@lethalnetworks.com@mail.rndcomputing.com:2 of 92 (1365 header octets) . (26563 body octets) .......config: could not find site rules directory
    archive-iterator: raw location "-" is not supported at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/ArchiveIterator.pm line 734.

    Learned from 0 message(s) (0 message(s) examined).
    fetchmail: SIGPIPE thrown from an MDA or a stream socket error
    fetchmail: socket error while delivering to SMTP host mail.rndcomputing.com
    fetchmail: Query status=2 (SOCKET)
    config: could not find site rules directory
    Training DSPAM
    [zimbra@mail reza]$

  2. #2
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    just tried it on another mailbox, same issue i believe

    [zimbra@mail reza]$ zmtrainsa mail.rndcomputing.com dotty@thefeld.com **** spam Junk
    10122 messages for dotty@thefeld.com at mail.rndcomputing.com (folder Junk).
    reading message dotty@thefeld.com@mail.rndcomputing.com:1 of 10122 (1654 header octets) . (667 body octets) .config: could not find site rules directory
    archive-iterator: raw location "-" is not supported at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/ArchiveIterator.pm line 734.

    Learned from 0 message(s) (0 message(s) examined).
    not flushed
    reading message dotty@thefeld.com@mail.rndcomputing.com:2 of 10122 (1837 header octets) . (566 body octets) .config: could not find site rules directory
    archive-iterator: raw location "-" is not supported at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/ArchiveIterator.pm line 734.

    Learned from 0 message(s) (0 message(s) examined).
    not flushed
    reading message dotty@thefeld.com@mail.rndcomputing.com:3 of 10122 (1583 header octets) . (2508 body octets) ..config: could not find site rules directory
    archive-iterator: raw location "-" is not supported at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/ArchiveIterator.pm line 734.

    Learned from 0 message(s) (0 message(s) examined).
    fetchmail: SIGPIPE thrown from an MDA or a stream socket error
    fetchmail: socket error while fetching from mail.rndcomputing.com
    fetchmail: Query status=2 (SOCKET)
    config: could not find site rules directory
    bayes: synced databases from journal in 1 seconds: 375 unique entries (422 total entries)
    Training DSPAM
    [zimbra@mail reza]$

  3. #3
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    just did a little more digging around

    i did the following in one shell
    [zimbra@mail reza]$ /opt/zimbra/bin/zmtrainsa --cleanup >> /opt/zimbra/log/spamtrain.log 2>&1
    [zimbra@mail reza]$ /opt/zimbra/bin/zmtrainsa >> /opt/zimbra/log/spamtrain.log 2>&1

    and tail'd the spamtrain.log in another shell and found the following
    [zimbra@mail reza]$ tail -f /opt/zimbra/log/spamtrain.log
    [] INFO: Total messages processed: 164
    [] INFO: Total messages processed: 0
    Learned from 14 message(s) (164 message(s) examined).
    Learned from 0 message(s) (0 message(s) examined).
    bayes: synced databases from journal in 1 seconds: 4726 unique entries (5295 total entries)
    [] INFO: Total messages processed: 90
    [] INFO: Total messages processed: 0
    [] INFO: Total messages processed: 1580
    [] INFO: Total messages processed: 0
    /bin/rm: cannot get current directory: Permission denied
    [] INFO: Total messages processed: 1560
    [] INFO: Total messages processed: 0
    Learned from 1525 message(s) (1560 message(s) examined).
    Learned from 0 message(s) (0 message(s) examined).
    bayes: synced databases from journal in 0 seconds: 138 unique entries (138 total entries)
    /bin/rm: cannot get current directory: Permission denied
    rm: remove.c:378: AD_pop_and_chdir: Assertion `AD_stack_height (ds)' failed.
    /opt/zimbra/bin/zmtrainsa: line 27: 31687 Aborted /bin/rm -rf ${spamdir} ${hamdir}

  4. #4
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    Upgrade to 4.5.6

    We had some problems with zmtrainsa in 4.5.5

  5. #5
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    hey, just upgraded and tried running the zmtrainsa command that's in the crontab files and received the following output

    [zimbra@mail reza]$ /opt/zimbra/bin/zmtrainsa >> /opt/zimbra/log/spamtrain.log
    /bin/rm: cannot get current directory: Permission denied
    rm: remove.c:378: AD_pop_and_chdir: Assertion `AD_stack_height (ds)' failed.
    /opt/zimbra/bin/zmtrainsa: line 27: 26589 Aborted /bin/rm -rf ${spamdir} ${hamdir}
    [zimbra@mail reza]$ zmcontrol -v


    Release 4.5.6_GA_1023.RHEL4_64_20070627170359 RHEL4_64 NETWORK edition

    [zimbra@mail reza]$

  6. #6
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    You may wish to check out the permissions on /opt/zimbra/bin (your current working directory) as well as /tmp

    ls -ld /opt/zimbra /opt/zimbra/bin /tmp

  7. #7
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    Quote Originally Posted by jholder View Post
    You may wish to check out the permissions on /opt/zimbra/bin (your current working directory) as well as /tmp

    /opt/zimbra/bin/rm doesn't seem to exist.
    should i just cp rm from /bin/rm to /opt/zimbra/bin/rm ?

    ls -ld /opt/zimbra /opt/zimbra/bin /tmp
    [zimbra@mail reza]$ ls -ld /opt/zimbra /opt/zimbra/bin /tmp
    drwxr-xr-x 49 root root 4096 Jul 1 13:24 /opt/zimbra
    drwxr-xr-x 2 root root 4096 Jul 1 13:20 /opt/zimbra/bin
    drwxrwxrwt 33 root root 4096 Jul 9 11:45 /tmp

    [zimbra@mail reza]$ zmcontrol -v
    Release 4.5.6_GA_1023.RHEL4_64_20070627170359 RHEL4_64 NETWORK edition
    Last edited by reza225; 07-09-2007 at 12:47 PM.

  8. #8
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    Well i tried just copying /bin/rm to /opt/zimbra/bin/rm

    [root@mail reza]# cp /bin/rm /opt/zimbra/bin/rm

    [root@mail reza]# su zimbra

    [zimbra@mail reza]$ crontab -l |grep train
    # Spam training
    0 23 * * * /opt/zimbra/bin/zmtrainsa >> /opt/zimbra/log/spamtrain.log 2>&1
    # Spam training cleanup
    45 23 * * * /opt/zimbra/bin/zmtrainsa --cleanup >> /opt/zimbra/log/spamtrain.log 2>&1

    [zimbra@mail reza]$ /opt/zimbra/bin/zmtrainsa >> /opt/zimbra/log/spamtrain.log
    /bin/rm: cannot get current directory: Permission denied
    rm: remove.c:378: AD_pop_and_chdir: Assertion `AD_stack_height (ds)' failed.
    /opt/zimbra/bin/zmtrainsa: line 27: 14117 Aborted /bin/rm -rf ${spamdir} ${hamdir}

  9. #9
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    9

    Default

    well, it turns out it just didn't like me running the command from my home directory.
    damn

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

    Default

    Quote Originally Posted by reza225 View Post
    well, it turns out it just didn't like me running the command from my home directory.
    damn
    The correct command is "su - zimbra" hyphen is important.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Similar Threads

  1. Rules du Jour - spamassassin
    By sturgis in forum Administrators
    Replies: 10
    Last Post: 11-27-2007, 10:12 AM
  2. How can I fix zmtrainsa?
    By ms2k in forum Administrators
    Replies: 11
    Last Post: 04-16-2007, 11:11 AM
  3. Replies: 3
    Last Post: 10-15-2006, 09:54 AM
  4. Spam assassain not traiing properly!
    By Mike T in forum Administrators
    Replies: 1
    Last Post: 10-09-2006, 02:34 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
  •