On Sun, Apr 09, 2023 at 08:08:04PM -0400, François via Postfix-users wrote:
> The regexp:/etc/postfix/canonical just did not want to map reliably a > domain name to a certain Return-Path, even though I tested successfully all > regular expressions with (for example): > > postmap -q "info[at]ghi.com" regexp:/etc/postfix/canonical > > when used to test the file listing the following: > > /@abc\.com/ address_1[at]whereto.com > /@def\.com/ address_1[at]whereto.com > /@ghi\.com/ address_2[at]whereto.com > /@jkl\.com/ address_1[at]whereto.com You had a mistake in "main.cf", which you never posted: https://www.postfix.org/DEBUG_README.html#mail > Those are pretty vanilla regular expressions matching all email addresses > of the listed domains. They are (typically) sloppy. The correct form is: /@abc\.com$/ addres...@whereto.com /@def\.com$/ addres...@whereto.com /@jkl\.com$/ addres...@whereto.com /@ghi\.com$/ addres...@whereto.com Also, in case it is applicable, keep in mind that canonical mapping is recursive, and will apply to the RHS forms, should those also match. > Why "postmap -q" and the actual sending of a message from these > domains behave differently I just don't understand. No telepaths on this list: https://www.postfix.org/DEBUG_README.html#mail -- Viktor. _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org