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>
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]
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]
> 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.
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.
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.
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 ;.
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.
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.