On 2025-07-09 at 09:37:09 UTC-0400 (Wed, 9 Jul 2025 09:37:09 -0400 (EDT))
John Griffiths via Postfix-users <mozill...@grifent.com>
is rumored to have said:

What is the difference between listing host in virtual vs mydestination in main.cf?

Read the ADDRESS_CLASS_README file in the documentation. You can find it and all the other readme files with 'postconf readme_directory'.

Addresses in mydestination domains are local addresses that represent real system user accounts on the Postfix host.

Addresses in either of the virtual classes (virtual alias and virtual mailbox domains) either deliver to local user mailboxes via aliases or via a map into mailboxes that are not owned by a regular user, with access via IMAP or POP.

Is there an advantage to one over the other?

Having the local hostname in mydestination allows mail to u...@host.name or just 'user' to deliver without the use of either virtual mechanism to the system mailbox of that user. That is the default because it is simple and unsurprising.

Having the local hostname NOT in mydestination and using virtual aliases or virtual mailboxes means that you must define which u...@host.name addresses you wish to exist and how you want them delivered. This arguably allows for greater security because the existence of u...@host.name as a mail address does not imply the existence of the system-level account named 'user' on host.name.

I read the header for virtual and don't really understand the difference.

The header of that file is just the man page for the format, not full documentation. The discussion of both classes of virtual address is in the VIRTUAL_README file.

--
 Bill Cole
 b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com addresses)
 Not Currently Available For Hire
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to