On 2/17/2022 6:47 AM, Matus UHLAR - fantomas wrote:
last week's discussions showed that using *canonical_maps to e.g.
map to different domains can result into taking all addresses as
existing:
https://marc.info/?l=postfix-users&m=164459031004167&w=2
https://marc.info/?l=postfix-users&m=164459739009282&w=2
I expected the canonical_maps to be resolved and address then
checked in local_recipient_maps or relay_recipient_maps, but
apparently in this case the *_recipient_maps are not checked.
I was trying to understand how this works, but have not found any
description of this process in the docs.
Can someone explain this, point me to the docs or perhaps proper web
search?
On 17.02.22 10:56, Noel Jones wrote:
This could be better documented, but basically when receiving mail
postfix does not do a full expansion of the recipient address. So the
first time an address is accepted by canonical, virtual, local, relay,
... whatever maap, the address is considered as valid. Consequently,
avoid using wildcard rewrites for recipient addresses.
This is a result of distributed nature of postfix. Incoming mail
recipients are checked by cleanup(8) and trivial-rewrite(8). To do a
full expansion, the functionality of the various delivery agents would
also need to be folded into those programs, or a new recipient
expansion checker program would need to be bolted on. This is not an
easy problem to solve without causing other problems.
This is not an exhaustive answer, but should be close enough. This
subject has been discussed in the archives several times, but might be
hard to track down.
This explains much, thanks.
I'm still curious when it's decided if the address is local or relayed, to
match in respective _recipient_maps.
I guess that this is skipped in case the address matches canonical_maps.
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Chernobyl was an Windows 95 beta test site.