Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | mmime: include strings.h for strncasecmp | Michael Forney | 2022-12-09 | 1 | -0/+1 |
| | |||||
* | mmime: allow to relax body line length limit | Lucas | 2022-01-25 | 1 | -1/+2 |
| | | | | Message-Id: <10e22a318b5c70d89432d85ecd8cb8ce1796a51d.1643116719.git.lucas@sexy.is> | ||||
* | mmime: ensure no empty parts are generated after an include. | Leah Neukirchen | 2021-08-07 | 1 | -4/+9 |
| | | | | Reported by lhynes. | ||||
* | mmime: keep (none) whitespace after quoted strings | Leah Neukirchen | 2021-06-18 | 1 | -1/+3 |
| | |||||
* | mmime: generate valid empty mime multipart/mixed when no body is given | Leah Neukirchen | 2021-06-18 | 1 | -1/+3 |
| | |||||
* | mmime: print_header: encode quoted-strings at once | Leah Neukirchen | 2021-06-18 | 1 | -3/+29 |
| | | | | | | | | | | | | | | This is maybe a foul compromise between correctness and complexity of implementation, but it should do the right thing in most cases, and does not require fully parsing and reconstructing all headers that can contain phrases. An 'encoded-word' MUST NOT appear within a 'quoted-string'. We thus completely encode the quoted-string (if necessary) as a single encoded-word, and strip off the quotes. This should fix encoding of addresses that have both non-ASCII and special chars such as , and ;. | ||||
* | mmime: be more careful when qp-encoding in headers | Leah Neukirchen | 2021-06-18 | 1 | -0/+9 |
| | | | | | | | | Characters such as , or ; mustn't appear in qp-encoded strings, as they have a meaning in phrases. To be safe, encode all special characters except for the safe ones in RFC 2047 5.(3). _ is dealt with already. | ||||
* | mmime: do not duplicate Content* headers | Leah Neukirchen | 2021-05-09 | 1 | -7/+21 |
| | | | | | | | | | Do not add additional Content-Type and Content-Transfer-Encoding headers when using mmime on input already containing them. Do not reencode the message if Content-Transfer-Encoding is set. Based on a patch by Felix Van der Jeugt and duncaen. | ||||
* | mmime: allow # in include lines, used to override the content-disposition | Leah Neukirchen | 2020-12-22 | 1 | -1/+1 |
| | |||||
* | mmime: propagate errors when attaching a file fails | Leah Neukirchen | 2020-11-08 | 1 | -2/+4 |
| | |||||
* | pledge(2) all programs | Tim Kuijsten | 2020-09-06 | 1 | -0/+3 |
| | | | | | | | | | | | | | | | | All programs except mshow have a very tight set of promises. mshow has a broad set of promises and might be a good future candidate to further restrict using unveil(2). This patch is based on commit 0300a112 by Alex Holst (dated 2017-12-07), which was proposed in GH PR #79. * pledged mpick, mflow and mdate so that now all programs are pledged * removed some unneeded promises and added some missing promises * move err.h include and OpenBSD ifdef into a new xpledge.h * cleaned up code aligning and whitespace Closes: #179 [via git-merge-pr] | ||||
* | mmime: allow ; and =, for ";charset=" | Leah Neukirchen | 2020-08-22 | 1 | -1/+2 |
| | |||||
* | mmime: be more strict when detecting content types for the include syntax | Leah Neukirchen | 2020-08-05 | 1 | -1/+18 |
| | | | | Previously, shebangs would be (mis)detected: #!/bin/sh -e | ||||
* | mmime: gen_file: remove check for trailing newline for 7bit transfer | Leah Neukirchen | 2019-04-23 | 1 | -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 lines | Leah Neukirchen | 2019-02-28 | 1 | -0/+3 |
| | |||||
* | mmime: print_header: use signed variable for linelen | Leah Neukirchen | 2019-02-03 | 1 | -1/+1 |
| | |||||
* | use appropriate integer types | Leah Neukirchen | 2017-10-06 | 1 | -3/+4 |
| | | | | Mainly found with clang -Wconversion -Wshorten-64-to-32. | ||||
* | mmime: gen_qp: quote ^From and ^.$ to be safe | Leah Neukirchen | 2017-09-21 | 1 | -1/+5 |
| | |||||
* | mmime: gen_qp: encode trailing space and tab as =20/=09 | Leah Neukirchen | 2017-09-19 | 1 | -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. | ||||
* | style | Leah Neukirchen | 2017-08-31 | 1 | -8/+8 |
| | |||||
* | mmime: ensure 7bit or 8bit Content-Transfer-Encoding for message/rfc822 parts | Leah Neukirchen | 2017-07-09 | 1 | -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 attachments | Leah Neukirchen | 2017-07-09 | 1 | -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 words | Leah Neukirchen | 2017-06-29 | 1 | -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 filenames | Leah Neukirchen | 2017-06-19 | 1 | -0/+5 |
| | |||||
* | mmime: allow setting content-disposition and overriding filename | Leah Neukirchen | 2017-06-19 | 1 | -4/+18 |
| | |||||
* | mmime: gen_attachment: try to generate filenames as atoms, use qp for double ↵ | Leah Neukirchen | 2017-06-12 | 1 | -5/+10 |
| | | | | quotes | ||||
* | mmime: add mblaze/raw for plain text inclusion | Leah Neukirchen | 2017-05-26 | 1 | -0/+4 |
| | |||||
* | mmime: add -t to override toplevel content-type | Leah Neukirchen | 2017-05-26 | 1 | -3/+6 |
| | |||||
* | mmime: print_header: only force qp-encoding for overlong lines | Leah Neukirchen | 2017-04-30 | 1 | -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 lines | Leah Neukirchen | 2017-04-30 | 1 | -4/+24 |
| | |||||
* | mmime: use RFC2231 for Content-Disposition when needed | Leah Neukirchen | 2017-04-06 | 1 | -3/+41 |
| | |||||
* | mmime: gen_file: append newline to error message | Leah Neukirchen | 2017-03-30 | 1 | -1/+1 |
| | |||||
* | mmime: print_header: refactor | Leah Neukirchen | 2017-03-28 | 1 | -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 whitespace | Leah Neukirchen | 2017-01-26 | 1 | -2/+2 |
| | |||||
* | mmime: don't truncate a #type line when it has invalid syntax | Christian Neukirchen | 2016-11-08 | 1 | -0/+2 |
| | |||||
* | mmime: ensure a new token in qp header generation | Christian Neukirchen | 2016-11-08 | 1 | -2/+2 |
| | |||||
* | mman: gen_file: slurp the file instead of mmap | Christian Neukirchen | 2016-10-05 | 1 | -18/+14 |
| | |||||
* | mmime: gen_build: don't crash on #-line without space | Christian Neukirchen | 2016-10-05 | 1 | -8/+10 |
| | |||||
* | use getdelim instead of getline | Christian Neukirchen | 2016-09-05 | 1 | -1/+1 |
| | | | | Avoids weird macros to build on FreeBSD. | ||||
* | mmime: generate LF before MIME boundaries | Christian Neukirchen | 2016-08-06 | 1 | -4/+4 |
| | |||||
* | mmime: line length must be <=78 | Christian Neukirchen | 2016-08-02 | 1 | -2/+2 |
| | |||||
* | mmime: add -c to check if MIME-encoding is needed | Christian Neukirchen | 2016-08-02 | 1 | -3/+40 |
| | |||||
* | mmime: add -r for plain text | Christian Neukirchen | 2016-08-02 | 1 | -9/+30 |
| | |||||
* | mmime: simplify | Christian Neukirchen | 2016-08-02 | 1 | -26/+0 |
| | |||||
* | mmime: fix prevq logic | Christian Neukirchen | 2016-08-01 | 1 | -1/+2 |
| | |||||
* | mmime: only qp after newline when actually needed | Christian Neukirchen | 2016-08-01 | 1 | -6/+12 |
| | |||||
* | mmime: delete dead store | Christian Neukirchen | 2016-07-26 | 1 | -1/+0 |
| | | | | Found by clang-analyzer. | ||||
* | mmime: encode headers when neccessary | Christian Neukirchen | 2016-07-25 | 1 | -9/+98 |
| | | | | This is still a bit clumsy, but I'm not sure how to make it better. | ||||
* | add mmime | Christian Neukirchen | 2016-07-20 | 1 | -0/+261 |