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 06-27-2007, 11:12 AM
Advanced Member
 
Posts: 193
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]$
Reply With Quote
  #2 (permalink)  
Old 06-28-2007, 04:39 PM
Advanced Member
 
Posts: 193
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]$
Reply With Quote
  #3 (permalink)  
Old 06-28-2007, 05:25 PM
Advanced Member
 
Posts: 193
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}
Reply With Quote
  #4 (permalink)  
Old 06-29-2007, 10:40 AM
Former Zimbran
 
Posts: 5,606
Default

Upgrade to 4.5.6

We had some problems with zmtrainsa in 4.5.5
Reply With Quote
  #5 (permalink)  
Old 07-05-2007, 12:11 PM
Advanced Member
 
Posts: 193
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]$
Reply With Quote
  #6 (permalink)  
Old 07-05-2007, 01:54 PM
Former Zimbran
 
Posts: 5,606
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
Reply With Quote
  #7 (permalink)  
Old 07-09-2007, 12:45 PM
Advanced Member
 
Posts: 193
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..
Reply With Quote
  #8 (permalink)  
Old 07-09-2007, 12:49 PM
Advanced Member
 
Posts: 193
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}
Reply With Quote
  #9 (permalink)  
Old 07-09-2007, 12:52 PM
Advanced Member
 
Posts: 193
Default

well, it turns out it just didn't like me running the command from my home directory.
damn
Reply With Quote
  #10 (permalink)  
Old 07-09-2007, 01:19 PM
Zimbra Consultant & Moderator
 
Posts: 19,653
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
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.