Hi all # dovecot --version 1.2.10 # dovecot -n # 1.2.10: /etc/dovecot.conf # OS: Linux 2.6.18-128.el5 x86_64 Red Hat Enterprise Linux Server release 5.3 (Tikanga) log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log ssl: no login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_location: mbox:~/mail:INBOX=/var/mail/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 lda: mail_plugins: sieve auth default: debug: yes passdb: driver: pam userdb: driver: passwd plugin: sieve: ~/.dovecot.sieve sieve_dir: ~/ log_path: /var/log/dovecot.log Here is my ~/.dovecot.sieve $ cat .dovecot.sieve require "fileinto"; if not header :contains "subject" "GRE:99" { discard; stop; } else { keep; } I only want to accept emails with GRE:99 as the subject, I'm not interested in any other mails. However when I send myself an email via the mail command all emails go into my INBOX whatever the subject is. I don't really get any info in the logs either: Jan 27 17:34:20 dovecot: Info: Dovecot v1.2.10 starting up (core dumps disabled) Jan 27 17:34:21 auth(default): Info: new auth connection: pid=495 Jan 27 17:34:21 auth(default): Info: new auth connection: pid=496 Jan 27 17:34:21 auth(default): Info: new auth connection: pid=497 Jan 27 17:34:21 auth(default): Info: new auth connection: pid=498 Jan 27 17:34:21 auth(default): Info: new auth connection: pid=499 Jan 27 17:34:21 auth(default): Info: new auth connection: pid=500 Jan 27 17:34:32 auth(default): Info: client in: AUTH 1 PLAIN service=imap lip=192.168.10.208 rip=192.168.10.207 lport=143 rport=22688 resp=<hidden> Jan 27 17:34:32 auth-worker(default): Info: pam(nickl,192.168.10.207): lookup service=dovecot Jan 27 17:34:32 auth-worker(default): Info: pam(nickl,192.168.10.207): #1/1 style=1 msg=Password: Jan 27 17:34:32 auth(default): Info: client out: OK 1 user=nickl Jan 27 17:34:32 auth(default): Info: master in: REQUEST 1 500 1 Jan 27 17:34:32 auth(default): Info: passwd(nickl,192.168.10.207): lookup Jan 27 17:34:32 auth(default): Info: master out: USER 1 nickl system_groups_user=nickl uid=503 gid=503 home=/home/nickl Jan 27 17:34:32 imap-login: Info: Login: user=<nickl>, method=PLAIN, rip=192.168.10.207, lip=192.168.10.208 Jan 27 17:34:32 IMAP(nickl): Info: Effective uid=503, gid=503, home=/home/nickl Jan 27 17:34:32 IMAP(nickl): Info: mbox: data=~/mail:INBOX=/var/mail/nickl Jan 27 17:34:32 IMAP(nickl): Info: fs: root=/home/nickl/mail, index=, control=, inbox=/var/mail/nickl Jan 27 17:34:32 auth(default): Info: new auth connection: pid=513 Im sure my .dovecot.sieve is not getting processed but I cannot prove it. Any help would be appreciated. Many thanks Nick .
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 27 Jan 2010, Nick Lunt wrote:> Im sure my .dovecot.sieve is not getting processed but I cannot prove > it.Do you have a .dovecot.sievec (Note the 'c' at the end) file? Did you configured your MTA to use Dovecot deliver as LDA? wiki.dovecot.org/LDA Regards, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS2Bd77+Vh58GPL/cAQKAnAf/T9XbCg17adg+kqi00UvDB15em07zVC4c QzwJOvCBw0qmR1Qg+tlzlehW9SMbz3X04++1k008wBaGfdQQ+d/ihWpe7e/54JuM iuCgN6oL7Pcv3dGVhIxW/H6ZKwfmyMjIjrhJMpKbLggXdRrvVEaceA26my5xXG2n XrSivtNWhaYTGKMWUIq8uBH0X+SeNKtLOn0ix5XrL5tceN24nwVqcwqe8A+0ujd+ HTIjDz2c1vguUchjKMzO0t0AP+b6JjihX++Dr7b71QztKTiKizHZ2IBuMKs6ek9e V6Zeh/Yabm9IKr8xv2vU2nUjCdQZ5beHmSalGy2oVU5Yy1fbSb+qSA==NdYw -----END PGP SIGNATURE-----
Nick Lunt wrote:> > I don't really get any info in the logs either: ><snip>> > Im sure my .dovecot.sieve is not getting processed but I cannot prove > it. >Your sieve file will be processed at delivery time, when the MTA (f.i. postfix) will hand off mail to the dovecot LDA, deliver. Your log file shows only activity about an IMAP login. This has no use in debugging your problem. 1. Check your MTA config and see if it calls deliver 2. Send yourself a mail 3. Check MTA logs and see if handing the mail to deliver works as intended 4. Check dovecot logs for activity from deliver. Regards, Tom
> -----Original Message----- > From: Tom Hendrikx [mailto:tom at whyscream.net] > Sent: 27 January 2010 15:53 > To: Nick Lunt; dovecot at dovecot.org > Subject: Re: [Dovecot] Cannot get dovecot-sieve to work> Your sieve file will be processed at delivery time, when the MTA (f.i. > postfix) will hand off mail to the dovecot LDA, deliver. Your log file > shows only activity about an IMAP login. This has no use in debugging > your problem. > > 1. Check your MTA config and see if it calls deliver > 2. Send yourself a mail > 3. Check MTA logs and see if handing the mail to deliver works as > intended > 4. Check dovecot logs for activity from deliver.Were using sendmail as the MTA. I have edited sendmail.cf as documented at wiki.dovecot.org/LDA/Sendmail. However this documentation states the following: "The following describes how to configure Sendmail to use deliver where root permission is not granted and Dovecot runs under a single user ID. It may need some adjustment for more typical setups. Other assumptions are that Sendmail is configured for virtual hosting and that local-system mail delivery is not handled by deliver." Our sendmail setup is not configured for virtual hosting. Here is what I have put in sendmail.cf Mdovecot, P=/usr/libexec/dovecot/deliver, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=deliver -d $u I restarted both sendmail and dovecot but still my test emails do not get processed by dovecot/dovecot-sieve. There is nothing in the dovecot or sendmail logs pointing to dovecot-sieve. All I want to do is discard mail depending on the subject. Any help appreciated, Many thanks Nick. __________ Information from ESET NOD32 Antivirus, version of virus signature database 4812 (20100128) __________ The message was checked by ESET NOD32 Antivirus. eset.com