Different users having same home/mail_location?

Peter Chiochetti pch at myzel.net
Sun Sep 24 10:34:21 EEST 2017


Am 2017-09-24 um 00:43 schrieb Tapio Sokura:
> Hello Peter,
> 
> I'm using a virtual users model in dovecot where all the mail is stored 
> under the same OS user account anyway, so file/dir permissions won't be 
> a problem. The system users I was referring to are actually completely 
> separate user accounts at the moment with their own uid/gid (and 
> passwordless sudo between them), but I guess they could use same uid/gid 
> and just have separate entries in passwd/shadow.

Hello Tapio,

I see, then they are not the same user to the (mail) system and they do 
not concern dovecot that mutch, at least for now, so my point was moot.

> Anyway at the moment I'm not concerned about getting the authentication 
> part working, but whether there's something in dovecot that will bite my 
> sitting muscles if mail_location is the same for two users. I'm aware of 
> the shared folders functionality mentioned by Marcus and that will 
> probably be my fallback, if sharing a mail_location is not viable. Same 
> mail_location would just be simpler.

I can tell you though, that I manage a system where several virtual 
users (static userdb) share the same home and therefore mail_location 
too. That has been working very well now for years, even though most 
often four (4) of them access mail concurrently with quite some turnover.

Happy hacking on the authentication part!

Peter


> On 24.9.2017 0:34, Peter Chiochetti wrote:
>> Hello Tapia,
>>
>> You are going to great lengths :) I assume, that PAM working means, 
>> "user" and "otheruser" are the names of system-users with the same 
>> uid, home etc? Then I do not see, why dovecot, all defaults and 
>> authenticating against PAM won't work out of the box, shouldn't it?
>>
>> Peter
>>
>> Am 2017-09-23 um 22:08 schrieb Tapio Sokura:
>>> Hello,
>>>
>>> Will I be breaking something if I have two users share the same home 
>>> and/or mail_location (maildir format) in dovecot? Mail will only be 
>>> delivered to the primary user, the other would be used every now and 
>>> then to login via imap (webmail).
>>>
>>> This would be on a CentOS 7 box running dovecot from the packaging 
>>> system, i.e. dovecot-2.2.10-8.el7 currently. The reason I'd like to 
>>> do this is to have two ways to login to the same mailbox, one using 
>>> username + password and the other otherusername + otherpassword + 
>>> otp-token. Basically this "otherusername" would be for cases where I 
>>> don't trust the client computer to not have a keylogger etc badness 
>>> in it, but still need to see my mail.
>>>
>>> I have this kind of a dual-login setup via PAM for regular system 
>>> user authentication and it's working ok. I'm just wondering about the 
>>> dovecot part, whether dovecot will do Unexpected Things if more than 
>>> one user have the same home and mail_location? If it makes any 
>>> difference, the users can have separate homes, but the mailbox should 
>>> be the same for usability.
>>>
>>>    Tapio


More information about the dovecot mailing list