1 (edited by nylan 2009-06-17 20:38:50)

Topic: sieve - not filtering (0.4 - stable) [solved]

Hello!

I'm having big troubles with sieve.  Per user sieve scripts don't work. Neither the global sieve script.
Shouldn't exist a .dovecot.sievec (if sieve works correctly)?
Is there a way to trace dovecot and sieve processing? The sieve.log is empty.

Here is the relevant part from the dovecot.conf

plugin {
    # NOTE: %variable expansion works only with Dovecot v1.0.2+.
    # For maildir format.
    sieve = /home/vmail/sieve/%Ld/%Ln/.dovecot.sieve
}

# LDA: Local Deliver Agent
protocol lda {
    postmaster_address = root
    auth_socket_path = /var/run/dovecot/auth-master
    mail_plugins = cmusieve quota expire
    sieve_global_path = /home/vmail/.dovecot.sieve
    log_path = /var/log/sieve.log
    debug=yes
}

the pysieved.ini:
[main]
auth    = Dovecot
userdb  = Virtual
storage = Dovecot
bindaddr = 127.0.0.1
port    = 2000
pidfile = /var/run/pysieved/pysieved.pid
[Virtual]
base = /home/vmail/sieve
uid = 501
gid = 501
hostdirs = True
[Dovecot]
mux = /var/spool/postfix/dovecot-auth
master = /var/run/dovecot/auth-master
sievec = /usr/libexec/dovecot/sievec
scripts = .sieve
active = .dovecot.sieve
uid = 501
gid = 501


Any help greatly appreciated

Best regards

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: sieve - not filtering (0.4 - stable) [solved]

Is there a way to trace dovecot and sieve processing? The sieve.log is empty.

Set 'mail_debug = yes' in /etc/dovecot.conf, restart dovecot service and monitor /var/log/sieve.log.

3 (edited by nylan 2009-06-17 16:29:07)

Re: sieve - not filtering (0.4 - stable) [solved]

already done.

the debug=yes in the protocol lda section is an act of desperation.  :-)

dovecot messages when starting with mail_debug=yes
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Loading modules from directory: /usr/lib64/dovecot/imap
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Module loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Module loaded: /usr/lib64/dovecot/imap/lib11_imap_quota_plugin.so
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Module loaded: /usr/lib64/dovecot/imap/lib20_zlib_plugin.so
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Effective uid=501, gid=501, home=/home/vmail
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Quota root: name= backend=maildir args=
dovecot: Jun 17 10:04:06 Info: IMAP(name.surname@domain.com): Quota rule: root= mailbox=* bytes=104857600 messages=0

4

Re: sieve - not filtering (0.4 - stable) [solved]

Try to send mail to name.surname@domain.com, and monitor /var/log/sieve.log.

5

Re: sieve - not filtering (0.4 - stable) [solved]

sieve.log = nothing
dovecot.log  = nothing
maillog :
Jun 17 10:41:24 mail amavis[18439]: (18439-08) Passed SPAM, MYNETS LOCAL [192.168.36.1] [212.186.72.17] <NYLAN@gmx.net> -> <name.surname@domain.com>, quarantine: spam-F2gbPJU2yShV.gz, Message-ID: <20090617084122.304230@gmx.net>, mail_id: F2gbPJU2yShV, Hits: 8.143, size: 1137, queued_as: 4C8F460CFA7, 355 ms
Jun 17 08:41:24 mail postfix/smtp[18514]: D441460CFA5: to=<name.surname@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.52, delays=0.16/0/0/0.36, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4C8F460CFA7)
Jun 17 10:41:24 mail postfix/pipe[18557]: 4C8F460CFA7: to=<name.surname@domain.com>, relay=dovecot, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered via dovecot service)
Jun 17 10:41:24 mail postfix/qmgr[9789]: D441460CFA5: removed

the sieve rule I'm currently testing in /home/vmail/sieve/domain/username/.dovecot.sieve:

require ["notify"];
# rule:[test]
if anyof (true)
{
        notify
                :method "mailto"
                :options "othername@domain.com"
                :message "new mail received";
}

6

Re: sieve - not filtering (0.4 - stable) [solved]

Strange, there must be something in sieve.log.

7 (edited by nylan 2009-06-17 17:34:57)

Re: sieve - not filtering (0.4 - stable) [solved]

Could it be a postfix issue with dovecot?
I'm using centos 5.3 x86_64. Could it be a problem with the dovecot-sieve package?
Does exist a way to tell if the lib90_cmusieve_plugin.so gets loaded at dovecot startup like the other libs/plugins?

8 (edited by nylan 2009-06-20 16:09:46)

Re: sieve - not filtering (0.4 - stable) [solved]

Solved:

error in /etc/postfix/master.cf:
found

flags=DRhu user=vmail:vmail argv=/usr/bin/procmail -r -t SENDER=${sender} RECIPIENT=${recipient} DOMAIN=${nexthop} -m USER=${user} EXTENSION=${extension} /etc/procmailrc

instead of

flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient} -f ${sender}

Don't know where it comes from.

Thank you for your efforts!