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: [email protected]" -a "Reply-To: [email protected]" \
-a "From: [email protected]" [email protected]
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.