I have been having trouble on one server in particular, sending mail using PHP. Spam filters on other machines that I work with require that the return-path email be resolvable, unfortunately no matter what I do to set the return-path header, short of uisng the -f option with the mail function, the return-path header is re-written to look something like..
apache@theservernameanddomain.com
The rule in the sendmail.cf that appears to be causing this is..
H?P?Return-Path: <$g>
The explanation I found for that line, doesn't really tell me what to do if I don't want it to re-write the header.
This line defines a field called Return-Path: that displays the contents of
the $g macro (sender address relative to the receiver). The ?P? portion
indicates that this line is only used if the mailer uses the P flag (the
mailer requires a Return-Path line).
My question is, is it safe to just comment out that line? Will that stop sendmail from re-writing the return-path header. I would prefer to set it within the headers, on a project by project basis.