help filtering messages

James jameszee13 at gmail.com
Tue Oct 20 12:39:25 UTC 2015


Hello,

I'm attempting to use sieve-filter on a local mailbox.

I've defined mail_location as follows:
% grep mail_location /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Mail

I have a large number of mailboxes / mail in ~/Mail:

~ % find Mail | wc -l
63158

There are definitely a few messages in INBOX:

~ % find Mail/INBOX/cur | wc -l
5

I must admit, I'm completely new to sieve and have just begun
experimenting with it. Based on a super helpful blog post[1], I quick
set up the following ~/.sieve:

% cat ~/.sieve
require ["fileinto"];
# rule:[TEST]
if header :contains "Subject" "Test Email"
{
        fileinto "TEST";
        stop;
}

As mentioned, there are numerous emails in INBOX. This email is
located in ~/Mail/INBOX/cur/<blah> and, for verbosity (and to ensure
I'm not making a foolish mistake), I've displayed it here:

From: Test Account <test at test.com>
To: "Me" <me at test.com>
Subject: Test Email
Date: Mon, 19 Oct 2015 14:55:06 +0000

This is a test email.

Looking at the sieve filter recipe and email message, it appears that
I should have a match, no? sieve-filter appears to disagree:

% sieve-filter -C ~/.sieve INBOX
sieve-filter(test_user): Debug: Effective uid=1000, gid=1000,
home=/home/test_user
sieve-filter(test_user): Debug: Namespace inbox: type=private,
prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes
location=maildir:~/Mail
sieve-filter(test_user): Debug: maildir++: root=/home/test_user/Mail,
index=, indexpvt=, control=, inbox=/home/test_user/Mail, alt=

Thinking this was because sieve will only filter on new messages, I
moved the file from cur to new. No change.

Any thoughts on why this may be happening?

Thanks!

1 https://mebsd.com/configure-freebsd-servers/dovecot-pigeonhole-sieve-filter-refilter-delivered-email.html


More information about the dovecot mailing list