Author Topic: [0.2b] line break / linefeed issue in headers with php mail()  (Read 4013 times)

Offline tjm74

  • Jr. Member
  • **
  • Posts: 10
[0.2b] line break / linefeed issue in headers with php mail()
« on: November 17, 2008, 03:05:49 PM »
I prefer to use PHP mail (rather than SMTP) to inject my outgoing mail into the queue, since otherwise qmail adds a "Received-From: unknown ..." header when trying to resolve the identity of server 127.0.0.1 (localhost) -- dumb, but more difficult to solve than you might think.  Anyway, the "unknown" line can perk up the ears of several spam-filtering engines out there so I'd rather use PHP mail if I can.

But I can't, and here's why: when sending MIME-multipart e-mail (ie HTML email), roundcube breaks long headers lines with the wrong EOL sequence.

If it connects directly to my SMTP server it seems to auto-detect the right CRLF (or maybe it's not an issue because my SMTP server is translating EOL sequences on the fly?).

Some mailreaders seem to be able to handle this gracefully but of course MS Outlook chokes horribly.  As soon as it sees a header with a linebreak, it detects it as a *double* line break, sees a blank line and interprets that as a signal to begin the message body, shifting most of the header into the email body and displaying a blank From line and the mysterious warning "Extra line breaks in this message were removed."

The message isn't even recognized as multipart mime and the mime borders and everything are displayed as plain text.

Apparently there used to be a config setting for this but I sure can't find it in this version.

Help!

PS - when are you going to add a [0.2b] prefix to the damn forum prefix list??