Re: sieve script not running?

2003-07-13 Thread Rob Siemborski
On Mon, 7 Jul 2003, Amos Gouaux wrote:

 ib You are missing -lsocket -lnsl in your link statement.

 Maybe that library changed between 2.1.12 and 2.1.13 to require
 those libraries?  I notice the compile line is the same for both,
 but since 2.1.13 the error above appears.

Yeah, it did.  I've added LIB_SOCKET to the link line for the test program
which should solve this.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper



Re: sieve script not running?

2003-07-09 Thread Hank Beatty
On Tue, 2003-07-08 at 16:11, Ken Murchison wrote:
 Hank Beatty wrote:
 
  Ken,
  
  Thanks for all of your help. I still haven't gotten this to work and
  would like to insert some debugging stuff to go to syslog. Could you
  tell me where in the code I should start?
 
 I'd add some stuff to lmtpd.c:sieve_find_script() to make sure that the 
 path to the script is correct and lmtpd.c:sieve_fileinto() which would 
 print out the userid and mailbox and the result of deliver_mailbox().
 
 I'm pretty certain that this is some kind of config/usage problem, since 
 I've been using Sieve with 2.2 since the day I started working on the 
 2.2 branch.  Are you using the 2.2.0 tarball or the latest 2.2 from CVS? 
   Its entirely possible that there have been some Sieve related fixes 
 sinve the 2.2.0 release.

Thank you Ken.

Once I pulled the CVS version, installed it, and placed my scripts they
started working.

Regards,
-- 
Hank Beatty [EMAIL PROTECTED]



Re: sieve script not running?

2003-07-08 Thread Hank Beatty
On Mon, 2003-07-07 at 15:56, Ken Murchison wrote:
 Test your script/message combo by running the them through the 
 sieve/test.c program in the distro.  Once it works there, then you can 
 work on lmtpd/timsieved problems.
 

This seems to work:

[EMAIL PROTECTED] scriptTestDir]# ./test 216. test.bc
filing message '216.' into 'Junk Mail'

but the script still doesn't work when the mail comes into the INBOX.

Is there a way to turn on more logging to syslog?

-- 
Hank Beatty [EMAIL PROTECTED]



Re: sieve script not running?

2003-07-08 Thread Ken Murchison


Hank Beatty wrote:
On Mon, 2003-07-07 at 15:56, Ken Murchison wrote:

Test your script/message combo by running the them through the 
sieve/test.c program in the distro.  Once it works there, then you can 
work on lmtpd/timsieved problems.



This seems to work:

[EMAIL PROTECTED] scriptTestDir]# ./test 216. test.bc
filing message '216.' into 'Junk Mail'
but the script still doesn't work when the mail comes into the INBOX.

Is there a way to turn on more logging to syslog?


Not really, there isn't a lot of logging for sieve.  Is your script 
activated?  There shgould be a link from default.bc to your active 
script.  Are the permissions on the script correct?  It should be at 
least readable byt the cyrus user.

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: sieve script not running?

2003-07-08 Thread Hank Beatty
On Tue, 2003-07-08 at 08:26, Ken Murchison wrote:

 Not really, there isn't a lot of logging for sieve.  Is your script 
 activated?  There shgould be a link from default.bc to your active 
 script.  Are the permissions on the script correct?  It should be at 
 least readable byt the cyrus user.

It appears that both of those are true:

[EMAIL PROTECTED] scriptTestDir]# ll
/usr/sieve/domain/R/domain.net/W/user/
total 16
lrwxrwxrwx1 cyrusmail7 Jul  7 11:32 default.bc -
test.bc
-rw---1 cyrusmail  232 Jul  7 11:02 phpscript.bc
-rw---1 cyrusmail  202 Jul  7 11:02 phpscript.script
-rw---1 cyrusmail  116 Jul  8 07:57 test.bc
-rw---1 cyrusmail   95 Jul  8 07:57 test.script

Is it normal for the user created folders to be created under the mail
directory?

user/user/mail/Junk Mail@domain.net (\HasNoChildren)

and does that change how the script should be written?

-- 
Hank Beatty [EMAIL PROTECTED]



Re: sieve script not running?

2003-07-08 Thread Ken Murchison


Hank Beatty wrote:

On Tue, 2003-07-08 at 08:26, Ken Murchison wrote:


Not really, there isn't a lot of logging for sieve.  Is your script 
activated?  There shgould be a link from default.bc to your active 
script.  Are the permissions on the script correct?  It should be at 
least readable byt the cyrus user.


It appears that both of those are true:

[EMAIL PROTECTED] scriptTestDir]# ll
/usr/sieve/domain/R/domain.net/W/user/
total 16
lrwxrwxrwx1 cyrusmail7 Jul  7 11:32 default.bc -
test.bc
-rw---1 cyrusmail  232 Jul  7 11:02 phpscript.bc
-rw---1 cyrusmail  202 Jul  7 11:02 phpscript.script
-rw---1 cyrusmail  116 Jul  8 07:57 test.bc
-rw---1 cyrusmail   95 Jul  8 07:57 test.script
Is it normal for the user created folders to be created under the mail
directory?
Ahh!  I hadn't noticed that.


