Match sender domain name from/return-path and replace

jstockley

New Member
May 24, 2023
1
0
1
I am trying to match on sender domain names that match on all but 1 specific domain. If it is from example123@xyz.com then accept the email and let it go. If it is from any other domain at all, replace that sender name with either sender@xyz.com ( or preferably example123@xyz.com ).

I have tried this using a simple rule with only the action object to apply the modify field From: with sender@xyz.com and this works ok. I have been trying the below so far:

Rule: Dont modify sender address
who object - domain - xyz.com
action object - accept
Priority: 99

Rule: Modify sender address
who object - regex - .*[^xyz.com]
action object - Modify field - From - value sender@xyz.com
Priority: 92

I have tried using a what object - match field - From - .*[^xyz.com] for the modify, as well as a match field - From - .*[xyz.com] for the do not modify rule and combinations of them both together or one and the other.

Once I can get the from field working, I then want to include the return-path field as well to capture any other emails that might be incorrect. The plan was to put either the regex/match field into the same who/what object for each rule, or alternatively making them separate and having the "Dont modify sender address" return-path rule priority just below the from rule, and above the "Modify sender address" rules.

Is there a straightforward way to do this?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!