summary refs log tree commit diff
path: root/mmime.c
Commit message (Collapse)AuthorAgeFilesLines
* mmime: gen_file: remove check for trailing newline for 7bit transferLeah Neukirchen2019-04-231-1/+1
| | | | | | | | | | | RFC2046 5.1.1 specifies that parts without trailing newlines are coded without problems: > NOTE: The CRLF preceding the boundary delimiter line is conceptually > attached to the boundary so that it is possible to have a part that > does not end with a CRLF (line break). This if-statement now also codes empty files correctly.
* mmime: print_header: fix for empty linesLeah Neukirchen2019-02-281-0/+3
|
* mmime: print_header: use signed variable for linelenLeah Neukirchen2019-02-031-1/+1
|
* use appropriate integer typesLeah Neukirchen2017-10-061-3/+4
| | | | Mainly found with clang -Wconversion -Wshorten-64-to-32.
* mmime: gen_qp: quote ^From and ^.$ to be safeLeah Neukirchen2017-09-211-1/+5
|
* mmime: gen_qp: encode trailing space and tab as =20/=09Leah Neukirchen2017-09-191-1/+12
| | | | | | | | See RFC2045 6.7.(3): > It follows that an octet with decimal value 9 or 32 appearing at the > end of an encoded line must be represented according to Rule #1. Prefer this over generating a soft-line break and then a real line break.
* styleLeah Neukirchen2017-08-311-8/+8
|
* mmime: ensure 7bit or 8bit Content-Transfer-Encoding for message/rfc822 partsLeah Neukirchen2017-07-091-3/+8
| | | | | | | | RFC 2046, Section 5.2.1: > No encoding other than "7bit", "8bit", or "binary" is permitted for > the body of a "message/rfc822" entity. (We'll generate 8bit when we have to and put the blame on the MTA.)
* mmime: disregard line length restriction for message/rfc822 attachmentsLeah Neukirchen2017-07-091-0/+3
| | | | Many webmail client's don't like qp-encoded message/rfc822 attachments.
* mmime: gen_qp: ensure not to split utf8 multibyte sequences into encoded wordsLeah Neukirchen2017-06-291-11/+20
| | | | | | | RFC2047, 5.(3): > Each 'encoded-word' MUST represent an integral number of characters. > A multi-octet character may not be split across adjacent 'encoded- > word's.
* mmime: don't generate empty filenamesLeah Neukirchen2017-06-191-0/+5
|
* mmime: allow setting content-disposition and overriding filenameLeah Neukirchen2017-06-191-4/+18
|
* mmime: gen_attachment: try to generate filenames as atoms, use qp for double ↵Leah Neukirchen2017-06-121-5/+10
| | | | quotes
* mmime: add mblaze/raw for plain text inclusionLeah Neukirchen2017-05-261-0/+4
|
* mmime: add -t to override toplevel content-typeLeah Neukirchen2017-05-261-3/+6
|
* mmime: print_header: only force qp-encoding for overlong linesLeah Neukirchen2017-04-301-1/+1
| | | | | | Lines SHOULD not be longer than 78 chars, and we try to fold like that, but we only enforce qp-encoding for 7-bit safe lines if they would be longer than 998, which they MUST not be.
* mmime: check: allow up to 998 chars in header linesLeah Neukirchen2017-04-301-4/+24
|
* mmime: use RFC2231 for Content-Disposition when neededLeah Neukirchen2017-04-061-3/+41
|
* mmime: gen_file: append newline to error messageLeah Neukirchen2017-03-301-1/+1
|
* mmime: print_header: refactorLeah Neukirchen2017-03-281-42/+39
| | | | | | | | Simplifies the code considerably. QP-header-wrapping now happens inside gen_qp. We wrap the line in advance when this will save QP-encoding, or splitting a QP-word into two. Fixes #20.
* clean up whitespaceLeah Neukirchen2017-01-261-2/+2
|
* mmime: don't truncate a #type line when it has invalid syntaxChristian Neukirchen2016-11-081-0/+2
|
* mmime: ensure a new token in qp header generationChristian Neukirchen2016-11-081-2/+2
|
* mman: gen_file: slurp the file instead of mmapChristian Neukirchen2016-10-051-18/+14
|
* mmime: gen_build: don't crash on #-line without spaceChristian Neukirchen2016-10-051-8/+10
|
* use getdelim instead of getlineChristian Neukirchen2016-09-051-1/+1
| | | | Avoids weird macros to build on FreeBSD.
* mmime: generate LF before MIME boundariesChristian Neukirchen2016-08-061-4/+4
|
* mmime: line length must be <=78Christian Neukirchen2016-08-021-2/+2
|
* mmime: add -c to check if MIME-encoding is neededChristian Neukirchen2016-08-021-3/+40
|
* mmime: add -r for plain textChristian Neukirchen2016-08-021-9/+30
|
* mmime: simplifyChristian Neukirchen2016-08-021-26/+0
|
* mmime: fix prevq logicChristian Neukirchen2016-08-011-1/+2
|
* mmime: only qp after newline when actually neededChristian Neukirchen2016-08-011-6/+12
|
* mmime: delete dead storeChristian Neukirchen2016-07-261-1/+0
| | | | Found by clang-analyzer.
* mmime: encode headers when neccessaryChristian Neukirchen2016-07-251-9/+98
| | | | This is still a bit clumsy, but I'm not sure how to make it better.
* add mmimeChristian Neukirchen2016-07-201-0/+261