So if the FROM address matches "@example.com.*<"
BUT does not have a "<.*@example.com"
I want a regex to flag it.

(via a colleague):
This appears to be work for me fine.

test.regex:
if /^From:.*@example\.com.*</
!/^From:.*@example\.com.*<.*@example\.com>/ HOLD FROM Domain mismatch
endif

# postmap -q "FROM: [email protected] <[email protected]>" regexp:test.regex
HOLD FROM Domain mismatch
# postmap -q "FROM: [email protected] <[email protected]>" regexp:test.regex
#


Reply via email to