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:
From:
From: name@UsersDomain.ltd
Message-ID:
Message-ID: <9c740906185e84e0848c1d056fdf92bd@host.serverexample.org>
Example of where I'm trying to get:
From:
From: name@UsersDomain.ltd
Message-ID:
Message-ID: <9c740906185e84e0848c1d056fdf92bd@UsersDomain.ltd>
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?
I still couldn't find a solution for that!? Any ideas, guys?
Ilia