The attached patch adds the From header and then adds the Return Path if it is not already set in the system. This is so the Return path will not be set to something like apache@localhost if the site / apache is serving more than one vhost.

Patch is going to be attched in the next comment.

CommentFileSizeAuthor
#1 mail2web-527992.patch1.23 KBdarren.ferguson

Comments

darren.ferguson’s picture

StatusFileSize
new1.23 KB

Attaching the patch with the pertinent issue number per D.O cvs instructions

Ian Ward’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi Darren,

Can you explain under what circumstances the "From" header is not filled? For the "Return-Path" I think it's probably best to make any changes like this at a lower level, like in the messaging module. There may be some issues w/ adhering to Sender Policy Framework for web-generated email (http://www.openspf.org/Best_Practices/Webgenerated) depending on what a site's site_mail is set to. That said, there could be problems further upstream, like from your example of apache@localhost as the return-path, which is happening because the mail server is not configured properly. Could you post back more details about the circumstances and example of the problematic headers?

Thanks,
Ian

Ian Ward’s picture

As a note to my last post - the messaging module is already setting the Return-Path based on the site_mail variable (see messaging.mail.inc).

Ian Ward’s picture

Project: Mail to Web » Mail Comment

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Seems like this is "by design" based on comment #2 and #3 since messaging module already provides that.