Tuesday, February 22, 2022, 11:27:30 AM, [email protected]  wrote:

>> There doesn't appear to be a way to say "here is user and this is his 
>> email address".  It seems to be assumed that user "Fred" will have an
>> email
>> address of "fred@..." and no way to override that.


> That is not how dovecot works. Dovecot goes "here is this authenticated user 
> and they are allowed to view mail in this inbox/directory".
> You specify in config how someone is authenticated then you tell config the 
> path to the mbox or maildir/ that user can access.
> Dovecot doesn't see email addresses, it just see's authenticated users. 
> Id doesn't care if you were authenticated by the username "[email protected]" 
> or "fredIsCool". 
> The email exist only in your mind, to dovecot it's just a string to match 
> with a password.

> Mail doesn't "belong" to or is "owned" by an email address.
> You can take mail files out of one maildir/ path and dump them into someone 
> else's maildir/ and now that 2nd person can access those emails.

> In the config, you normally would say something like "[email protected]" has 
> access to "/var/spool/mail/domain.com/fred/"
> Or "[email protected]" has access to "/home/fred/mail/" depending how you set 
> your system up.
> You can just as easy say "fredIsCool" has access to
> "/var/spool/mail/domain.com/fred/"

> If you want to give fred someone else's mailbox you can say "[email protected]" 
> has access to "/var/spool/mail/domain.com/bob/" and next time fred logs in he 
> will see bob's emails. Just remember, the concept of email addresses is only 
> in your mind. Dovecot simply maps "authenticated user" to a directory of your 
> choice set in config.

> Now if you just do the bare minimum of telling dovecot the path to the files 
> **IS** the name of authenticated user, then sure the path would obviously be 
> the same as the named used to login.

> But you can get more complicated, for example using SQL, one column has the 
> username "fred" or "[email protected]" and another column can be the path to 
> his emails. Then you are not limited to the path having to match the 
> username. You might also be able to hard code names and paths in flat files 
> without having to setup a database.

Thank you so much for that explanation. That separation is sort of what I
expected originally.  Don't know how/why I went down the path I did.  

Now I need to backtrack and see what I need to change.  

Thanks again,
Phil

Reply via email to