Mapping usernames used for authentication to UNIX usernames

Michael Peddemors michael at linuxmagic.com
Wed Jun 16 18:45:45 EEST 2021


probably thinking about this backwards, use the full email address by 
default, and if they only provide the user name, then concatonate the 
proper domain before authentication.

full email address should be the preferred default moving forward.

On 2021-06-16 6:58 a.m., Frank Volf wrote:
> 
> Hi,
> 
> I'm looking for some advice or pointers how to best solve a small 
> problem that I have. I have no doubt that this can be done in dovecot, 
> but I'm struggling to find the easiest way to implement it.
> 
> First of all, what I have:
> I have a relative small dovecot setup for a dozen domains, and about 50 
> users in total. All users use IMAP to retrieve mail, and SMTP submission 
> protocol to submit email.
> Because of the small size, every user has its own UNIX account, 
> authentication is done using PAM and mail is stored in a Maildir folder 
> in their home directory.
> Works perfectly!
> 
> There is one minor inconvenience. When a new mail client is configured, 
> users (often guided by the auto config generator of the mail client) 
> tend to use their email address as the username to authenticate instead 
> of their UNIX account name, which fails of course.
> 
> Would it be possible to configure something that will map an email 
> address to the UNIX account name and use the account name for 
> authentication and obtaining the related information (uid, gid, home dir)?
> 
> I do have two concerns:
> 
> 1) I do not want to break existing mail configurations, so 
> authentication with the UNIX username should still be possible.
> 2)  I cannot do a simple reg. exp for the translation because every 
> email domain has e.g. an info at domain.com mailbox, and I do not want them 
> all to go to UNIX user "info".
> 
> As said, I would appreciate any advice on how this can be configured the 
> easiest.
> 
> Thanks in advance.
> 
> Kind regards,
> 
> Frank
> 



-- 
"Catch the Magic of Linux..."
------------------------------------------------------------------------
Michael Peddemors, President/CEO LinuxMagic Inc.
Visit us at http://www.linuxmagic.com @linuxmagic
A Wizard IT Company - For More Info http://www.wizard.ca
"LinuxMagic" a Registered TradeMark of Wizard Tower TechnoServices Ltd.
------------------------------------------------------------------------
604-682-0300 Beautiful British Columbia, Canada

This email and any electronic data contained are confidential and intended
solely for the use of the individual or entity to which they are addressed.
Please note that any views or opinions presented in this email are solely
those of the author and are not intended to represent those of the company.


More information about the dovecot mailing list