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?
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?