1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-02-22 14:53:57 +01:00
aerc/lib/send
Robin Jarry cb1c4c9c62 send: ensure crlf line endings
RFC 5322 states that messages should only use CRLF line endings. Here
are two important excerpts:

> 2.1. General Description
>
>  Messages are divided into lines of characters.  A line is a series of
>  characters that is delimited with the two characters carriage-return
>  and line-feed; that is, the carriage return (CR) character (ASCII
>  value 13) followed immediately by the line feed (LF) character (ASCII
>  value 10).  (The carriage return/line feed pair is usually written in
>  this document as "CRLF".)

> 2.3.  Body
>
>  The body of a message is simply lines of US-ASCII characters.  The
>  only two limitations on the body are as follows:
>
>  o  CR and LF MUST only occur together as CRLF; they MUST NOT appear
>     independently in the body.
>  o  Lines of characters in the body MUST be limited to 998 characters,
>     and SHOULD be limited to 78 characters, excluding the CRLF.

Most MTA are tolerant to invalid messages but some others are more
pedantic. Ensure we only send valid line endings.

Link: https://www.rfc-editor.org/rfc/rfc5322.html#section-2.1
Link: https://www.rfc-editor.org/rfc/rfc5322.html#section-2.3
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
2025-01-07 19:20:44 +01:00
..
jmap.go jmap: handle copy-to and :send -t 2024-12-21 17:02:31 +01:00
parse.go lib: add function to obtain Message-ID hostname 2024-02-12 23:01:55 +01:00
sasl.go send: move code to lib for reuse 2024-02-12 22:58:40 +01:00
sender.go send: ensure crlf line endings 2025-01-07 19:20:44 +01:00
sendmail.go completion: display descriptions next to choices 2024-10-23 10:22:51 +02:00
smtp.go smtp: take smtp-domain into account for tls connections 2024-07-15 22:39:12 +02:00