I have got stuck with PCRE and asking for help!
The idea is simple: make sure that Message-ID in emails’ headers, the part that is after at (@) is having the actual senders domain part.
Example of what I have at the moment in headers:
Example of where I’m trying to get:
What I have achieved?
I have managed to modify all outgoing mail from the server and its Message-ID part, from host.serverexample.org --> MyManualExample.com, by applying the following regular expression:
/Message-ID:(.*)@(.*)>(.*)/ REPLACE Message-ID:$1@MyManualExample.dom>$3
Now how do I make it dynamically changed based on senders email’s domain part?
Is there a way to parse
/From: somehow and apply it to the above example?