[cl-smtp-devel] [PATCH] Prevent sending of bare LFs that are rejected by qmail.
Justin Megawarne
justin at megawarne.com
Tue Dec 17 23:17:48 UTC 2013
Hi, all.
There is a problem when sending plain-text messages with newlines to qmail
via CL-SMTP. Bare LFs should never be sent as newlines, but this is allowed
through in some cases.
http://cr.yp.to/docs/smtplf.html
When CL-SMTP encounters a #\NewLine in the message body, it simply outputs it
to the stream. On Linux, Mac, etc. these get turned into bare LFs.
qmail rejects this non-compliant behaviour. It has a config setting called
USE_FIXCRIO to transparently convert bare LFs into CRLFs. However, it would
be much nicer if CL-SMTP sent the right thing, and, besides, magic fixing
is prohibited by the RFC.
Below is a patch that should resolve the problem. I have not had an
opportunity to test on other MTAs.
? cl-smtp-fix-newline.patch
Index: cl-smtp.lisp
===================================================================
RCS file: /project/cl-smtp/cvsroot/cl-smtp/cl-smtp.lisp,v
retrieving revision 1.22
diff -r1.22 cl-smtp.lisp
114c114
< (write-char c stream))
---
> (write-blank-line stream))
--
Justin Megawarne
mailto:justin at megawarne.com
skype:jmegawarne?call
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://mailman.common-lisp.net/pipermail/cl-smtp-devel/attachments/20131217/09eeed38/attachment.sig>
More information about the cl-smtp-devel
mailing list