Wietse Venema wrote: > Stefan Claas: > > Wietse Venema wrote: > > > > > Stefan Claas: > > > > Hi, > > > > > > > > my postfix mail server works perfectly so far. > > > > > > > > However, I am now facing the following problem and have tried as best > > > > as I can to find a solution to this. > > > > > > > > I run an anonymous remailer, which also allows sending emails to > > > > mail2news gateways for Usenet postings. So far so good. > > > > > > > > I would like to achieve the following: > > > > > > > > postfix should modify outgoing email headers that *only* go to mail2news > > > > gateways, using the email gateway addresses for parsing, so that the > > > > right part of the message ID, after the @ charachter, will be modified > > > > with a defined string. > > > > > > Do it in the mail2news gateway. > > > > Oh ... I would have expected a different answer from you. > > > > Like I previously replied in this thread, users are using often multiple > > mail2news gateways when posting messages to Usenet and this would then > > result in different message-ids for the same posting. > > Who said that users can only use your Postfix system to post > to news gateways?
Nobody, sorry if it sounded like that! > Anyway, if you can identify all the the mail2news gateways AND your users > must use your server set up a transport map: > > /etc/postfix/main.cf > transport_maps = hash:/etc/postfix/transport > > /etc/postfix/transport: > mail2n...@axample.com newsgateway: > mail2news@other.example newsgateway: > > (or use a pcre: map if you want broader coverage). > > /etc/postfix/master.cf: > newsgateway unix - - n - - smtp > -o header_checks=pcre:/etc/postfix/news-header-checks.pcre > > Then populate news-header-checks.pcre with all the patterns that > you need to modify or discard information. It will of course break > DKIM signatures so be aware of that in your DMARC policies. > > Wietse Thanks a lot for your help, much appreciated! Best regards Stefan -- Signal (Desktop) +4915172173279 https://keybase.io/stefan_claas