1

Topic: Sieve script not working

Hi:

I have the following test sieve script in: /var/vmail/sieve/dovecot.sieve

if address :is "From" "me@internal.mynetwork.net" {
    redirect "me@gmail.com";
    stop;
}

I've tried a number of simple sieve recipes like this but they don't seem to be working.  Is there a switch somewhere I need to turn on?  Everything else works fine.

Cheers,
Dave

2

Re: Sieve script not working

http://www.iredmail.org/forum/topic453- … rules.html

you can check the log.

3

Re: Sieve script not working

Yep, did that and checked the logs after sending test messages.  Nothing hits the sieve.log and the usual dovecot login stuff appears in dovecot.log for example I sent a message at 11:35 and got the following in the dovecot log:

dovecot: Feb 01 11:32:51 Warning: Killed with signal 15
dovecot: Feb 01 11:32:51 Info: dovecot v1.1.19 starting up (core dumps disabled)
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Loading modules from directory: /usr/lib/dovecot/imap
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Module loaded: /usr/lib/dovecot/imap/lib11_imap_quota_plugin.so
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Effective uid=501, gid=501, home=/var/vmail/vmail01
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Quota root: name= backend=maildir args=
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Quota rule: root= mailbox=* bytes=104857600 messages=0
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Quota warning: bytes=89128960 (85%) messages=0 command=/usr/bin/dovecot-quo
ta-warning.sh 85
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Quota warning: bytes=94371840 (90%) messages=0 command=/usr/bin/dovecot-quo
ta-warning.sh 90
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): Quota warning: bytes=99614720 (95%) messages=0 command=/usr/bin/dovecot-quo
ta-warning.sh 95
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): maildir: data=~/internal.avema.net/d/dc/dco/dcook-2010.01.28.14.57.58//Mail
dir/
dovecot: Feb 01 11:35:12 Info: IMAP(dcook@internal.avema.net): maildir++: root=/var/vmail/vmail01/internal.avema.net/d/dc/dco/dcook-2010.0
1.28.14.57.58//Maildir, index=, control=, inbox=/var/vmail/vmail01/internal.avema.net/d/dc/dco/dcook-2010.01.28.14.57.58//Maildir
dovecot: Feb 01 11:35:12 Info: imap-login: Login: user=<dcook@internal.avema.net>, method=PLAIN, rip=192.168.4.215, lip=192.168.4.230, TLS

I'm trying to do the following in dovecot.sieve:

if not address :domain :is "Delivered-To" "internal.avema.net" {
    redirect "all@internal.avema.net";
    stop;
}
but nothing gets redirected.

Cheers,
Dave

4

Re: Sieve script not working

which version of iredmail and OS?

5

Re: Sieve script not working

I'm using iRedMail 0.5.1 and the latest CentOS 5.4
uname -r
2.6.18-164.11.1.el5

6

Re: Sieve script not working

I attached a postconf as well.

7

Re: Sieve script not working

I solved the issue.  Originally I wanted to use header_checks.pcre.  I changed the following line in master.cf

From:
receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings

To:
receive_override_options=no

restarted Postfix and away it went. I'm new to customizing Postfix at this level and I also found out that you can't postmap regex: or pcre: files, however you can test them with postmap.

Hope this helps any noobs.

Cheers,
Dave