Pigeonhole Sieve fails on date-based filter rules - bug?

Clemens Ender clemens at en-der.at
Wed Feb 10 21:48:40 UTC 2016


Hi list!

I’m running dovecot + pigeonhole on a debian wheezy based VPS.

Here is the output of „dovecot -n“

# 2.2.18: /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.8 (0c4ae064f307+)
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.9 
disable_plaintext_auth = no
imap_idle_notify_interval = 29 mins
mail_plugins = acl quota fts fts_lucene
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate
namespace {
  location = maildir:%%h/maildir:INDEX=~/maildir/shared/%%u
  prefix = shared/%%u/
  separator = /
  type = shared
}
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
  separator = /
}
passdb {
  args = username_format=%u /home/dovecot/auth.d/%d/users
  driver = passwd-file
}
plugin {
  acl_shared_dict = file:/home/dovecot/vmail/%d/shared-mailboxes.db
  fts = lucene
  fts_autoindex = yes
  fts_decoder = decode2text
  fts_lucene = whitespace_chars=@
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service decode2text {
  executable = script /usr/local/libexec/dovecot/decode2text.sh
  unix_listener decode2text {
    mode = 0666
  }
  user = dovecot
}
service lmtp {
  executable = lmtp -L
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
  user = vmail
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
ssl_cert = </etc/ssl/certs/dovecot.crt
ssl_key = </etc/ssl/private/dovecot.key
userdb {
  args = username_format=%u /home/dovecot/auth.d/%d/users
  default_fields = uid=vmail gid=vmail home=/home/dovecot/vmail/%d/%n userdb_mail=maildir:~/maildir quota_rule=*:storage=2G
  driver = passwd-file
}
protocol lmtp {
  mail_plugins = acl quota fts fts_lucene sieve
  postmaster_address = postmaster at en-der.at
}
protocol lda {
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugins = acl quota fts fts_lucene sieve
}

I’m trying to filter emails based on the following rule:
 

if allof (date :value "lt" "Date" "date" "2015-01-01")
{
        fileinto "Archiv/2014";
}


Some mails which should match are not filtered.

Please look at what 

sieve-filter -e -W -v ...

puts out:

>> Filtering message:

  ID:      <0.0.6.888.1CFAFF845D5E634.77992 at mta144.avaaz.org>
  Date:    
  Size:    17781 bytes
  Subject: =?utf-8?q?Klimafreunde_-_der_Plan_ste...

Performed actions:

 * store message in folder: Archiv/2014

Implicit keep:

  (none)

>> Filtering message:

  ID:      <1527093595.86163601420098718229.JavaMail.email at email.apple.com>
  Date:    Thu, 1 Jan 2015 07:51:58 +0000 (GMT)
  Size:    19573 bytes
  Subject: =?ISO-8859-1?Q?Ihre_Rechnung,_Nr.=A01...

Performed actions:

  (none)

Implicit keep:

 * store message in folder: INBOX

...


So it appears that the „Date“ header is not properly extracted for the affected emails.

Here are the headers of an particular email (the one without „Date:“ listed above):

Return-Path: <bounces-43375-33947798 at bounces.avaaz.org>
Delivered-To: <clemens at en-der.at>
Received: from vps1.en-der.at
	by vps1 (Dovecot) with LMTP id Vrb9JNSl31M5aQAAwqatwA
	for <clemens at en-der.at>; Mon, 04 Aug 2014 15:25:08 +0000
Received: from mta144.avaaz.org (mta144.avaaz.org [69.60.9.144])
	by vps1.en-der.at (Postfix) with ESMTP id 61715ACDAA
	for <clemens at en-der.at>; Mon,  4 Aug 2014 15:25:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=av_key; d=avaaz.org;
 h=Content-Type:MIME-Version:Subject:From:To:List-Unsubscribe:Message-ID; i=avaaz at avaaz.org;
 bh=aNrRG1oOw57rU4AT/0miGg8aWAI=;
 b=erOsRngaWCaW7R0sK8COa4k97QpCISFa6/0ZKfZJHAEHKJu3FbUTExJb/L6OQez/V26UgwpbKJqU
   Py0l8dDpu68tUlhR42AUnZV+M+lpqI6LdoiTt/QMC0TklQnqdKZt0E4CG+Kz7plluYwhXlZHVSXc
   +apdPqllFZeYAcsaN5k=
DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=av_key; d=avaaz.org;
 b=YdIs06lkIN6pxGKoLORIDjbBCLU/5vwP1QCVocIa0qB4EgT1uKwf+bDlpbQVWmSsjPzekeZmWbpZ
   um+paKzqq7UGtJMVb1eGjod/bkuOGeXXdeZG0tGJz8wfLdNog6DbfChRBvMciS/Wsz+xrK3yVbX6
   bQuKbeD/gurWPhEDfFc=;
Received: by mta144.avaaz.org id hruita1u62ku for <clemens at en-der.at>; Mon, 4 Aug 2014 11:25:07 -0400 (envelope-from <bounces-43375-33947798 at bounces.avaaz.org>)
Content-Type: multipart/alternative;
 boundary="===============1522543492113580631=="
MIME-Version: 1.0
Subject: =?utf-8?q?Klimafreunde_-_der_Plan_steht!?=
From: Ricken Patel - Avaaz.org <avaaz at avaaz.org>
To: "clemens at en-der.at" <clemens at en-der.at>
List-Unsubscribe: <https://secure.avaaz.org/act/?r=unsub&cl=5597832458&email=clemens@en-der.at&v=43375&lang=de>
X-Campaign-ID: avaazCLIMATEeventhostsrecruitment201407301851073204
X-Version-ID: 43375
Message-ID: <0.0.6.888.1CFAFF845D5E634.77992 at mta144.avaaz.org>

--===============1522543492113580631==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

Liebe alle,

tausende von uns haben
...

Any idea what is wrong here?

Best regards,
  Clemens Ender
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4015 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20160210/add2260a/attachment.p7s>


More information about the dovecot mailing list