LINUXOR.SK ... open source notes ...

Email - Postfix virtual_domains table

category: solutionz · date: 2019-12-31 · updated: 2026-10-02 · author: LALA

Email Solution · Config document · referenced from Internal servers: Postfix

The list of mail domains the site considers its own. Postfix reads it twice: as virtual_mailbox_domains, and as the recipient check inside the restriction class local_only, where it decides whether a sender without external rights may write to this recipient.

ItemValue
Path on the server/etc/postfix/virtual_domains
Shown hereDC2-A-VCMSX001
Also onDC2-B-VCMSX001 and DC2-A-VCMSX002, identical
Referenced byvirtual_mailbox_domains and local_only = check_recipient_access hash:/etc/postfix/virtual_domains, reject in main.cf
Activated withpostmap /etc/postfix/virtual_domains; the install notes do not record the command

The file

ini
###################################################################################################
# Domain		Anything
###################################################################################################
ad-dc2.example.net		OK

Differences on the other hosts

diff shows none between the three internal servers of site 2. For site 1 the first design shows the same file with ad.example.net.

The right-hand side matters only for the second use. As a virtual_mailbox_domains table any value will do, which is what the column title "Anything" says; as an access table the value OK is the verdict that permits the recipient.

Checked against Postfix 3.11

As builtToday
hash: table, built with postmap into a Berkeley DB fileRHEL 10 no longer provides the Berkeley DB libraries; the default table type of its Postfix is lmdb: and existing tables have to be converted. Postfix 3.11 describes the migration in NON_BERKELEYDB_README
virtual_mailbox_domains and check_recipient_access reading the same tableI expect both to be still valid; not checked

The content needs no change; the table type does.

← solutionz