user/user/mail/Junk Mail@domain.net (\HasNoChildren)

and does that change how the script should be written?


Yes, in this case your script must read:

fileinto INBOX/mail/Junk Mail;  /* altnamespace: no */

OR

fileinto mail/Junk Mail;  /* altnamespace: yes */

--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: sieve script not running?

2003-07-08 Thread Hank Beatty
On Tue, 2003-07-08 at 10:15, Ken Murchison wrote:

 Yes, in this case your script must read:
 
 fileinto INBOX/mail/Junk Mail;  /* altnamespace: no */
 
 OR
 
 fileinto mail/Junk Mail;  /* altnamespace: yes */

Hmm. That didn't work either.

I really appreciate your help. I just know it is something small missing
somewhere.

-- 
Hank Beatty [EMAIL PROTECTED]



Re: sieve script not running?

2003-07-07 Thread Ken Murchison
Test your script/message combo by running the them through the 
sieve/test.c program in the distro.  Once it works there, then you can 
work on lmtpd/timsieved problems.

Hank Beatty wrote:

I'm working with the 2.2 version and have this sieve script:

require [fileinto];
if header :contains X-Spam-Flag YES {
fileinto Junk Mail;
}
The Junk Mail folder does exist:

user/username/INBOX.Drafts@domain.net (\HasNoChildren)
user/username/INBOX.Sent@domain.net (\HasNoChildren)
user/username/INBOX.Trash@domain.net (\HasNoChildren)
user/username/mail/Drafts@domain.net (\HasNoChildren)
user/username/mail/Family@domain.net (\HasNoChildren)
user/username/mail/Junk Mail@domain.net (\HasNoChildren)
user/username/mail/Sent@domain.net (\HasNoChildren)
user/username/mail/Trash@domain.net (\HasNoChildren)
user/username@domain.net (\HasChildren)
I can use sieveshell to upload and activate the script.


list
phpscript
test  - active script
imapd.conf

##
# Global info's
##
configdirectory: /var/imap
partition-default: /var/spool/imap
unixhierarchysep: yes
altnamespace: yes
imapidresponse: no
##
# Autentification  User rights
##
admins: cyrus murderbackend murderproxy
sasl_pwcheck_method: saslauthd
allowanonymouslogin: no
##
# Quota  Message size limit
##
quotawarn: 90
autocreatequota: 10240
lmtp_overquota_perm_failure: yes
defaultacl: anyone lrs
##
# Virtual Domain Support
##
virtdomains: yes
singleinstancestore: yes
duplicatesuppression: yes
foolstupidclients: yes
hashimapspool: yes
sievedir: /usr/sieve
sieveusehomedir: no
The sieve script was created in:

ls /usr/sieve/domain/R/domain.net/W/username/
default.bc  phpscript.bc  phpscript.script  test.bc  test.script
The script isn't moving any of the mail that has the spam flag set. Does
anyone have any ideas?
--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: sieve script not running?

2003-07-07 Thread Amos Gouaux
 On Mon, 07 Jul 2003 15:56:17 -0400,
 Ken Murchison [EMAIL PROTECTED] (km) writes:

km Test your script/message combo by running the them through the
km sieve/test.c program in the distro.

Oh, that reminds me of something.  I generally try to compile that
because it's handy for manually testing scripts (will this work
with 2.2?).  However, last time I tried, got this:

+ cd sieve 
+ gmake test 
gcc -c -I. -I.. -I. -I./../lib -I./../et -I/usr/local/BerkeleyDB.4.0/include  
-I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -I. -I. 
-Wall -g -O2 \
test.c
test.c: In function `hashheader':
test.c:70: warning: subscript has type `char'
test.c: In function `parseheader':
test.c:108: warning: subscript has type `char'
test.c:121: warning: subscript has type `char'
gcc -L/usr/local/lib -R/usr/local/lib -L/usr/local/BerkeleyDB.4.0/lib 
-R/usr/local/BerkeleyDB.4.0/lib -L/usr/local/lib -R/usr/local/lib  -L/usr/local/lib 
-L/usr/local/lib -o test \
 test.o libsieve.a ../et/libcom_err.a ../lib/libcyrus.a 
Undefined   first referenced
 symbol in file
shutdown../lib/libcyrus.a(util.o)
ld: fatal: Symbol referencing errors. No output written to test
collect2: ld returned 1 exit status
gmake: *** [test] Error 1


This is on Solaris 8 with gcc-3.2.3.


-- 
Amos



Re: sieve script not running?

2003-07-07 Thread Ken Murchison


Amos Gouaux wrote:
On Mon, 07 Jul 2003 15:56:17 -0400,
Ken Murchison [EMAIL PROTECTED] (km) writes:

km Test your script/message combo by running the them through the
km sieve/test.c program in the distro.
Oh, that reminds me of something.  I generally try to compile that
because it's handy for manually testing scripts (will this work
with 2.2?).
If you're asking if the test program will work with 2.2 (bytecode), the 
answer is yes, provided you compile the script with sievec first.

Which version of Cyrus gives the problem below?

 However, last time I tried, got this:
+ cd sieve 
+ gmake test 
gcc -c -I. -I.. -I. -I./../lib -I./../et -I/usr/local/BerkeleyDB.4.0/include  -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -I. -I. -Wall -g -O2 \
test.c
test.c: In function `hashheader':
test.c:70: warning: subscript has type `char'
test.c: In function `parseheader':
test.c:108: warning: subscript has type `char'
test.c:121: warning: subscript has type `char'
gcc -L/usr/local/lib -R/usr/local/lib -L/usr/local/BerkeleyDB.4.0/lib -R/usr/local/BerkeleyDB.4.0/lib -L/usr/local/lib -R/usr/local/lib  -L/usr/local/lib -L/usr/local/lib -o test \
 test.o libsieve.a ../et/libcom_err.a ../lib/libcyrus.a 
