" My sense is that you're probably going about solving the wrong problem,
and that perhaps describing why you think you think you need to do this
would get you a more useful answer."

This is mainly proxy that relays alerts mail to o386

Reconfiguring all clients is a huge workload.

So various senders are sending alerts mails with various from fields these
are all internal domains.

Eero

pe 9. elok. 2024 klo 10.12 Viktor Dukhovni via Postfix-users (
postfix-users@postfix.org) kirjoitti:

> On Fri, Aug 09, 2024 at 10:01:11AM +0300, Eero Volotinen wrote:
>
> > Lets say that this looks complex.
> >
> > This works: smtp_generic_maps = hash:/etc/postfix/generic to rewrite smtp
> > from:
> >
> > and file contains:
> > /.*/
>
> A "hash" table is not do regular-expression matching.  Perhaps you want
> one of:
>
>     - smtp_generic_maps = static:j...@example.com
>     - smtp_generic_maps = pcre:${config_directory}/generic.pcre
>
>         generic.pcre:
>             /^/     j...@example.com
>
> even regardless of the original domain?  Though that seems much too
> crude to me.  Note, however, that smtp_generic_maps will also rewrite
> the "To:" and "cc:" heades and the envelope recipient address.
>
> Do rewrite just the envelope sender and "From:" header, you'd want
> sender_canonical_maps, which is semantically flawed, because when
> replying to "all" the "From:", "To:" and "cc:" addresses are
> functionally equivalent, and should generally be rewritten consistently,
> but perhaps your use-case makes that defect tolerable.
>
> > Yes, all from to same author regardless of original input. no need to
> > touch to or cc headers.
>
> My sense is that you're probably going about solving the wrong problem,
> and that perhaps describing why you think you think you need to do this
> would get you a more useful answer.
>
> --
>     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