Subject: | Sender header is removed |
I do a lot of form processing and am using the submitted email address to set the From address. My MTA is Exim and it is setup to reject messages with invalid From and/or Sender headers.
Since users will occassionally type in an invalid email address, I'm
getting errors when trying to send my email through the gateway. I
thought I could get by with using the new Sender key that you've
provided so that Exim would verify the envelope sender. Turns out that
Exim wants to see the Sender header itself. Since you delete that key
after extracting the fromaddr for use in the envelope, I cannot set
the Sender. I suggest using another key, e.g. Envelope-Sender, to set
the envelope sender so that you do not disable the ability to set the
Sender header.
For the meantime, I have simply uncommented the deletion of the Sender
from the %mail hash. Although I have not used this header before v0.79,
it seems that some folks may be relying on it and v0.79 would break
their code. Of course, some folks may prefer not to put the envelope
sender info into the email headers being sent. I suggest that you create
a new key and do not delete the Sender key. This would make line 216 of
Sendmail.pm look like the following:
$fromaddr = $mail{'Envelope-Sender'} || $mail{'Sender'} || $mail{'From'} || $mailcfg{'from'};
This solution would restore the functionality of the Sender header to
applications that were relying on it before v0.79, maintain
compatibility with applications based on v0.79 and also allow v0.79
users that do not want the Sender header to be set to use the new
Envelope-Sender key. I look forward to your feedback.
Thanks,
William