Commit Graph

1145 Commits

Author SHA1 Message Date
Mark Hills
0030a3518e Document a reasonable practice for deleting mails
Discussed in #236.
2023-03-30 15:23:38 +01:00
Leah Neukirchen
1838158ef1 blaze822_priv.h: use proper lc/uc
Mail headers may contain characters where the simple definition breaks,
which results in wrong formatting on output.

Fixes #235.
2023-03-16 19:54:46 +01:00
Leah Neukirchen
cccf01cb9a mrep/mbnc: use mseq -r as leading whitespace is now significant.
Reported by lhynes.
2022-12-18 21:08:28 +01:00
Leah Neukirchen
2365f48f06 mcolor: print out form-feed 2022-12-09 19:53:53 +01:00
Michael Forney
74e77845c3 mmime: include strings.h for strncasecmp 2022-12-09 19:49:44 +01:00
Michael Forney
1babebc12c mlist: use fixed-width integer types for struct linux_dirent64 d_ino and d_off 2022-12-09 19:49:41 +01:00
codesoap
8d543fdb21 mcom: allow spaces in sequence for mbnc and mrep
Closes: #231 [via git-merge-pr]
2022-11-11 22:26:48 +01:00
Omar Polo
9d66764434 mrefile/mdeliver: -M needs the `fattr' pledge promise for utimes(2)
Message-Id: <2Z5ISO2SNIGZU.2E8B1F41F84RV@venera>
2022-08-26 12:36:10 +02:00
gco
e6813fd07c solaris needs termios.h and __EXTENSIONS__ for TIOCGWINSZ and winsize 2022-06-20 16:08:12 +02:00
gco
877569a6f3 if -fstack-protector-strong is used, it needs to be specified for both compiling and linking
Closes: #229 [via git-merge-pr]
2022-06-18 23:05:26 +02:00
jgart
bbc754e2a1 List commands ~respectively
Closes: #228 [via git-merge-pr]
2022-06-18 23:05:12 +02:00
Alyssa Ross
bb3dacc604 blaze822: don't try to open /dev/stdin
Use the same check is blaze822() as in blaze822_file() to ensure that
we don't try to open /dev/stdin, which is non-POSIX.
Message-Id: <20220523170921.2623516-1-hi@alyssa.is>
2022-05-23 22:56:11 +02:00
Julian Rother
793e22ecb7 mthread: reduce memory usage
mthread keeps header data of all messages in memory until it exits without
ever using it. With this change it frees the header data of each message
right after processing it.

Closes: #222 [via git-merge-pr]
2022-03-13 20:40:48 +01:00
Leah Neukirchen
47c5707d50 add contrib/mopenall 2022-03-10 22:11:13 +01:00
Leah Neukirchen
cd5bc471f3 man: misc manpages nits
Found by Omar Polo.
2022-02-27 16:21:39 +01:00
Lucas
e951b0ba27 mmime: allow to relax body line length limit
Message-Id: <10e22a318b5c70d89432d85ecd8cb8ce1796a51d.1643116719.git.lucas@sexy.is>
2022-01-25 14:22:06 +01:00
Leah Neukirchen
fa27d73ddd mshow: don't spawn pager with -t 2022-01-01 18:04:47 +01:00
Leah Neukirchen
3496545358 mflow: fixed lines were not wrapped, add test suite
Reported by ninewise.
2022-01-01 17:58:21 +01:00
Leah Neukirchen
a60147f633 NEWS.md: update for 1.2 2021-12-12 17:39:30 +01:00
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]
2021-11-08 17:11:25 +01:00
Leah Neukirchen
e44aaad66e mlesskey.example: clarify installation 2021-10-07 13:12:44 +02:00
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.
2021-10-04 13:47:51 +02:00
Leah Neukirchen
958e3e08bd mless: prefer setting LESSKEYIN and .mlesskey
Fixes #215.
2021-09-28 16:18:35 +02:00
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.
2021-09-24 17:43:53 +02:00
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.
2021-08-30 18:12:30 +02:00
Leah Neukirchen
4be6e0ce91 blaze822: remove blaze822_mmap, never used. 2021-08-30 18:12:09 +02:00
Leah Neukirchen
4ccf2f08c1 mmime: ensure no empty parts are generated after an include.
Reported by lhynes.
2021-08-07 19:33:08 +02:00
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>
2021-07-06 19:53:26 +02:00
Leah Neukirchen
386b65fcb4 mblaze-profile.5: clarify Reply-From 2021-06-18 11:39:00 +02:00
Leah Neukirchen
014f82ef0c t/1000-mmime.t: add tests for recent changes 2021-06-18 11:32:18 +02:00
Leah Neukirchen
d324b92dd4 mmime: keep (none) whitespace after quoted strings 2021-06-18 01:57:49 +02:00
Leah Neukirchen
0370916357 mmime: generate valid empty mime multipart/mixed when no body is given 2021-06-18 01:42:34 +02:00
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.
2021-06-18 01:13:03 +02:00
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.
2021-06-18 01:13:03 +02:00
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.
2021-06-18 01:13:03 +02:00
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 ;.
2021-06-18 01:13:03 +02:00
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.
2021-06-18 01:13:03 +02:00
Leah Neukirchen
23941c6c19 t/1500-maddr.t: deactivate invalid test case
An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'.
2021-06-18 01:13:03 +02:00
Dominik Honnef
6e8e4e01ed mless: list same number of mails whether we're at the beginning or end 2021-06-07 22:10:29 +02:00
Leah Neukirchen
6684f74f07 mblaze.7: IRC moved to libera.chat. 2021-05-20 12:39:06 +02:00
Leah Neukirchen
605509cc06 t/1900-mdeliver.t: fix plan 2021-05-10 10:53:17 +02:00
Leah Neukirchen
2b517f97c0 msed: match header names case insensitively
Found by skarnet.
2021-05-10 10:52:39 +02:00
Leah Neukirchen
c4008e43d9 mexport: use UTC timestamp in the postmark line 2021-05-09 22:00:32 +02:00
Leah Neukirchen
ce900601cb mexport: default timestamp to unix second 0, not -1
This is better recognizable as "no data".
2021-05-09 22:00:32 +02:00
Leah Neukirchen
41c681362d NEWS.md: update 2021-05-09 22:00:32 +02:00
Leah Neukirchen
8ba44643e4 t/1900-mdeliver.t: add test for malformed mboxes 2021-05-09 22:00:32 +02:00
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.
2021-05-09 22:00:32 +02:00
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.
2021-05-09 22:00:32 +02:00
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.
2021-05-09 16:23:18 +02:00
Leah Neukirchen
93e8a4a892 mcom: also read $VISUAL to find the editor
Closes #206.
2021-04-21 15:10:28 +02:00