Undefined   first referenced
 symbol in file
shutdown../lib/libcyrus.a(util.o)
ld: fatal: Symbol referencing errors. No output written to test
collect2: ld returned 1 exit status
gmake: *** [test] Error 1

This is on Solaris 8 with gcc-3.2.3.




--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp


Re: sieve script not running?

2003-07-07 Thread Igor Brezac

On Mon, 7 Jul 2003, Ken Murchison wrote:



 Amos Gouaux wrote:
 On Mon, 07 Jul 2003 15:56:17 -0400,
 Ken Murchison [EMAIL PROTECTED] (km) writes:
 
 
  km Test your script/message combo by running the them through the
  km sieve/test.c program in the distro.
 
  Oh, that reminds me of something.  I generally try to compile that
  because it's handy for manually testing scripts (will this work
  with 2.2?).

 If you're asking if the test program will work with 2.2 (bytecode), the
 answer is yes, provided you compile the script with sievec first.

 Which version of Cyrus gives the problem below?

   However, last time I tried, got this:
 
  + cd sieve
  + gmake test
  gcc -c -I. -I.. -I. -I./../lib -I./../et -I/usr/local/BerkeleyDB.4.0/include  
  -I/usr/local/include -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -I. 
  -I. -Wall -g -O2 \
  test.c
  test.c: In function `hashheader':
  test.c:70: warning: subscript has type `char'
  test.c: In function `parseheader':
  test.c:108: warning: subscript has type `char'
  test.c:121: warning: subscript has type `char'
  gcc -L/usr/local/lib -R/usr/local/lib -L/usr/local/BerkeleyDB.4.0/lib 
  -R/usr/local/BerkeleyDB.4.0/lib -L/usr/local/lib -R/usr/local/lib  
  -L/usr/local/lib -L/usr/local/lib -o test \
   test.o libsieve.a ../et/libcom_err.a ../lib/libcyrus.a
  Undefined   first referenced
   symbol in file
  shutdown../lib/libcyrus.a(util.o)
  ld: fatal: Symbol referencing errors. No output written to test
  collect2: ld returned 1 exit status
  gmake: *** [test] Error 1
 

You are missing -lsocket -lnsl in your link statement.

-- 
Igor


Re: sieve script not running?

2003-07-07 Thread Amos Gouaux
 On Mon, 07 Jul 2003 21:13:22 -0400,
 Ken Murchison [EMAIL PROTECTED] (km) writes:

km Which version of Cyrus gives the problem below?

Reviewing my logs from my build script, it appears to have started
with 2.1.13.  Yeah, 2.1.12 compiled just fine.  Sorry for not
mentioning it sooner.  Kinda forgot about it.


-- 
Amos



Re: sieve script not running?

2003-07-07 Thread Amos Gouaux
 On Mon, 7 Jul 2003 21:34:37 -0400 (EDT),
 Igor Brezac [EMAIL PROTECTED] (ib) writes:

  gcc -L/usr/local/lib -R/usr/local/lib -L/usr/local/BerkeleyDB.4.0/lib 
  -R/usr/local/BerkeleyDB.4.0/lib -L/usr/local/lib -R/usr/local/lib  
  -L/usr/local/lib -L/usr/local/lib -o test \
   test.o libsieve.a ../et/libcom_err.a ../lib/libcyrus.a
  Undefined   first referenced
   symbol in file
  shutdown../lib/libcyrus.a(util.o)
  ld: fatal: Symbol referencing errors. No output written to test
  collect2: ld returned 1 exit status
  gmake: *** [test] Error 1
 

ib You are missing -lsocket -lnsl in your link statement.

Maybe that library changed between 2.1.12 and 2.1.13 to require
those libraries?  I notice the compile line is the same for both,
but since 2.1.13 the error above appears.

Yeah, as you say, adding those two fixes link problem.  Looks like
configure.in is missing something that the others have.

-- 
Amos