[Dovecot] sieve plugin
I try to cinfigure dovecot run sieve scripts on incoming mail.
In my dovecot.conf:
<...>
protocol lda {
# Address to use when sending rejection mails.
postmaster_address = root@vpcit.ru
# Hostname to use in various parts of sent mails, eg. in Message-Id.
# Default is the system's real hostname.
hostname = vpcit.ru
# Support for dynamically loadable plugins. mail_plugins is a space separated
# list of plugins to load.
#mail_plugins =
mail_plugin_dir = /usr/lib/dovecot/modules/lda
# Binary to use for sending mails.
#sendmail_path = /usr/lib/sendmail
# UNIX socket path to master authentication server to find users.
auth_socket_path = /var/run/dovecot/auth-master
# Enabling Sieve plugin for server-side mail filtering
mail_plugins = cmusieve
}
<...>
plugin {
sieve = /var/mail/%d/%1n/%n/.dovecot.sieve
}
Then i set experiments on my maildir. In /var/mail/vpcit.ru/d/dukenukem i created script .dovecot.sieve:
require "fileinto";
if header :comparator "i;ascii-casemap" :contains "Subject" "sieve check"
{
fileinto "Trash";
stop;
}
Permissions on /var/mail/vpcit.ru/d/dukenukem are: drwx------ 5000 mail
So script should put every message that has "sieve check" subject into Trash folder.
- Trash folder isn't created, should i create it manually?
- Even when i create Trash folder and make 777 permissions to maildir, nothing happens (message is dropped into inbox dir)
- Should i configure my Kontact (KMail) e-mail client some way?
- What i've done incorrect?
The mail system works fine at the moment for receive and send, trouble only with sieve scripting.
Yours faithfully, Andrey.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 2 Sep 2008, Андрей wrote:
First, enable mail_debug and show us:
a) output of dovecot -n b) the log lines when delivering a new message.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIvQo2VJMDrex4hCIRAgEWAKDVzDFYjmGeQ+Kmi0cbpeG5sWeNCACeKKm6 21Qyp65E6lfurrNgDSYd+PA= =QcS+ -----END PGP SIGNATURE-----
I enabled mail_debug, here is my configuration
# dovecot -n # /etc/dovecot/dovecot.conf log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.info log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s ssl_cert_file: /etc/dovecot/server.crt ssl_key_file: /etc/dovecot/server.key disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_greeting: Welcome to ltd. Gercon IMAP service. Ready to authenticate you. first_valid_uid: 100 last_valid_uid: 10000 first_valid_gid: 100 last_valid_gid: 10000 mail_access_groups: mail mail_privileged_group: mail mail_location: maildir:/var/mail/%d/%1n/%n mail_debug: yes maildir_stat_dirs: yes maildir_copy_with_hardlinks: yes mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: mechanisms: plain login username_format: %n@%d debug: yes debug_passwords: yes passdb: driver: passwd-file args: /etc/dovecot/dovecot.passwd passdb: driver: sql args: /etc/dovecot/dovecot-pgsql-all.conf userdb: driver: passwd-file args: /etc/dovecot/dovecot.passwd userdb: driver: prefetch userdb: driver: sql args: /etc/dovecot/dovecot-pgsql-all.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master:
dovecot.log tail:
dovecot: 2008-09-02 16:14:12 Info: auth(default):
passwd-file(dukenukem@vpcit.ru): unknown user
dovecot: 2008-09-02 16:14:12 Info: auth(default): sql(dukenukem@vpcit.ru):
query: SELECT <...>
dovecot: 2008-09-02 16:14:12 Info: auth(default): client out: OK 2
user=<..>
dovecot: 2008-09-02 16:14:19 Info: auth(default): client in: AUTH 1
PLAIN service=POP3 lip=91
.192.168.241 rip=91.192.169.225
resp=AGZjc2VuX3ZwQHZwY2l0LnJ1ADEwMzMzOA==
And that's it.
Yours faithfully, Andrey
On Tuesday 02 September 2008 15:41:08 Steffen Kaiser wrote:
On Tue, 2 Sep 2008, Андрей wrote:
First, enable mail_debug and show us:
a) output of dovecot -n b) the log lines when delivering a new message.
Bye,
Oh, and by the way... please DO NOT BCC the list - that is really very bad form.
On 9/2/2008, =4@59 (dukenukem@vpcit.ru) wrote:
I enabled mail_debug, here is my configuration
# dovecot -n # /etc/dovecot/dovecot.conf log_path: /var/log/dovecot.log
What version of dovecot? Only older versions don't show the version in dovecot -n output, so maybe an upgrade is in order...
--
Best regards,
Charles
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 2 Sep 2008, Андрей wrote:
I enabled mail_debug, here is my configuration
Please keep the discussion on list.
# dovecot -n # /etc/dovecot/dovecot.conf
Looks like you use an old version of Dovecot, otherwise there would be the version number on the line above.
dovecot: 2008-09-02 16:14:12 Info: auth(default): sql(dukenukem@vpcit.ru): query: SELECT <...> dovecot: 2008-09-02 16:14:12 Info: auth(default): client out: OK 2 user=<..> dovecot: 2008-09-02 16:14:19 Info: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=91 .192.168.241 rip=91.192.169.225 resp=
Dunno, but this looks more like auth_debug=yes instead of mail_debug=. Anyway, this does not show a mail delivery attempt, but an user logging in via POP3.
Do you have configured your MTA using Dovecot Deliver as MDA/LDA at all? http://wiki.dovecot.org/LDA
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIvSVYVJMDrex4hCIRAgDxAJ48F53pKSdQ91yFRhqEy9Dtb5ns/QCg102i cTb2W+okkxjfGTMQh4+mwcQ= =hDhf -----END PGP SIGNATURE-----
participants (3)
-
Charles Marcus
-
Steffen Kaiser
-
Андрей