I'm sorry if any part of my request seemed disagreeable: not my intention.

I did post the relevant parts (I believe) of main.cf:

canonical_maps = regexp:/etc/postfix/canonical
canonical_classes = envelope_sender

I don't see a mistake in those lines (this affirmation could be in itself a
mistake, I agree :-)

I think the initial regex are better, in this case, if they are
sloppy(ish).  I do not know if the domain finishes or not with the TLD
(whitespace is frequent: I just need to find the domain somewhere in the
string).

Again, sorry for any inconvenience.

Le dim. 9 avr. 2023, à 22 h 08, Viktor Dukhovni via Postfix-users <
postfix-users@postfix.org> a écrit :

> 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
>
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to