On Sat, Jan 25, 2025 at 11:48:14AM -0500, Bill Cole via Postfix-users wrote:
> Set the server's hostname (and by default postfix's myhostname) to a
> FQDN (ideally one which is not resolvable in public DNS but is
> resolvable locally, either as a hosts file entry or in an internal DNS
> view.)
This is much too contrived. Best to leave the machine hostname and
$myhostname alone, and valid in DNS, but (and this is not even the
OP's question), set mydestination to something that is:
- Not a public domain
- Not accepted directly in "RCPT TO:"
- Is only addresssable via rewrite rules.
I typically use "local.invalid" for rewriting to local domains, and
"virtual.invalid" for rewriting to virtual mailbox domains, and then
block all mail to the "invalid" TLD in recipient access(5) , even
though the domains would otherwise be accepted.
mydestination = local.invalid
virtual_mailbox_domains = virtual.invalid
virtual_alias_domains = ... domains actually accepted ...
indexed = ${default_database_type}:${config_directory}/
virtual_alias_maps = ${indexed}virtual
With explicit entries in virtual(5) for valid addresses, rewritten to
either local or virtual mailbox as appropriate, all other addresses are
rejected inbound.
--
Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]