[Dovecot] Dovecot deliver + sieve + postfix virtual + mysql ?

Radek Slavicinsky radek.slavicinsky at etnetera.cz
Wed Aug 15 16:52:05 EEST 2007


Hey there guys.

I have successful postfix + mysql + sagator + clamav + spamassassin + dovecot 
setup (it was a really crazy month full of tweaking :]) and the only thing i 
miss is some per maildir specific filtering. i decided to use sieve. 
everything is fine except that dovecot's deliver process doesn't see the 
actual .dovecot.sieve file with filtering rules in the root of a maildir. 
description of the situation follows:

from /var/log/dovecot.log:
deliver(support{the_at_symbol}support.etnetera.cz): "2007-08-15 
13:32:11 "Error: userdb(support{the_at_symbol}support.etnetera.cz) didn't 
return a home directory or sieve script location, can't find it
deliver(support{the_at_symbol}support.etnetera.cz): "2007-08-15 
13:32:11 "Info: 
msgid=<200708151330.22021.radek.slavicinsky{the_at_symbol}etnetera.cz>: saved 
mail to INBOX

/etc/dovecot/dovecot.conf:
protocols = imap imaps pop3 pop3s
listen = *
disable_plaintext_auth = no
shutdown_clients = yes
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_cert_file = /etc/certs/sponka.etnetera.cz.crt
ssl_key_file = /etc/certs/sponka.etnetera.cz.key
ssl_ca_file = /etc/certs/CA.crt
login_process_size = 64
login_processes_count = 32
login_max_processes_count = 256
login_max_connections = 512

mail_location = maildir:/srv/vmail/domains/%d/%n/
#mail_location = maildir:/

namespace private {
	separator = .
	prefix = INBOX.
	inbox = yes
}

namespace private {
	separator = .
	prefix =
	inbox = yes
	hidden = yes
}

mail_extra_groups = vmail
verbose_proctitle = yes
mbox_read_locks = fcntl
mbox_write_locks = fcntl

protocol imap {
}

protocol pop3 {
  pop3_uidl_format = UID%u-%v
}

protocol lda {
	hostname = sponka.etnetera.cz
	postmaster_address = postmaster{the_at_symbol}etnetera.cz
	auth_socket_path = /var/run/dovecot/auth-master
	mail_plugins = cmusieve
}

auth default {
  mechanisms = plain login digest-md5 cram-md5
  passdb sql {
  	args = /etc/dovecot/dovecot-sql.conf
  }
  userdb sql {
  	args = /etc/dovecot/dovecot-sql.conf
  }
  user = dovecot-auth
  socket listen {
  	client {
		path = /var/spool/postfix/private/auth
		mode = 0666
		user = postfix
		group = postfix
	}
	master {
		path = /var/run/dovecot/auth-master
		mode = 0600
		user = vmail
		group = vmail
	}
  }
}
dict {
}
plugin {
}

/etc/dovecot/dovecot-sql.conf:
driver = mysql
default_pass_scheme = PLAIN
connect = host=127.0.0.1 dbname=postfix user=postfix password=averysecretpass
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active 
= '1'
user_query = SELECT maildir, 65500 AS uid, 65500 AS gid FROM mailbox WHERE 
username = '%u' AND active = '1'

the user_query gives:
mysql> SELECT maildir, 65500 AS uid, 65500 AS gid FROM mailbox WHERE username 
= 'radek.slavicinsky at etnetera.cz' AND active = '1';
+--------------------------------+-------+-------+
| maildir                        | uid   | gid   |
+--------------------------------+-------+-------+
| etnetera.cz/radek.slavicinsky/ | 65500 | 65500 | 
+--------------------------------+-------+-------+
1 row in set (0.00 sec)


the sieve rules file
# ls /srv/vmail/domains/support.etnetera.cz/support/.dovecot.sieve -lha
-rw-r--r-- 1 vmail vmail 957 Aug 15 
13:30 /srv/vmail/domains/support.etnetera.cz/support/.dovecot.sieve

i think there should be some specific settings for the cmusieve plugin, but i 
didnt find much docs about that

thx for any help ;]
blue4 :p


More information about the dovecot mailing list