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: n...@example.com <n...@other.com>" regexp:test.regex
HOLD FROM Domain mismatch
# postmap -q "FROM: n...@example.com <n...@example.com>" regexp:test.regex
#


Reply via email to