[Dovecot] Calling dovecot-lda from maildrop/shell

Pascal Volk user+dovecot at localhost.localdomain.org
Tue Nov 19 18:00:21 EET 2013


On 11/18/2013 05:14 PM Florian Lindner wrote:
>   # doveconf -n
> # 2.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.2
> auth_mechanisms = plain login digest-md5 cram-md5 ntlm
>> passdb {
>    args = /etc/dovecot/dovecot-sql.conf.ext
>    driver = sql
> }
> protocols = imap pop3
>> userdb {
>    driver = prefetch
> }
> userdb {
>    args = /etc/dovecot/dovecot-sql.conf.ext
>    driver = sql
> }
> 
> # doveadm user flindner
> userdb lookup: user flindner doesn't exist
> 
> flindner is my linux system user. There are virtual user, e.g

In your log excerpt I've seen '/home/flindner/…', so I thought there
could be the user flindner.

> # doveadm user spam at xgm.de
> userdb: spam at xgm.de
>    home      : /home/flindner/Mail/spam
>    uid       : 1001
>    gid       : 1001
> 
> /home/flindner/Mail/spam is the home and maildir of virtual user.

That could cause several problems. For example that problem you've
reported. The simplest solution would be setting
"mail_location=~maildir:~/Maildir" in /etc/dovecot/conf.d/10-mail.conf.

With this configuration Dovecot will use
/home/flindner/Mail/spam/Maildir as mail location for user spam at xgm.de.


> My mail system is built like that:
> 
> postfix delivers all mail of a domain to maildrop using a system user 
> which have this domain assigned. maildrop does the final delivery. There 
> is no 1:1 mapping of mail adresses to maildirs.
> 
> postfix @xgm.de -> maildrop flindner -> maildrop -> maildir <- dovecot 
> IMAP  this should become:
> 
> postfix @xgm.de -> maildrop flindner -> maildrop -> dovecot-lda -> 
> maildir <- dovecot IMAP
> 
> so that I can also use sieve for filtering.

When using Sieve it's also strongly recommended to have $home != $mail.
With the settings from above you could use 'default' settings for Sieve,
e.g.:

	# 15-lda.conf
	protocol lda {
	  mail_plugins = $mail_plugins sieve
	}
	# 20-lmtp.conf
	protocol lmtp {
	  mail_plugins = $mail_plugins sieve
	}
	# 90-sieve.conf
	plugin {
	  recipient_delimiter = +
	  sieve = ~/.dovecot.sieve
	  sieve_dir = ~/sieve
	}

Then the file /home/flindner/Mail/spam/.dovecot.sieve would contain the
Sieve rules for user spam at xgm.de.

See also: http://wiki2.dovecot.org/VirtualUsers/Home


Regards,
Pascal
-- 
The trapper recommends today: beeffeed.1332316 at localdomain.org


More information about the dovecot mailing list