Design Check

dovecot at ptld.com dovecot at ptld.com
Wed Oct 27 20:26:58 EEST 2021


> On 10-27-2021 12:06 pm, Felix Ingram wrote:
> 
> user1 at foobar.mydomain.com
> user2 at foobar.mydomain.com
> user1 at barbaz.mydomain.com
> user2 at barbaz.mydomain.com
> 
> I would like all emails to the "foobar" subdomain to end up in their 
> own mailbox and all emails to the "barbaz" subdomain to go to their own 
> mailbox.


Your question might be more suited to the postfix mailing list. Dovecot 
doesn't receive mail from the internet, which i believe you understand 
as you said "have postfix accepting the emails before passing them to 
Dovecot".

On the postfix side, one option would be using one mailbox and one 
catchall for each subdomain.

    Setup a user: catchall at foobar.mydomain.com
    Setup an alias: @foobar.mydomain.com -> catchall at foobar.mydomain.com

    Setup a user: catchall at barbaz.mydomain.com
    Setup an alias: @barbaz.mydomain.com -> catchall at barbaz.mydomain.com

On the dovecot side, you can setup each person with their own login user 
and all of those users access the same IMAP inbox. Or you could just 
give everyone the password to the same one mailbox 
catchall at foobar.mydomain.com.

Not sure "dovecot creating users" is the right way to think about it. 
Dovecot simply looks for IMAP files where its told to look. In dovecot 
config you setup flat files or databases that tell dovecot if someone 
logs in with this user:pass then look in this /server/path for emails. 
Other than that config, which you could point to a different 
/server/path changing their inbox, there are no "accounts".



More information about the dovecot mailing list