Multiple Header Replacement

20 views
Skip to first unread message

akshay....@gmail.com

unread,
Jul 12, 2020, 11:45:43 AM7/12/20
to
Is it possible to replace multiple Header based on sender IP, below is a example

if mail contains sender IP say 192.168.1.2 then alter / modify From, Reply-to headers

# below one would not work as per man page but what's the way to achieve this task, I was looking for content filter snippet to achieve this but couldn't find.

```
if /Received from.*\[192.168.1.2\]/
/From:(.*)$/ REPLACE From: "Server-A" <ser...@example.com>
/Reply-to:(.*)/ REPLACE Reply-to: "Server -A admin" <server...@example.com>
end

if /Received from.*\[192.168.1.3\]/
/From:(.*)$/ REPLACE From: "Server-B" <ser...@example.com>
/Reply-to:(.*)/ REPLACE Reply-to: "Server -B admin" <server...@example.com>
end
```
Reply all
Reply to author
Forward
0 new messages