I'm hosting a portion of a website for a client, and sending e-mails from their primary domain from a server in my network. Proper SPF records are in place for this, but SPF checking is still failing.
SPF seems to be checking the Return-Path:
header, which is currently showing up as serverusername@serverhostname. The server hostname uses an internal tld and means nothing to the outside world. The mail sending script is written in perl, and I tried passing a different return path value to sendmail via the -f flag, and also by explicitly adding a Return-Path:
header. Both methods have resulted in no change to the Return-Path:
.
How can I change the Return-Path:
in sendmail to the from e-mail address of the e-mail I'm sending so SPF passes?
Update:
Here are the contents of /etc/mail:
access
access.db
domaintable
domaintable.db
helpfile
local-host-names
mailertable
mailertable.db
Makefile
sendmail.cf
sendmail.cf.orig
sendmail.cf.rpmnew
sendmail.mc
submit.cf
submit.mc
trusted-users
virtusertable
virtusertable.db
From the bat book (page 1165):
You cannot change
Return-Path:
the way you try. Have your script submit emails to your mail server via SMTP. Or you can try FEATURE(masquerade_envelope)