Well, I solved it by passwd-file userdb and maintaining user list in /data/vmail/global/users file.
Kind regards, Milo
Dne 2018-08-30 v 10:15 Miloslav Hůla napsal(a):
One day, I'll use the LDAP. But infrastructure I got is quite neglected and some older admins is hard to convince to innovate. Just, aaaaah :)
I read whole documentation related to userdb a and passdb. Easy to understand with relation to IMAP or POP3 access. But what I didn't understand is relation to LMTP. Which one is used and when for successful delivery.
I'll try to move those settings as global.
Thank you, Milo
Dne 2018-08-30 v 09:32 Aki Tuomi napsal(a):
Is there some reason why you cannot use LDAP as userdb? Those uid / gid / home parameters can be also provided as global settings like
mail_uid=vmail
mail_gid=vmail
mail_home=/data/vmail/user/%n
Aki
On 29.08.2018 23:12, Miloslav Hůla wrote:
Hi,
I have the Dovecot (2.2.27-3+deb9u2) with LMTP and Postfix. Static userdb:
userdb { driver = static args = uid=vmail gid=vmail home=/data/vmail/user/%n allow_all_users=yes }
and passdb by LDAP, only to verify IMAP user password by bind.
Problem is, when someone sends email to non-existent@mydomain.tld, Dovecot automatically creates its home directory and Maildir.
Is there any way how deliver only when /data/vmail/user/%n directory already exists, and reject otherwise?
When I remove allow_all_users=yes, LMTP stops to deliver at all with 550 code. I probably understand why, but I cannot figure how to solve it. I cannot use LDAP to user lookup.
Milo