[Dovecot] Dovecot 2.0.13 and sieve

Claudio Prono claudio.prono at atpss.net
Wed Jun 22 18:49:08 EEST 2011



Il 22/06/2011 15.24, Stephan Bosch ha scritto:
> Op 22-6-2011 14:48, Claudio Prono schreef:
>> Il 22/06/2011 14.29, Stephan Bosch ha scritto:
>>> Op 22-6-2011 13:36, Claudio Prono schreef:
>>>> As i can see, the regex of the year is not matching.... but why? Also,
>>>> the other regex for the Month or the day, are not matching (tested
>>>> commented out).
>>> Well, for one, in the value being matched there is no date. Could you
>>> provide an example of a failing message so we can check why the data
>>> retrieved from the Received header does not contain any date info?
>> Sure, here it is:
>>
> <snip/>
>> Received: from private (XXX.mediaservice.net [XXX.XXX.XXX.XXX])
> <snip/>
>
> This is not a valid Received header. Looks like something in your mail
> path eats multi-line (folded) headers. It should look like this (the
> stuff in parentheses is comment and thus optional):
>
> Received: from dovecot.org ([193.210.130.67]:60628)
>     by drpepper.rename-it.nl with esmtp (Exim 4.72)
>     (envelope-from<dovecot-bounces at dovecot.org>)
>     id 1QZMt9-00017I-4Y
>     for stephan at rename-it.nl; Wed, 22 Jun 2011 14:50:39 +0200
>
> You seem to have only the first line left. I wouldn't know what could
> cause this.
>
Ok, is a problem of my internal mails, i have a regex matching my
internal class and modifying che headers of the mail on the fly.
Now i have made a test with an external mail.

Here is the headers of the mail:

Return-Path: <cybercloud at alice.it>
Delivered-To: claudio at mediaservice.net
Received: from localhost (localhost [127.0.0.1])
        by mail2.mediaservice.net (Postfix) with SMTP id 59263B1827D
        for <claudio at mediaservice.net>; Wed, 22 Jun 2011 17:43:07 +0200
(CEST)
Received: from smtp302.alice.it (smtp302.alice.it [82.57.200.118])
        by mail2.mediaservice.net (Postfix) with ESMTP id 256F2B18279
        for <claudio at mediaservice.net>; Wed, 22 Jun 2011 17:43:07 +0200
(CEST)
Received: from feu14-alice (82.57.204.69) by smtp302.alice.it (8.5.124.08)
        id 4DEE2478005DA4C7 for claudio at mediaservice.net; Wed, 22 Jun
2011 17:43:06 +0200
Received: from (79.4.123.31) by alicemail.rossoalice.alice.it;  Wed, 22
Jun 2011 17:43:06 +0200
Message-ID: <130b804e67b.cybercloud at alice.it>
Date: Wed, 22 Jun 2011 17:43:06 +0200 (CEST)
From: "cybercloud at alice.it" <cybercloud at alice.it>
Reply-To: "cybercloud at alice.it" <cybercloud at alice.it>
To: claudio at mediaservice.net
Subject: test vacation
Mime-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_Part_43520_25034745.1308757386914"
X-Originating-IP: 79.4.123.31
X-DSPAM-Result: Whitelisted
X-DSPAM-Processed: Wed Jun 22 17:43:07 2011
X-DSPAM-Confidence: 0.9901
X-DSPAM-Probability: 0.0000
X-DSPAM-Signature: 1,4e020d8b286456121419446

------=_Part_43520_25034745.1308757386914
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Message

!DSPAM:1,4e020d8b286456121419446!

------=_Part_43520_25034745.1308757386914
Content-Type: text/html;charset="UTF-8"
Content-Transfer-Encoding: 7bit

<snip>

And there is the sieve-test:

sieve-test -t - -Tlevel=matching .dovecot.sieve
1308757387.M635481P28650.mail2\,S\=1845\,W\=1893

      ## Started executing script '.dovecot'
   7: exists test
   7:   header `list-help' is missing
   7:   headers are missing
   7: jump if result is true
   7:   not jumping
   7: header test
   7:   starting `:is' match with `i;ascii-casemap' comparator:
   7:   extracting `Precedence' headers from message
   7:   finishing match with result: not matched
   7: jump if result is true
   7:   not jumping
   7: header test
   7:   starting `:matches' match with `i;ascii-casemap' comparator:
   7:   extracting `To' headers from message
   7:   matching value `claudio at mediaservice.net'
   7:     with key `Multiple recipients of*' => 0
   7:   finishing match with result: not matched
   7: jump if result is true
   7:   not jumping
   9: header test
   9:   starting `:regex' match with `i;ascii-casemap' comparator:
   9:   extracting `Received' headers from message
   9:   matching value `from localhost (localhost [127.0.0.1]) by
mail2.mediaservice.net (Postfix) wi...'
   9:     with regex `^.*(May) (\(.*\) )?.... (\(.*\) )?..:..:.. (\(.*\)
)?(\+|\-)....( \(.*\))?$' [id=0] => 0
   9:   matching value `from smtp302.alice.it (smtp302.alice.it
[82.57.200.118]) by mail2.mediaservic...'
   9:     with compiled regex [id=0] => 0
   9:   matching value `from feu14-alice (82.57.204.69) by
smtp302.alice.it (8.5.124.08)        id 4D...'
   9:     with compiled regex [id=0] => 0
   9:   matching value `from (79.4.123.31) by
alicemail.rossoalice.alice.it;  Wed, 22 Jun 2011 17:43:...'
   9:     with compiled regex [id=0] => 0
   9:   finishing match with result: not matched
   9: jump if result is false
   9:   jumping to line 10
        ## Finished executing script '.dovecot'


Performed actions:

  (none)

Implicit keep:

 * store message in folder: INBOX

sieve-test(root): Info: final result: success

And also in this case, no vacation at all... but different output....
that can be useful?

Cordially,

Claudio Prono.

> !DSPAM:1,4e01ed38232161453618201!
>
>
>

-- 
--------------------------------------------------------------------------------
Claudio Prono                         OPST
System Developer               
                                      Gsm: +39-349-54.33.258
@PSS Srl                              Tel: +39-011-32.72.100
Via San Bernardino, 17                Fax: +39-011-32.46.497
10141 Torino - ITALY                  http://atpss.net/disclaimer
--------------------------------------------------------------------------------
PGP Key - http://keys.atpss.net/c_prono.asc






More information about the dovecot mailing list