Duplicatet mails after sieve scripts

Michael Menge michael.menge at zdv.uni-tuebingen.de
Wed Sep 26 07:36:55 EDT 2007


Hi,

Quoting Martin Schweizer <schweizer.martin at gmail.com>:

> Hello
>
> I have sieve script which sorts some mails in different folders but I
> get now the e-mails twice. One of the copy is going in the responsable
> subfolder and the other copy is going in the INBOX. What is going
> wrong here?
>
> Here my script:
>
> require ["fileinto"];
>
> if allof (header :matches "subject" "*Ausw**") {
>      fileinto "INBOX.Auswertung";
> }
>
> if allof (address :matches ["from"] "*Charlie**") {
>      fileinto "INBOX.System";
> }
>
> if allof (header :matches "subject" "*Postmaster**") {
>      fileinto "INBOX.Postmaster";
> }
>
> if allof (header :matches "subject" "*Cron**") {
>      fileinto "INBOX.Cron";
> }
>
> if allof (address :matches ["from"] "*disks**") {
>      fileinto "INBOX.Disks";
> }
>
> if allof (header :matches "subject" "*Deny**") {
>      fileinto "INBOX.DenyHosts";
> }
>
> else {
>      keep;
> }
>

You don't need the else case. Sieve has the implicit keep wich will be  
used for all mails that had no actions performed on them.

The else case is only for the

if allof (header :matches "subject" "*Deny**") {
       fileinto "INBOX.DenyHosts";
}

all eMails that don't have Deny in the Subject you call the action keep



--------------------------------------------------------------------------------
M.Menge                                 Tel.: (49) 7071/29-70316
Universitaet Tuebingen                  Fax.: (49) 7071/29-5912
Zentrum fuer Datenverarbeitung          mail:  
michael.menge at zdv.uni-tuebingen.de
Waechterstrasse 76
72074 Tuebingen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5339 bytes
Desc: S/MIME krytographische Unterschrift
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20070926/e3c03535/attachment-0001.bin 


More information about the Info-cyrus mailing list