Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mangling of auto-generated mails.
s9y will encode the body of its auto-generated mails as quoted-printable when imap_8bit() is available. imap_8bit() will use "\r\n" as linebreaks as mandated for SMTP transfer. The result will be transmitted via PHP's mail() function, using direct SMTP on Windows and piping it to a MTA on Unix. Most MTAs will cope just fine with those linebreaks, while qmail will not; it will replace all "\n" linebreaks with "\r\n", so we get "\r\r\n" in our case. We can't "fix" qmail (as its maintainer, if there even is one, does not consider this behaviour wrong), but we can replace the line endings we get from imap_8bit(). The fix does work with qmail and Exim and should work with sendmail and Postfix and other MTAs, too. It may break sending mail on Windows (i.e. lose all linebreaks), but I think that's acceptable, as we'll have more qmail installation than Windows servers out there. A workaround could be to set serendipity['forceBase64']=true in serendipity_config_local.inc.php, but I'd prefer this fix. Fixes s9y#644. Signed-off-by: Thomas Hochstein <thh@inter.net>
- Loading branch information