sieve - flags : delivery failure

Manuele manu at
Thu Apr 3 04:56:10 EST 2003

First of all, thanks for the attention and sorry for the lack of
I will try my best now to provide relevant data...

    UPDATE WHILE WRITING (and testing)
    Messages GETS delivered and correctly flagged, but deliver
    returns a temporary fail, so that at the first try:
     postfix enqueues the message
    and later tries:
     deliver says message is a duplicate,
     postfix enqueues the message again
     and so on...

The point is: there's some error at some point of the mail delivery process
if sieve is due to use imapflags

Sieve is installed properly (I guess) and supports imapflags
    "IMPLEMENTATION" "Cyrus timsieved v2.1.12"
    "SASL" "PLAIN"
    "SIEVE" "fileinto reject envelope vacation imapflags notify subaddress
relational regex"

runng test program (which I learned the existence of now...) returns the
    filing message 'mail' into 'INBOX.spam'
            with flags '\deleted'
    fatal error: Virtual memory exhausted

trying ulimit -d unlimited did not help

the sieve script looks like that:
    require ["imapflags", "fileinto"];

    # New Rule
        if header :comparator "i;ascii-casemap" :contains "X-Spam-Status"
"Yes"  {
        addflag "\\Deleted";
        fileinto "INBOX.spam";
        removeflag "\\Deleted";

While the message contains X-Spam-Status: Yes

software versions:
cyrus-sasl-2.1.5 + ldap/mysql patch
postfix 2.0.7 + mysql support
software configurations:
 configdirectory: /var/imap
 partition-default: /usr/data/spool/imap
 quotawarn: 90
 admins: cyrus root
 srvtab: /var/imap/srvtab
 allowanonymouslogin: no
 pwcheck_method: auxprop
 tls_cert_file: /var/imap/server.pem
 tls_key_file: /var/imap/server.pem

/etc/cyrus.conf is a copy of prefork.conf

 cyrus     unix  -       n       n       -       -       pipe
   flags= user=cyrus argv=/usr/cyrus/bin/deliver -r ${sender} -m
${extension} ${user}

 mailbox_transport = cyrus

btw: haven't been able to use other LDA methods...
maybe we'll talk about that later...

 amavisd is configured to run a smtp style forwarding of
 the message, via localhost 10025, where postfix listens without

 amavisd itself works fine with postfix
 I spent 5 hours debugging it, while I thought the problem was somewhere

Now the log...
it's a *.* log of an incoming mail from: test at to:
manu at (which is user manu)
mail gets parsed by amavisd, headers (X-Spam-Status: Yes) is added,
message gets back to postfix which attempts first deliver
gets a temporary fail, and enqueues the message

for better reading amavisd related stuff was suppressed...

postfix/smtpd[2206]: warning: dict_nis_init: NIS domain name not set - NIS
lookups disabled
postfix/smtpd[2206]: connect from unknown[]
postfix/smtpd[2206]: 122C3862C: client=unknown[]
imapd[1380]: accepted connection
master[2211]: about to exec /usr/cyrus/bin/imapd
imap[2211]: executed
postfix/cleanup[2208]: 122C3862C:
message-id=<20030403091320.122C3862C at>
postfix/qmgr[364]: 122C3862C: from=<test at>, size=435, nrcpt=1
(queue active)
amavis[553]: (00553-05) FWD via SMTP: []
<test at> -> <manu at>
postfix/smtpd[2220]: connect from localhost[]
postfix/smtpd[2220]: 6B2917C50: client=localhost[]
postfix/cleanup[2208]: 6B2917C50:
message-id=<20030403091320.122C3862C at>
postfix/qmgr[364]: 6B2917C50: from=<test at>, size=1053, nrcpt=1
(queue active)
lmtpd[2205]: accepted connection
lmtpd[2205]: lmtp connection preauth'd as postman
lmtpd[2205]: duplicate_check:
<20030403091320.122C3862C at> user.manu.spam       0
master[2223]: about to exec /usr/cyrus/bin/lmtpd
lmtpunix[2223]: executed
postfix/smtpd[2220]: disconnect from localhost[]
amavis[553]: (00553-05) mail_via_smtp: 250 2.6.0 Ok, id=00553-05, from MTA:
250 Ok: queued as 6B2917C50
lmtpd[2205]: mystore: starting txn 2147484051
lmtpd[2205]: mystore: committing txn 2147484051
lmtpd[2205]: duplicate_mark:
<20030403091320.122C3862C at> user.manu.spam
master[944]: process 2205 exited, status 75

here's the problem

postfix/pipe[2196]: 6B2917C50: to=<manu at>, relay=cyrus,
delay=1, status=deferred (temporary failure)
postfix/smtp[2216]: 122C3862C: to=<manu at>,
relay=[], delay=37, status=sent (250 2.6.0 Ok,
id=00553-05, from MTA: 250 Ok: queued as 6B2917C50)
master[944]: process 1380 exited, status 0

message is now DELIVERED, but postfix thinks not and
it keeps it in queue...

TIA guys :)
any hint appreciated


----- Original Message -----
From: "Mark Keasling" <mark at>
To: "Manuele" <manu at>
Sent: Thursday, April 03, 2003 6:54 AM
Subject: Re: sieve - flags : delivery failure

> Hi Manuele,
> I'm not sure I can help solve your problem with the addflag/removeflag
> sieve extension.  I'm pretty sure someone on the list can; however, the
> information you've provided is probably insufficient to help deduce the
> source of your particular problem.
> Please post the following information to info-cyrus at
>   What are the versions of the software that you are using?
>   What were the options you passed to the configure command
>   and related environment settings before building the software?
>   What is the configuration you use to run the software.
>   Post the contents of imapd.conf and cyrus.conf.
>   What is the complete set of imapd.log messages which occur
>   at the time the message is received.  A verbatim copy from
>   imapd.log is best.
>   What is the sieve script which doesn't work?  Minimum necessary
>   to demonstrate the problem.
>   Can you get a stack trace with gdb showing where the deliver
>   program is getting stuck?
>   Have you tried the sivtest program or connected via telnet to the
>   sieve server to verify that the add/remove flag extension is actually
>   supported as you expect?  Post the results.
>   Have you tried the "test" program in the sieve directory.  See the
>   sieve/README file about it.
> Things that weren't clear.
>   The deliver program never exits or it exits with temporary failure or
>   it returns the temporary failure error to the mailer but after that
>   it never exits.
>   You are using deliver as opposed to lmtpd.
> Regards,
> Mark Keasling <mark at>

More information about the Info-cyrus mailing list