1
I am trying to test DMARC settings in order to avoid 5322.From header spoofing attacks and I need a quick way to send messages using different From and Return-path addresses. I've tried:
mail -a "Return-Path: test@domaina.com" -a "Reply-To: test@domaina.com" \
-a "From: test@domainb.com" me@target.com
This doesn't work (it uses the From: address for return-path).
I've also tried changing postfix smtp_generic_maps. This changes all the addresses.
Is there any simple way to do this from the command line without having to telnet to a MX and speak SMTP?
Simple perl or PHP script would be acceptable.