[Dovecot] Calling dovecot-lda from maildrop/shell

Florian Lindner mailinglists at xgm.de
Mon Nov 18 19:14:17 EET 2013


Am 18.11.2013 13:40, schrieb Pascal Volk:
> On 11/18/2013 11:08 AM Florian Lindner wrote:
>>>> First try was to call dovecot-lda from command line:
>> 
>> /usr/lib/dovecot/dovecot-lda -d spam at xgm.de < testmail
>> 
>> which gave return code 75 (EX_TEMPFAIL) and logged:
>> 
>> dovecot: auth-worker(3533): mysql(localhost): Connected to database
>> system
>> dovecot: lda(spam at xgm.de): Error: user spam at xgm.de: Initialization
>> failed: Namespace '': Mail storage autodetection failed with
>> home=/home/flindner/Mail/spam
>> dovecot: lda(spam at xgm.de): Fatal: Invalid user settings. Refer to 
>> server
>> log for more information.
>> 
>> My userdb/password is like that home == maildir ==
>> /home/flindner/Mail/spam  (without prefixed "maildir:"). It works fine
>> for dovecot-imap, it detects that spam is a maildir.
>> 
>> I've also tried prefixing home and or maildir with "maildir:" or
>> calling: HOME=maildir:~/Mail/spam /usr/lib/dovecot/dovecot-lda <
>> testmail which gave:
>> 
>> dovecot: lda: Error: user flindner: Relative home directory paths not
>> supported: maildir:/home/flindner/Mail/spam
>> dovecot: lda: Fatal: Invalid user settings. Refer to server log for 
>> more
>> information.
>> 
>> What is the problem with the LDA here?
> 
> Please provide the output from `doveconf -n` and `doveadm user 
> flindner`.

  # 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
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     auto = create
     special_use = \Drafts
   }
   mailbox Junk {
     auto = create
     special_use = \Junk
   }
   mailbox Sent {
     auto = create
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Spam {
     special_use = \Junk
   }
   mailbox Trash {
     auto = create
     special_use = \Trash
   }
   prefix =
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocols = imap pop3
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0660
     user = postfix
   }
}
ssl_cert = </etc/ssl/astarte.centershock.net.cert
ssl_key = </etc/ssl/astarte.centershock.net.key
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

# 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.

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.

Regards,

Florian



More information about the dovecot mailing list