I am running a Debian Lenny machine with Postfix 2.5.5 and Dovecot 2.0.8.
Up until now I ran Postfix with the Procmail delivery agent succesfully.
The machine has only local users; I am not using virtual mailboxes. Due to
obvious reasons I want to switch to Dovecot LDA delivery, through LMTP.
I spend quite some time finding 'the' configuration for both Postfix and
Dovecot, but without success. Find my current configuration below. Postfix
receives the e-mail, but delivery through LMTP fails, resulting in Postfix
sending an NDR.
I just cannot figure out what's wrong and I am not sure whether it's a
Postfix or Dovecot problem either. Some log output from Postfix:
I finally figured out what's wrong. It appears that Dovecot in fact is
checking the existance of user 'r...@hostname.domain.tld' in one of the
configured user databases. Obviously, local users/usernames do not have the
local domain added.
Adding
userdb {
driver = passwd-file
args = username_format=%n /etc/passwd
}
to the 'protocol lmtp { }' block solves the issue.
For archival purposes only:
On the Dovecot list I was told using the above method is not the best idea,
since there are no guarantees it will always work without failures.
The best way to solve the problem is to configure
auth_username_format = %n
in conf.d/10-auth.conf
-Remy