home | list info | list archive | date index | thread index

Re: postfix and multiple domains


On 24/03/2026 15:29, Ron via linux wrote:
postconf -n (heavily snipped)

mydestination = localhost, localhost.$mydomain, mydomain1.com

If using virtual transport delivery, note this:

> NEVER list a virtual MAILBOX domain <https://www.postfix.org/ADDRESS_CLASS_README.html#virtual_mailbox_class> name as a mydestination <https://www.postfix.org/postconf.5.html#mydestination> domain!

www.postfix.org

Postfix Virtual Domain Hosting Howto <#>

🔗 https://www.postfix.org/VIRTUAL_README.html#virtual_mailbox <https://www.postfix.org/VIRTUAL_README.html#virtual_mailbox>

I think one confusion for me might be - I don't have virtual mailboxes, I have linux system user mailboxes, but I do have virtual domains, does that mean I need virtual_mailbox_domains? I will dig into whether I should have virtual_mailbox_domain (which I don't) and/or virtual_alias_domains (which I do)

I can't be certain why I ended up with virtual_alias_domains, which must also abide by the rule that a domain cannot be included in both mydestinations and virtual_alias_domains.


virtual_alias_domains = mydomain2.com
virtual_alias_maps = hash:/etc/postfix/virtual

/etc/postfix/virtual contains
user [ at ] mydomain1 [ dot ] com user
user [ at ] mydomain2 [ dot ] com user

user2 [ at ] mydomain2 [ dot ] com user2

@mydomain1.com user
@mydomain2.com user

/etc/postfix/virtual.db is generated

So, what I would look at is removing mydomain1.com from $mydestination and then see what happens.

If I remove it (and in my case added it to virtual_alias_domains when I did the test) all my emails get rejected, and nothing arrives to any domain.


Probably not a complete answer, but hopefully a step in the right direction.

Much appreciated.


(Reviewing some of this, and the docs, and my main.cf files... I gotta admit I kinda hate postfix sometimes.

I'm now thinking I need a deep-dive review of virtual_mailbox_domains, virtual_mailbox_maps, virtual_mailbox_base, virtual_alias_maps,... It all works, but I forget how & why.)

I wrote copious notes of why I was doing stuff in my main.cf file, but my comments end up in contradictory circles, and I spiral into an alternate universe where email doesn't work...

message navigation