Commit Graph

1130 Commits (e951b0ba27f878e4daa09c59a89e8f5196e31e07)
 

Author SHA1 Message Date
Lucas e951b0ba27 mmime: allow to relax body line length limit
Message-Id: <10e22a318b5c70d89432d85ecd8cb8ce1796a51d.1643116719.git.lucas@sexy.is>
2 years ago
Leah Neukirchen fa27d73ddd mshow: don't spawn pager with -t 2 years ago
Leah Neukirchen 3496545358 mflow: fixed lines were not wrapped, add test suite
Reported by ninewise.
2 years ago
Leah Neukirchen a60147f633 NEWS.md: update for 1.2 2 years ago
Stacy Harper e1e5bfe5ff mcom: take Delivered-To into account for choosing From address
I just received a mail coming from a Google Group mail list and it had
the group email as To. So my reply used the default configured mail as
from and not the correct one.

Googles mails provide the target email as Delivered-To. This patch add
this check before the To to prevent this error.

Closes: #217 [via git-merge-pr]
3 years ago
Leah Neukirchen e44aaad66e mlesskey.example: clarify installation 3 years ago
Leah Neukirchen b962fb6be0 rfc2047: skip whitespace everywhere during base64 decoding
> The encoded output stream must be represented in lines of no more
> than 76 characters each.  All line breaks or other characters not
> found in Table 1 must be ignored by decoding software.  In base64
> data, characters other than those in Table 1, line breaks, and other
> white space probably indicate a transmission error, about which a
> warning message or even a message rejection might be appropriate
> under some circumstances.
3 years ago
Leah Neukirchen 958e3e08bd mless: prefer setting LESSKEYIN and .mlesskey
Fixes #215.
3 years ago
Leah Neukirchen fcd8428b72 mrep/mbnc/mfwd: fix sequence after changing flags of (likely) cur
Else tools like mless lose track of cur and jump around after these
actions.

Closes #214.
3 years ago
Leah Neukirchen 41bd429452 blaze822: blaze822/blaze822_mem: detect line ending before scanning end of header
A mail using CRLF which contained (for some reason) a LFLF pair would
be misparsed as the header was read until the LFLF.

Instead, scan for the first LF, check if it's preceded by CR,
and then search for the proper header terminator only.

