Stephen Gildea [Mon, 17 Feb 2020 19:02:49 +0000 (11:02 -0800)]
patch: Maildir support for "scan -file"
I have extended the "scan -file" command line so that the "file" can
also be a Maildir directory.
This feature complements the Maildir support added to the inc command
in 1.4. Just as you may want to inc your mail from Maildir, you might
want to see what awaits you with a scan first.
Conrad Hughes [Tue, 14 Jan 2020 10:01:46 +0000 (10:01 +0000)]
Patch for mhical to support "BYDAY=-1SU"-type RRULEs.
Notes:
- Added dmlastday() function to dtime.c, to obtain last day of month.
Minor modifications to other parts here to reuse code.
- Modified rrule_clock() in datetime.c to handle negative BYDAY
correctly.
- Added a couple of tests.
- Mainly this is to scratch an itch since UK timezone history makes
heavy use of BYDAY=-1SU-type RRULEs, and the resultant complaints
are annoying. I had a brief look at "properly" extending
icalparse.y, but I kindof think any serious extension of mhical
should really instead adopt libical?
David Levine [Sun, 25 Aug 2019 13:08:25 +0000 (09:08 -0400)]
Added warning if the profile contains a post entry.
Added warning from all programs that read the profile if the profile
contains a post entry, which is ignored, but does not contain a
postproc entry. In other words, if you get this warning and want
to suppress it, your options include:
1) Remove your post profile entry.
2) Make your post profile entry a comment by prepending it with the #:
comment indicator.
3) Add a postproc entry that points to the post that you use. That can
be viewed with "mhparam postproc".
David Levine [Sun, 25 Aug 2019 12:49:53 +0000 (08:49 -0400)]
Removed unnecessary warning about missing semicolon.
The warning was for Content-Type and Content-Disposition, and was
incorrect. Thanks to Tom for providing output with it. Also
removed multiple trailing newlines from warning output, thanks to
Ralph for tracking those down.
Ken Hornstein [Sun, 28 Jul 2019 01:22:12 +0000 (21:22 -0400)]
Reorder configure options to be before variables
Reorder the configure options generated by build_nmh so they
will be before the variables, otherwise they end up IN things like
CFLAGS. Fixes bug #56680.
Ken Hornstein [Mon, 15 Jul 2019 18:25:53 +0000 (14:25 -0400)]
Fix handling of fullname
Make it that if a Local-Mailbox profile entry was NOT specified
that the fullname would be generated BEFORE the local mailbox was
generated, so the user's name ended up in the email address properly.
David Levine [Sun, 14 Jul 2019 13:29:21 +0000 (09:29 -0400)]
show and mhl now decode more addresses in header fields.
Added decoding of To:, Cc:, Resent-To:, Resent-Cc:, and
Resent-From: addresses to mhl.format and mhl.headers. Thanks to
Conrad Hughes for suggesting it for the first two components and
to Ralph for suggesting it for the Resent- components.
Ken Hornstein [Mon, 8 Jul 2019 13:59:15 +0000 (09:59 -0400)]
Create new mh-format function %(ordinal)
Implement a new mh-format function %(ordinal). This will output
the appropriate ordinal prefix (st, nd, rd, st) based on the value
of the "num" register.
Ken Hornstein [Mon, 24 Jun 2019 16:42:05 +0000 (12:42 -0400)]
Print port number in the connection error message
If a connection to a host fails, print the port number in the brief error
message. This will hopefully eliminate problems when nmh is using a default
port number that users are not expecting.
Ken Hornstein [Fri, 17 May 2019 18:27:28 +0000 (14:27 -0400)]
Remove final traces of TMA support
TMA (the TTI Trusted Mail Agent) was an early implementation of
encrypted mail and is long gone. There were a few vestigial bits
of this support left in nmh, and this is finally removing them.
This includes the check for the "Encrypted" header field in various
scan formats and some code to return the code SCNENC from scan()
function where it would have special handling by programs like inc(1).
Ken Hornstein [Mon, 13 May 2019 00:07:56 +0000 (20:07 -0400)]
Cleanup MIME header handling in mhbuild
Per discussion on nmh-workers, cleanup the handling of MIME headers
in mhbuild. The following logic should now apply.
If mhbuild is run with -auto AND a MIME-Version header is detected, then
exit silently with no error (and leave the draft untouched). Otherwise,
if a MIME-Version header or ANY Content-* header is found, exit with an
error. Note that this means if mhbuild is run with -auto then an error
will be returned if any Content-* headers are seen.
Previously, mhbuild would silently eat any Content-Type headers seen
in an existing draft; this behavior was brought forward from MH 6 and
no one could explain the reason for this behavior. This behavior has
been removed.
Ken Hornstein [Thu, 2 May 2019 17:26:56 +0000 (13:26 -0400)]
Improve SASL snoop output
Generate more information in the netsec layer when -snoop is enabled.
Specifically, enumerate the supported SASL mechanisms by the client and
server and explain which layer is using encryption.
Ken Hornstein [Wed, 24 Apr 2019 17:05:30 +0000 (13:05 -0400)]
Remove MIME content caching code
Remove all of the MIME content caching code. Besides being of dubious
value and having a number of 'interesting' security implications,
it apparently only would cache content if you ran it using mhn
(the necessary entry point was not copied over when mhn was split
apart) and it would only work on the top-level MIME content of a
message.
Ken Hornstein [Tue, 23 Apr 2019 01:42:14 +0000 (21:42 -0400)]
Set the close-on-exec flag for sockets
Since we no longer use closefds(), start cleaning up stray descriptors.
Start by making sure that any network sockets we create have the
close-on-exec flag set on them.
Ken Hornstein [Tue, 23 Apr 2019 00:36:14 +0000 (20:36 -0400)]
Garbage collect closefds()
Remove the closefds() function; it was used sporadically and was
causing problems on High Sierra. In the future look at opening
more descriptors with FD_CLOEXEC.
Ken Hornstein [Fri, 22 Mar 2019 15:59:04 +0000 (11:59 -0400)]
Add support for %(trimr) format function
Add support for a %(trimr) format function, which behaves exactly
like %(trim) but also returns a string. Turns out this is literally
a one-line change that does not require a new format instruction.
David Levine [Sat, 10 Nov 2018 17:35:31 +0000 (12:35 -0500)]
Added -attendee switch to mhical(1).
This allows the user to select which of their attendee addresses they are
responding about, when they have more than one in the invitation.
Added corresponding -a switch to calaccept, etc., functions in replaliases.
Updated mhical to retain DESCRIPTION lines. Gmail puts a link to the event
DESCRIPTION line along with a message to no edit that section, though it
seems to accept responses if the DESCRIPTION line was removed.
Incremented mhical version number to 0.5.
David Levine [Thu, 1 Nov 2018 23:44:32 +0000 (19:44 -0400)]
Increased sizes of a couple of buffers.
gcc 8 noticed that snprintf could have overrun them. It might be
better to reduce the sizes of buffers used for display names, etc.
Or ever better, use dynamically sized buffers.
Ralph Corderoy [Sun, 1 Jul 2018 08:43:05 +0000 (09:43 +0100)]
mhlsbr.c: Use variable for strncpy(3)'s size, not sizeof.
Silences gcc 8.1.1's warning that the size of the source was being used,
not the destination. The destination has just been allocated to be the
size of the source so no overflow can occur. Move existing variable
that later holds the buffer size to before the allocation and strncpy so
it can be used for those too.
Ralph Corderoy [Sun, 1 Jul 2018 08:32:28 +0000 (09:32 +0100)]
rcvtty.c: Use struct utmpx's ut_line[], not a copy.
Silences gcc 8.1.1's warning that strncpy(3)'s length is the sizeof of
the source, not the destination, by removing the strncpy and passing the
source to alert() where it's only read, not written.
David Levine [Tue, 20 Feb 2018 02:30:17 +0000 (21:30 -0500)]
Fixed mhshow/test-charset to work on all tested platforms.
Restores the functionality of commit f81046da6. Also, skips the
last two tests if iconv isn't enabled. And removes the test
files if the last test, without iconv_elides_question_marks, behaves
as expected. Finally, some comments have been updated.
Ken Hornstein [Mon, 12 Feb 2018 21:01:08 +0000 (16:01 -0500)]
Avoid free() in format engine for now.
This free() call messes up the buffer handling in scansbr.c:scan();
for now we're going to live with the leak and fix this properly when
we normalize the format engine's memory handling.
Ralph Corderoy [Sun, 11 Feb 2018 13:02:24 +0000 (13:02 +0000)]
cpstripped(): Replace malloc()s with statics based on MB_LEN_MAX.
MB_CUR_MAX from stdlib.h isn't a compile-time constant so can't be used
for the size of a couple of static char arrays so malloc() was used at
run time, with the tiny claims never being freed. valgrind(1) noticed
and David suggested MB_LEN_MAX from limits.h instead; that header's
contents are suitable for #if expressions and thus compile-time
constants.
Ken Hornstein [Sat, 10 Feb 2018 04:15:32 +0000 (23:15 -0500)]
Clean up memory leaks by callers of scan().
Make sure we reuse the "scanl" argument to the scan() function, as that's
the signal to have scan() reuse it's buffers. Otherwise repeated calls
to scan will leak a TON of memory. Reported by Ralph Corderoy.
David Levine [Fri, 9 Feb 2018 00:43:56 +0000 (19:43 -0500)]
Compile the header format for each message.
Per Ken's suggestion, compile_header() and compile_marker() are now
called for each message. That's done with reset_comptable disabled.
So, per Ralph's suggestion, fmt_free(NULL, 1) is called after all
messages are shown to free up memory held by the component table.
Ralph Corderoy [Sat, 3 Feb 2018 10:49:40 +0000 (10:49 +0000)]
test-charset: Fix test when HAVE_ICONV is false.
When the Content-Type's charset parameter's encoding is `invalid', it
makes no difference whether HAVE_ICONV is defined or not as the
parameter's value can't be decoded.