Simplifying Support of Virtual and System Users

Mark Olbert Mark at arcabama.com
Sat Mar 26 17:32:24 UTC 2022


Apologies if this has already been raised here (which I suspect it has 😊). I tried to raise it as an issue over on github but issues are not enabled for the repository.

The support for mixing virtual users, with fully-qualified email addresses, and system users could be simpler. Assuming it doesn’t mess up other stuff in the code base, of course 😊.

The problem appears to be that the PAM passwd module requires just user names without a domain (which makes sense given that they’re system users) but does not, so far as I can see, support the username_format argument. In my setup, the default structure of 10-auth.conf demonstrates this:

auth_username_format = %n

That means all username arguments lack the domain part…which complicates using fully-qualified ones for virtual users. I realize I could assign arbitrary unique names to the virtual accounts in the lookup file. But that complicates administering the system, so I want to be able to include the domain for virtual users.

After about five hair-pulling hours of wrestling with the configuration I stumbled across an answer utilizing conditionals<https://serverfault.com/questions/260488/dovecot-user-lookup-fails-when-using-usernamedomain-format> on ServerFault. It works fine.

But being able to pass a username_format parameter to the PAM module (which I tried, but it was rejected) would be a lot simpler, and a lot more intuitive.

-          Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20220326/6c68c7bb/attachment-0001.htm>


More information about the dovecot mailing list