Re: Sieve script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 3:18 PM, Willem Offermans wrote:

Dear Andrea and Cyrus friends,

That is exactly the point: it was not ``stupid`` in any way.
It was ignorance, which we can only avoid by improving the
documentation.


I blame myself for this; I'll be glad if the documentation was improved, 
obviously.





By the way, the debug/logging question is still not answered.
Debugging/logging might also enlighten the user/administrator.


That's right.
Better logs would be a very big improvement: what I was looking for was 
an option to write sieve activity (like "executing script ...", "message 
moved to folder ...", etc...).
That would have confirmed the script was NOT even executed (and avoided 
several attempts at modifying it).




 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script not working

2019-03-01 Thread Willem Offermans
Dear Andrea and Cyrus friends,

That is exactly the point: it was not ``stupid`` in any way.
It was ignorance, which we can only avoid by improving the 
documentation.

By the way, the debug/logging question is still not answered.
Debugging/logging might also enlighten the user/administrator.



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 15:04, Andrea Venturoli  wrote:
> 
> On 3/1/19 12:31 PM, Michael Menge wrote:
> 
>> is the script activated?
> 
> Uh, no!
> 
> 
> 
>> a user can have multiple scripts stored on the server
>> but only one can be activated at the same time. On the filesystem there 
>> should
>> be a "defaultbc"  which is a soft link to the active bc file.
> 
> There was no such link.
> 
> I have now "activated" this script and hope I can confirm it working the next 
> time this account receives spam.
> 
> 
> 
> I guess this was it and I'm glad it was somethin so "stupid" on my part.
> 
> Thanks.
> 
> 
> 
> bye
>   av.
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 12:31 PM, Michael Menge wrote:


is the script activated?


Uh, no!



a user can have multiple scripts stored on the 
server
but only one can be activated at the same time. On the filesystem there 
should

be a "defaultbc"  which is a soft link to the active bc file.


There was no such link.

I have now "activated" this script and hope I can confirm it working the 
next time this account receives spam.




I guess this was it and I'm glad it was somethin so "stupid" on my part.

Thanks.



 bye
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Michael Menge

Hi


Quoting Willem Offermans :


Dear Michael and Cyrus friends,

Where is this documented?




I cannot find anything about this in

https://www.cyrusimap.org/imap/reference/admin/sieve.html  



The example shown in section "Testing the sieve server"
https://www.cyrusimap.org/imap/reference/admin/sieve.html#testing-the-sieve-server

# To place this script on the server run the following command:
#
# sieveshell servername
# Please enter your password: **
#> put myscript.script
#> activate myscript
#> quit
#
#This should place your script on the server and make it the active script.

As timsieved implements rfc5804 there is also
https://tools.ietf.org/html/rfc5804#section-1.4



How should a user/administrator know?

Pay attention to

https://www.cyrusimap.org/imap/reference/manpages/usercommands/sieveshell.html#std:cyrusman-sieveshell(1)  



and look at activate/deactivate.

This is sufficient documentation according to the developer, who  
spent many hours in the code, I guess.
However, an ignorant user only gets a hint at most. Where is  
defaultbc mentioned? Be aware that the
text the user reads is far away off what the user experiences, when  
he uses sieveshell. There is no

(visual) connection between the two. It is a challenge to find your way.



I don't know if the defaultbc is documented somewhere, google found
some old list mails from 2007 and a thread on a german linux forum.
So there is room for improvement.

The users can't normally see this file, it is only visible indirect as the
active script is shown / marked in timsieved / sieveshell "list" command.






M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Willem Offermans
Dear Michael and Cyrus friends,

Where is this documented?

I cannot find anything about this in

https://www.cyrusimap.org/imap/reference/admin/sieve.html 


How should a user/administrator know?

Pay attention to

https://www.cyrusimap.org/imap/reference/manpages/usercommands/sieveshell.html#std:cyrusman-sieveshell(1)
 


and look at activate/deactivate. 

This is sufficient documentation according to the developer, who spent many 
hours in the code, I guess.
However, an ignorant user only gets a hint at most. Where is defaultbc 
mentioned? Be aware that the 
text the user reads is far away off what the user experiences, when he uses 
sieveshell. There is no 
(visual) connection between the two. It is a challenge to find your way. 

I’m a bit ashamed, but I found a way to contribute to the documentation:

https://www.cyrusimap.org/imap/developer/documentation.html

It is better for me to contribute. 

I hope I can find some time ...



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 12:31, Michael Menge  
> wrote:
> 
> Hi
> 
> Quoting Andrea Venturoli :
> 
>> On 3/1/19 12:04 PM, Willem Offermans wrote:
>> 
>>> (big snip on the rest)
>>> $ man timsieved
>>> TIMSIEVED(8)   
>>> TIMSIEVED(8)
>> 
>> Just to make sure I've clarified this: the script *is* there.
>> 
>>> ls /var/imap/sieve/u/user1
>>> user1.sieve.bc  user1.sieve.script
>> 
> 
> is the script activated? a user can have multiple scripts stored on the server
> but only one can be activated at the same time. On the filesystem there should
> be a "defaultbc"  which is a soft link to the active bc file.
> 
>> The content of user1.sieve.script is the script I installed via sieveshell; 
>> user1.sieve.bc is a bytecode file where some strings (i.e. regex and folder 
>> names) match the original script, so I think it's right.
>> 
>> As I said, the same goes for user2 and user3, but for those users the script 
>> also works.
>> 
>> bye & Thanks
>>  av.
>> 
>> Cyrus Home Page: http://www.cyrusimap.org/
>> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
>> To Unsubscribe:
>> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
> 
> 
> 
> 
> M.MengeTel.: (49) 7071/29-70316
> Universität Tübingen   Fax.: (49) 7071/29-5912
> Zentrum für Datenverarbeitung  mail: 
> michael.me...@zdv.uni-tuebingen.de
> Wächterstraße 76
> 72074 Tübingen
> 
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Michael Menge

Hi

Quoting Andrea Venturoli :


On 3/1/19 12:04 PM, Willem Offermans wrote:


(big snip on the rest)
$ man timsieved
TIMSIEVED(8)   
 TIMSIEVED(8)


Just to make sure I've clarified this: the script *is* there.


ls /var/imap/sieve/u/user1
user1.sieve.bc  user1.sieve.script




is the script activated? a user can have multiple scripts stored on the server
but only one can be activated at the same time. On the filesystem there should
be a "defaultbc"  which is a soft link to the active bc file.

The content of user1.sieve.script is the script I installed via  
sieveshell; user1.sieve.bc is a bytecode file where some strings  
(i.e. regex and folder names) match the original script, so I think  
it's right.


As I said, the same goes for user2 and user3, but for those users  
the script also works.


 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus





M.MengeTel.: (49) 7071/29-70316
Universität Tübingen   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung  mail:  
michael.me...@zdv.uni-tuebingen.de

Wächterstraße 76
72074 Tübingen


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 12:04 PM, Willem Offermans wrote:

> (big snip on the rest)

$ man timsieved
TIMSIEVED(8) 
  TIMSIEVED(8)


Just to make sure I've clarified this: the script *is* there.


ls /var/imap/sieve/u/user1
user1.sieve.bc  user1.sieve.script


The content of user1.sieve.script is the script I installed via 
sieveshell; user1.sieve.bc is a bytecode file where some strings (i.e. 
regex and folder names) match the original script, so I think it's right.


As I said, the same goes for user2 and user3, but for those users the 
script also works.


 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Willem Offermans
Dear Andrea and Cyrus friends,

I remember from a long time ago, that documentation with respect to sieve was 
sparse.
It took me quite some time to set things up and to handle sieve back then. But 
even now
I wouldn’t know how to debug the sieve process. Most of the things in the 
background of the
sieve process are still mysterious to me. But it works very well from a 
perspective from a user.
Since then, it didn’t change for the better, I’m afraid.

It can happen with software development: nice and excellent code has been 
developed,
but the program is almost not useable or is only partly used with respect to 
its power, because of lack of 
documentation. Usually an excellent developer is a poor documenter. It is very 
time consuming and oh so boring to write
good documentation…. To a great frustration of the users … And this is not a 
judgement, I can understand both sides.

What can help in such a situation, is to dig into the original code.
If you are extremely lucky, the developer commented its code and you can 
follow, read and/or puzzle on
what is going on. It might give you hints on how to debug.
Also go through the original code distribution. Sometimes it includes ReadMe’s 
or examples, which can give you hints.
 
If you find something useful, or if you even can solve your problem, then 
please document it and try to get the documentation 
into the source distribution, or at least into the mailing list, so that others 
can benefit from it.

The following is illustrative of what I mean:


$ ll /usr/local/cyrus/bin/*ieve*
-rwxr-xr-x  1 root  wheel  uarch 1191104 Nov  7  2016 
/usr/local/cyrus/bin/sievec
-rwxr-xr-x  1 root  wheel  uarch 1182048 Nov  7  2016 
/usr/local/cyrus/bin/sieved
-rwxr-xr-x  1 root  wheel  uarch 1512864 Nov  7  2016 
/usr/local/cyrus/bin/compile_sieve
-rwxr-xr-x  1 root  wheel  uarch 1544432 Nov  7  2016 
/usr/local/cyrus/bin/timsieved
-r-xr-xr-x  1 root  wheel  uarch4976 Nov  7  2016 
/usr/local/cyrus/bin/masssievec
$ man sievec
No manual entry for sievec
$ man sieved
No manual entry for sieved
$ man compile_sieve
No manual entry for compile_sieve
$ man masssievec
No manual entry for masssievec
$ man timsieved
TIMSIEVED(8)  TIMSIEVED(8)



 *

NAME
   timsieved - CMU hack for getting sieve scripts onto the server

SYNOPSIS
   timsieved [ -C config-file ]

DESCRIPTION
   timsieved  is a server that allows users to remotely manage their sieve
   scripts kept on the server.  It accepts commands on its standard  input
   and  responds  on  its standard output. It MUST be invoked by master(8)
   with those descriptors attached to a remote client connection.

   Cyrus admins that authenticate and authorize as themselves (e.g.  don't
   proxy) manage global scripts.

   Timsieved reads its configuration options out of the imapd.conf(5) file
   unless specified otherwise by -C.


OPTIONS
   -C config-file
  Read configuration options from config-file.

FILES
   /etc/imapd.conf

SEE ALSO
   imapd.conf(5), master(8)



CMU  Project CyrusTIMSIEVED(8)



man  is usually the starting point of your journey.  



Wiel Offermans
wil...@offermans.rompen.nl




> On 1 Mar 2019, at 11:16, Andrea Venturoli  wrote:
> 
> On 3/1/19 11:01 AM, Merlin Hartley wrote:
>> Is this a shared mailbox?
> 
> No.
> 
> 
> 
>> Have you actually compiled the script or just
>> put the plain text there? Did you install the file by hand or use something 
>> like timsieved?
> 
> I install the scripts via sieveshell.
> 
> 
> 
>> You haven’t really given us much to go on…
> 
> Unfortunately, I really don't know which information I should post.
> My original question was if I could enable some logs to see what was going on.
> If there is other info that can be useful to solve this problem, I'm willing 
> to report it.
> 
> 
> 
> bye & Thanks
>   av.
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Andrea Venturoli

On 3/1/19 11:01 AM, Merlin Hartley wrote:

Is this a shared mailbox?


No.




Have you actually compiled the script or just
put the plain text there? Did you install the file by hand or use 
something like timsieved?


I install the scripts via sieveshell.




You haven’t really given us much to go on…


Unfortunately, I really don't know which information I should post.
My original question was if I could enable some logs to see what was 
going on.
If there is other info that can be useful to solve this problem, I'm 
willing to report it.




 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Merlin Hartley
Is this a shared mailbox? Have you actually compiled the script or just put the 
plain text there? Did you install the file by hand or use something like 
timsieved?

You haven’t really given us much to go on…


Merlin
--
Merlin Hartley
Computer Officer
MRC Mitochondrial Biology Unit
University of Cambridge
Cambridge, CB2 0XY
United Kingdom

> On 1 Mar 2019, at 09:02, Andrea Venturoli  wrote:
> 
> On 2/6/19 6:43 PM, Bron Gondwana wrote:
> 
>> Yeah, it's just called test.c in the sieve directory. Here's our buildscript 
>> code:
>> ...
> 
> I'm giving up on this: I cannot get to build this test binary; besides, I'm 
> *sure* the script is correct, since it works for other 2 mailboxes.
> 
> Thanks for your help anyway.
> 
> bye
>   av.
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-03-01 Thread Andrea Venturoli

On 2/6/19 6:43 PM, Bron Gondwana wrote:

Yeah, it's just called test.c in the sieve directory. Here's our 
buildscript code:

...


I'm giving up on this: I cannot get to build this test binary; besides, 
I'm *sure* the script is correct, since it works for other 2 mailboxes.


Thanks for your help anyway.

 bye
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script not working

2019-02-06 Thread Bron Gondwana
On Tue, Feb 5, 2019, at 06:20, Andrea Venturoli wrote:
> On 2/2/19 8:25 PM, Bron Gondwana wrote:
> > What is being written to syslog by your lmtpd?
> 
> Absolutely nothing (apart from transient errors on the rare occasions 
> when I reboot the server and sendmail comes up before imapd).
> 
> Is this log to be enabled somehow?
> 

No, there should be something in the syslog if sieve errors:

2019-02-06T12:31:26-05:00 imap38 sloti38d1t08/lmtp[2916700]: sieve runtime 
error for f...@fastmail.com id : Fileinto 
(Testing): Mailbox does not exist

> > There's also a sieve-test binary that you can build in the Cyrus source 
> > code. I don't think it's built by default on most platforms though, we 
> > build it specially at FM. It takes a script and a raw email and spits 
> > out a list of actions.
> 
> I don't have this (FreeBSD 11.2).
> AFAICT the port doesn't disable this (in configure) or leave it behind 
> when installing.
> I tried searching for this binary between "make" and "make install" 
> phases (*), but I didn't find it (or any source named anything like it).
> What's the procedure to compile it?
> 
> (*)
> > # cd work/cyrus-imapd-2.5.12/
> > # find .|grep -i "sieve-test"
> > # find . -type f -exec grep -i "sieve-test" "{}" ";"
> 

Yeah, it's just called test.c in the sieve directory. Here's our buildscript 
code:

make install DESTDIR=\$(CURDIR)/debian/$basename
make install-binsymlinks DESTDIR=\$(CURDIR)/debian/$basename
/bin/bash ./libtool --mode=install install -o root -m 755 sieve/test 
\$(PWD)/debian/$basename/$basedir/bin/sieve-test
install -o root -m 755 tools/rehash debian/$basename/$basedir/bin/rehash
install -o root -m 755 tools/mkimap debian/$basename/$basedir/bin/mkimap

So the binary will probably be sieve/test from a standard build

Oh yeah, you might be interested in the config options we build with too :)

./configure --without-krb --with-perl=/usr/bin/perl --enable-silent-rules 
--enable-http --enable-calalarmd --enable-idled --with-extraident=$tag 
--prefix=/$basedir --with-lmdb --with-zlib --without-snmp --enable-replication 
--enable-xapian --enable-jmap --enable-backup 
XAPIAN_CONFIG=/usr/local/$CYRUSLIBS/bin/xapian-config-1.5
$LEXFIX
make -j 8 all CFLAGS="-g -fPIC -W -Wall -Werror -fstack-protector-all"


Cheers,

Bron.

--
 Bron Gondwana, CEO, FastMail Pty Ltd
 br...@fastmailteam.com


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-02-04 Thread Andrea Venturoli

On 2/2/19 8:25 PM, Bron Gondwana wrote:

What is being written to syslog by your lmtpd?


Absolutely nothing (apart from transient errors on the rare occasions 
when I reboot the server and sendmail comes up before imapd).


Is this log to be enabled somehow?




There's also a sieve-test binary that you can build in the Cyrus source 
code. I don't think it's built by default on most platforms though, we 
build it specially at FM. It takes a script and a raw email and spits 
out a list of actions.


I don't have this (FreeBSD 11.2).
AFAICT the port doesn't disable this (in configure) or leave it behind 
when installing.
I tried searching for this binary between "make" and "make install" 
phases (*), but I didn't find it (or any source named anything like it).

What's the procedure to compile it?

(*)

# cd work/cyrus-imapd-2.5.12/
# find .|grep -i "sieve-test"
# find . -type f -exec grep -i "sieve-test" "{}" ";"






 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script not working

2019-02-02 Thread Bron Gondwana
What is being written to syslog by your lmtpd? Sieve failures should be logged 
to syslog.

There's also a sieve-test binary that you can build in the Cyrus source code. I 
don't think it's built by default on most platforms though, we build it 
specially at FM. It takes a script and a raw email and spits out a list of 
actions.

Cheers,

Bron.

On Fri, Feb 1, 2019, at 17:59, Andrea Venturoli wrote:
> On 1/20/19 3:21 PM, Andrea Venturoli wrote:
> > On 1/20/19 12:13 AM, Nic Bernstein wrote:
> >> Andrea,
> >> It would help to know which version of Cyrus you're having difficulty 
> >> with, and what setting you're using for 'unixhierarchysep'?
> > 
> > Sorry, I obviously should have said it from the start: I'm using version 
> > 2.5.12 on FreeBSD 11.2/amd64.
> > I'm not using 'unixhierarchysep', so the "default" separator shoud be a 
> > dot.
> > I'm also not using "altnamespace".
> 
> So, is there no way of debugging a sieve script or log its execution?
> 
>  Thanks
> av.
> 
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
> 

--
 Bron Gondwana, CEO, FastMail Pty Ltd
 br...@fastmailteam.com

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: Sieve script not working

2019-02-01 Thread Andrea Venturoli

On 1/20/19 3:21 PM, Andrea Venturoli wrote:

On 1/20/19 12:13 AM, Nic Bernstein wrote:

Andrea,
It would help to know which version of Cyrus you're having difficulty 
with, and what setting you're using for 'unixhierarchysep'?


Sorry, I obviously should have said it from the start: I'm using version 
2.5.12 on FreeBSD 11.2/amd64.
I'm not using 'unixhierarchysep', so the "default" separator shoud be a 
dot.

I'm also not using "altnamespace".


So, is there no way of debugging a sieve script or log its execution?

 Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script not working

2019-01-20 Thread Andrea Venturoli

On 1/20/19 12:13 AM, Nic Bernstein wrote:

Andrea,
It would help to know which version of Cyrus you're having difficulty 
with, and what setting you're using for 'unixhierarchysep'?


Sorry, I obviously should have said it from the start: I'm using version 
2.5.12 on FreeBSD 11.2/amd64.

I'm not using 'unixhierarchysep', so the "default" separator shoud be a dot.
I'm also not using "altnamespace".

 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script not working

2019-01-19 Thread Nic Bernstein

Andrea,
It would help to know which version of Cyrus you're having difficulty 
with, and what setting you're using for 'unixhierarchysep'?  If you've 
recently upgraded to 3.X, for example, have you followed the 
instructions and converted your sieve scripts?


Cheers,
    -nic

On 1/19/19 5:14 AM, Andrea Venturoli wrote:

Hello.

I'm using sieve scripts (among other things) to move messages that 
MIMEDefang marked as spam into a dedicated folder.


My scripts look like this:


require ["fileinto"];
require ["regex"];

if anyof (header :regex "X-Spam-Score" "^[1-9][0-9]\.",
  header :contains "X-Attachment-Dropped" "")
  {fileinto "INBOX.Spam.Received";}


Thus a message with the following header should go directly into the 
"Spam/Received" folder:
X-Spam-Score: 26.012 (**) 
BITCOIN_SPAM_07,DCC_CHECK,DOS_OE_TO_MX,FSL_BULK_SIG,HDR_ORDER_FTSDMCXX_DIRECT,HDR_ORDER_FTSDMCXX_NORDNS,HELO_DYNAMIC_HCC,HELO_DYNAMIC_IPADDR2,HTML_MESSAGE,MIMEOLE_DIRECT_TO_MX,NO_FM_NAME_IP_HOSTN,RATWARE_NO_RDNS,RDNS_NONE,TO_EQ_FM_DIRECT_MX,ZMIde_OutlookExpress




I'm doing this for three mailboxes: it works on two of them, not on 
the third one.
I checked the script is there and the folder exists; now I'm out of 
ideas on what to try.


Is there some way to get a sieve log or to debug it?

 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


--
Nic Bernstein n...@onlight.com
Onlight Inc.  www.onlight.com
6525 W Bluemound Rd., Ste 24  v. 414.272.4477
Milwaukee, Wisconsin  53213-4073  f. 414.290.0335


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Sieve script not working

2019-01-19 Thread Andrea Venturoli

Hello.

I'm using sieve scripts (among other things) to move messages that 
MIMEDefang marked as spam into a dedicated folder.


My scripts look like this:


require ["fileinto"];
require ["regex"];

if anyof (header :regex "X-Spam-Score" "^[1-9][0-9]\.",
  header :contains "X-Attachment-Dropped" "")
  {fileinto "INBOX.Spam.Received";}


Thus a message with the following header should go directly into the 
"Spam/Received" folder:

X-Spam-Score: 26.012 (**) 
BITCOIN_SPAM_07,DCC_CHECK,DOS_OE_TO_MX,FSL_BULK_SIG,HDR_ORDER_FTSDMCXX_DIRECT,HDR_ORDER_FTSDMCXX_NORDNS,HELO_DYNAMIC_HCC,HELO_DYNAMIC_IPADDR2,HTML_MESSAGE,MIMEOLE_DIRECT_TO_MX,NO_FM_NAME_IP_HOSTN,RATWARE_NO_RDNS,RDNS_NONE,TO_EQ_FM_DIRECT_MX,ZMIde_OutlookExpress




I'm doing this for three mailboxes: it works on two of them, not on the 
third one.
I checked the script is there and the folder exists; now I'm out of 
ideas on what to try.


Is there some way to get a sieve log or to debug it?

 bye & Thanks
av.

Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


Re: Sieve script ... not working?

2001-06-06 Thread Ken Murchison



The Hermit Hacker wrote:
> 
> Is there anything obviously with the following sieve script?  Its not
> filtering, its all still being dumped to the mailbox :(

The filter is not being executed due to a parse error on the require
line.  The discard action is MANDATORY in sieve and therefore doesn't
need/want a require.

One of the best ways to check this stuff is to run your script through
the "test" program in the sieve directory.  Use the -v option to verify
a script.


> -
> require "discard";
> 
> if header :contains "Subject" "Delivery failure" {
> discard;
> } elsif header :contains "Subject" "Postmaster notify: see transcript for details" {
> discard;
> } elsif header :contains "Subject" "Automatic Reply:" {
> discard;
> } elsif header :contains "Subject" "Returned mail:" {
> discard;
> } elsif header :contains "Subject" "Mail System Error" {
> discard;
> }
> --
> 
> Marc G. Fournier   ICQ#7615664   IRC Nick: Scrappy
> Systems Administrator @ hub.org
> primary: [EMAIL PROTECTED]   secondary: scrappy@{freebsd|postgresql}.org

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



Sieve script ... not working?

2001-06-06 Thread The Hermit Hacker


Is there anything obviously with the following sieve script?  Its not
filtering, its all still being dumped to the mailbox :(

-
require "discard";

if header :contains "Subject" "Delivery failure" {
discard;
} elsif header :contains "Subject" "Postmaster notify: see transcript for details" {
discard;
} elsif header :contains "Subject" "Automatic Reply:" {
discard;
} elsif header :contains "Subject" "Returned mail:" {
discard;
} elsif header :contains "Subject" "Mail System Error" {
discard;
}
--

Marc G. Fournier   ICQ#7615664   IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: [EMAIL PROTECTED]   secondary: scrappy@{freebsd|postgresql}.org