Closes #212.
3 years ago
Leah Neukirchen 4be6e0ce91 blaze822: remove blaze822_mmap, never used. 3 years ago
Leah Neukirchen 4ccf2f08c1 mmime: ensure no empty parts are generated after an include.
Reported by lhynes.
3 years ago
Léo Villeveygoux 65d43e3cea mpick: remove dead code
It would load the seq file even when unused (and complain when it's not found).
Message-Id: <20210706174750.246026-1-l@vgx.fr>
3 years ago
Leah Neukirchen 386b65fcb4 mblaze-profile.5: clarify Reply-From 3 years ago
Leah Neukirchen 014f82ef0c t/1000-mmime.t: add tests for recent changes 3 years ago
Leah Neukirchen d324b92dd4 mmime: keep (none) whitespace after quoted strings 3 years ago
Leah Neukirchen 0370916357 mmime: generate valid empty mime multipart/mixed when no body is given 3 years ago
Leah Neukirchen 5c7432aa7b mcom: use mhdr -d -A even when extracting From: headers
We only want to decode the display part of the addresses only.

Mails with a From: like
  From: "Non-ASCII Lastname, Firstname" <mail@example.org>
resulted in To: lines like
  To: Non-ASCII Lastname, Firstname <mail@example.org>
which would send to two addresses.  Use -A to ensure proper decoding
and quoting, even if its just a single address in From.
3 years ago
Leah Neukirchen 4f1f0ea2b3 maddr: decode only display part of address
RFC 2047.6.2:
   NOTE: Decoding and display of encoded-words occurs *after* a
   structured field body is parsed into tokens.
3 years ago
Leah Neukirchen 0ed7f72d31 mhdr: print_addresses: decode only display part of address
RFC 2047.6.2:
   NOTE: Decoding and display of encoded-words occurs *after* a
   structured field body is parsed into tokens.
3 years ago
Leah Neukirchen 4e0de11300 mmime: print_header: encode quoted-strings at once
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 ;.
3 years ago
Leah Neukirchen 9713264f70 mmime: be more careful when qp-encoding in headers
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.
3 years ago
Leah Neukirchen 23941c6c19 t/1500-maddr.t: deactivate invalid test case
An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'.
3 years ago
Dominik Honnef 6e8e4e01ed mless: list same number of mails whether we're at the beginning or end 3 years ago
Leah Neukirchen 6684f74f07 mblaze.7: IRC moved to libera.chat. 3 years ago
Leah Neukirchen 605509cc06 t/1900-mdeliver.t: fix plan 3 years ago
Leah Neukirchen 2b517f97c0 msed: match header names case insensitively
Found by skarnet.
3 years ago
Leah Neukirchen c4008e43d9 mexport: use UTC timestamp in the postmark line 3 years ago
Leah Neukirchen ce900601cb mexport: default timestamp to unix second 0, not -1
This is better recognizable as "no data".
3 years ago
Leah Neukirchen 41c681362d NEWS.md: update 3 years ago
Leah Neukirchen 8ba44643e4 t/1900-mdeliver.t: add test for malformed mboxes 3 years ago
Leah Neukirchen 669af4ffca mdeliver: ignore last empty line of mbox entries
https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml
> Each message is immediately prefaced by a separation line and
> terminated by an empty line.

Bug discovered by skarnet.

Fixes #207.
3 years ago
Leah Neukirchen 7d04932813 mexport: ensure mbox entries are separated by an empty line
https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml
> Each message is immediately prefaced by a separation line and
> terminated by an empty line.

Bug discovered by skarnet.
3 years ago
Leah Neukirchen 5b52110399 mmime: do not duplicate Content* headers
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.
3 years ago
Leah Neukirchen 93e8a4a892 mcom: also read $VISUAL to find the editor
Closes #206.
3 years ago
Leah Neukirchen e8981b723d safe_u8putstr: add oneline mode that prints CR/LF as C0 sequences 3 years ago
Leah Neukirchen 709f8f1121 mdeliver.1: spelling 3 years ago
Leah Neukirchen 41cf6272a5 mdeliver.1: small tweaks 3 years ago
Leah Neukirchen ff7537f6a7 GNUmakefile: run tests without stdin connected to a terminal 3 years ago
Leah Neukirchen 741972a416 t/8000-mflag.t: fix when stdin is not a tty 3 years ago
Leah Neukirchen c2d497b139 t/6000-msort.t: fix when stdin is not a tty 3 years ago
Leah Neukirchen 2d6de31cd7 t/3000-magrep.t: fix when stdin is not a tty 3 years ago
Leah Neukirchen e96f0707de mshow: show last part of multipart/mixed when none matched
This is in conformance with RFC 1341.
3 years ago
Leah Neukirchen 318ac214f1 mshow: add "-A all" to render all attachments
Closes #198.
3 years ago
nicoo 8e0d57425f Fix typo in NEWS
Closes: #199 [via git-merge-pr]
3 years ago
Leah Neukirchen 4fcb4ae0a4 NEWS.md: update for 1.1 3 years ago
codesoap 8ad63494bf mcom: do not match shebang in needs_multipart()
Avoids matching lines like '#!/usr/bin/env sh'.

Closes: #196 [via git-merge-pr]
3 years ago
Leah Neukirchen c525c0097e mmime: allow # in include lines, used to override the content-disposition 3 years ago
Leah Neukirchen f95439a988 rfc2045: blaze822_multipart: parse rest when boundary is missing
Either the mail got truncated or was wrongly generated, try to go on
by taking the remains of the buffer as part.
3 years ago
James Rowe bc021c53b6 Allow gpg and gpg2 executables for gnupg interaction
Closes: #193 [via git-merge-pr]
4 years ago