On 10-27-2021 12:06 pm, Felix Ingram wrote:

us...@foobar.mydomain.com
us...@foobar.mydomain.com
us...@barbaz.mydomain.com
us...@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: catch...@foobar.mydomain.com
   Setup an alias: @foobar.mydomain.com -> catch...@foobar.mydomain.com

   Setup a user: catch...@barbaz.mydomain.com
   Setup an alias: @barbaz.mydomain.com -> catch...@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 catch...@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".

Reply via email to