Wietse Venema via Postfix-users wrote in <[email protected]>: |Steffen Nurpmeso via Postfix-users: |> Steffen Nurpmeso wrote in |> <20260501161007.Ke-AtUes@steffen%sdaoden.eu>: |>|I have a problem with my mailing-lists that i thought to avoid by |>|using address rewriting via virtual_aliases, like so: |>| |>| virtual_alias_maps = regexp:$meta_directory/virtual_re |>| |>| ./virtual_re:/^(s-mailx(.*))@sdaoden.eu/ ${1}@lists.sdaoden.eu |>| |>|(Note i realize just now the re is broken, but . should match ., |>|so that should not be a problem, should it.) |>| |>|The idea was that if a mail goes to the .lists.-less variant, it |>|automatically gets rewritten -- including avoiding double posts |>|via the one _and_ the other. But that does somehow not work, it |>|is still possible to send to [email protected] without having |>|that address become rewritten, and in fact two mails are sent out. |> |> That is to say, if i test via "postmap -q" then the conversion |> takes place just as wanted, that is ok. |> But if a message really is sent to say (what happened) |> [email protected] in To: and X@Y in Cc:, then the message reaches all |> subscribers twice? That is what i do not understand, and would be |> happy to hear a solution for. | |(virtual)alias expansion happens after ${1}@lists.sdaoden.eu list |expansion.
I do not understand how you mean this? The ADDRESS_REWRITING_README says Before writing the recipients to the queue file, the cleanup(8) daemon uses the optional virtual(5) alias tables to redirect mail for recipients. which implies that before "real actions" to "send" email (i quote because the machinery is very complex, and i never looked that deep into the postfix machinery) are performed, the addresses are expanded -- and if i run /usr/sbin/sendmail -bv [email protected] [email protected] i get <[email protected]>: delivery via local: delivers to command: /var/mailman/mail/mailman post s-mailx <[email protected]> (expanded from <[email protected]>): delivery via local: delivers to command: /var/mailman/mail/mailman post s-mailx which shows that the virtual alias is expanded before the "action" is performed. In the terms of the readme .. there is no duplicate removal when "writing the recipients to the queue file"? >From reading the readme virtual aliases is what i need for the purpose of catching anything which comes in and goes out, what else could it be? I am thankful for any suggestion that leads me to a solution. (I mean, i maybe could use "masquerade_domains", but it is also, i am only interested in the envelope, really. "Generic mapping", or maybe simply forbidding LOCAL1 via plain @DOMAIN instead of @lists.DOMAIN .. but this "sucks". I am in fact happy with exactly the above virtual expansion, but avoiding duplicates i really want to achieve.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) _______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
