David Levine [Fri, 13 Feb 2015 02:22:32 +0000 (20:22 -0600)]
Added showmimeproc to test/common.sh.in so that test-show will test
it in the workspace, not the user's installation. Also added all of
the other procs defined in config/config.c that are currently unused,
just in case they some day are.
Marcin Cieslak [Tue, 10 Feb 2015 14:18:05 +0000 (14:18 +0000)]
Fixed "inc" to be installed setgid mail with dot locking. MAILGROUP=1
was not set in the config.h because we no longer use "LOCKTYPE"
configure variable.
Paul Fox [Sun, 8 Feb 2015 20:22:07 +0000 (15:22 -0500)]
add new message separator header to mhshow
new switches to mhshow (-headerform and -[no]header) control whether
and what is displayed before the display of every message's content.
the default separator looks like "[ Message folder:msg ]". the
implementation parallels the -markform feature.
since mhshow is often started by show, show now passes the -[no]header
options through to mhshow. (also, show no longer attempts to pass
such options through to cat (in the case of -noshowproc)).
David Levine [Sun, 8 Feb 2015 15:21:13 +0000 (09:21 -0600)]
Added support to mhfixmsg -reformat for multipart/related. If it has
only a single part that is not text/plain and can be converted to
text/plain, a text/plain part is added and the type of the part is
changed to multipart/alternative. If the multipart/related has more
than one part but does not have a text/plain part, try to add one.
Paul Fox [Sat, 31 Jan 2015 00:52:24 +0000 (19:52 -0500)]
mhshow: fix display of alternatives after certain nested multiparts
adjust return codes so that we now have a clear indication of whether
there was a hard error (NOTOK), a failure to display due to type
mismatch (DONE), or complete success (OK). use those codes in
show_multi_internal() to decide whether we're finished with this
multipart or not.
prior to this change, it was impossible to show part 1.2 of a
message constructed like the following, because the disinction
between (the new, as described above) DONE and OK states was
lost while processing multipart/related part 1.1.
msg part type/subtype size description
28 multipart/mixed 1040
1 multipart/alternative 623
1.1 multipart/related 275
1.1.1 text/html 105
1.2 text/plain 33
2 text/plain 83
this fix is related to 9cc2510 and c9794733. hopefully it's right
this time.
David Levine [Wed, 7 Jan 2015 03:39:42 +0000 (21:39 -0600)]
Another fix to convertarg handling of multipart/related. Two,
actually. One is a simple bug fix, the other restricts concatenation
to text/plain, not just text, parts.
David Levine [Mon, 29 Dec 2014 04:15:04 +0000 (22:15 -0600)]
Added -h and -p options to replaliases. The -p argument can be useful
with improperly structured messages, such as those that use
multipart/related when they should have used multipart/alternative.
Alos, removed -editor mhbuild because it precludes use of WhatNow
attach.
David Levine [Mon, 29 Dec 2014 03:12:06 +0000 (21:12 -0600)]
Replaced explicit list of files to be copied in test/common.sh.in
with *. It wasn't trivial, per the comments in the file about
portability to posh, but close.
David Levine [Sun, 28 Dec 2014 19:42:35 +0000 (13:42 -0600)]
Reverted commit a2b00e7053ca3be3d1389588580c71498222a267. It caused
make check to pull etc files from where they were already installed,
not from the test directory.
David Levine [Sun, 28 Dec 2014 18:32:14 +0000 (12:32 -0600)]
Removed copy of all of the etc files from test/common.sh.in.
Instead, for make distcheck, pass the location of the installed etc
directory via DISTCHECK_CONFIGURE_FLAGS, configure, and
TESTS_ENVIRONMENT to a new nmhetcdirinst variable. Outside of make
distcheck, nmhetcdir is valid by itself.
Eric Gillespie [Tue, 9 Dec 2014 07:20:01 +0000 (23:20 -0800)]
Implement OAuth 2.0 [1] for XOAUTH2 in SMTP [2] and POP3 [3].
Google defined XOAUTH2 for SMTP, and that's what we use here. If other
providers implement XOAUTH2 or some similar OAuth-based SMTP authentication
protocol, it should be simple to extend this.
Technically, XOAUTH2 is a SASL auth mechanism, but the implementation is so
trivial, I can't justify the code complexity or additional dependency
requirement of using Cyrus SASL for this. So it's completely separate.
Changes:
- New dependencies:
- jsmn (JSON processing library) bundled directly rather than linked to as
an external library because there is no clear winner among JSON
libraries for C and this one is tiny
- libcurl is nearly ubiquitous and too heavy-weight to bundle, so link to
the library the user must install separately
- Add oauth.h / oauth.c which do almost all the work, with quite a bit of
help from curl and jsmn.
- Add new mhlogin program to authorize nmh to use the Gmail account and
store the access and refresh tokens.
- Add new user_agent global to version.c (version.sh); not too happy with
such a generic name, but the others had no mh_ prefix or anything...
- Add XOAUTH2 support to:
mts/smtp/smtp.c uip/post.c uip/send.c uip/popsbr.c uip/inc.c uip/msgchk.c
- Split duplicated serving code out of fakepop.c and fakesmtp.c to new
server.c and also use that for new fakehttp.c.
- Add XOAUTH2 support to fakepop.c and fakesmtp.c.
David Levine [Sat, 6 Dec 2014 15:30:52 +0000 (09:30 -0600)]
Only remove extraneous trailing semicolon from Content-Type and
Content-Disposition headers because those are the only ones that
parse_mime() warns about, but it does appear on others.
Ken Hornstein [Tue, 2 Dec 2014 18:41:55 +0000 (13:41 -0500)]
Set all Content structure elements to NULL as they are free()'d; in a few
cases a content structure is reused and you can get into problems with
double-free()ing elements depending on your MIME composition content syntax.
Paul Fox [Thu, 20 Nov 2014 20:41:34 +0000 (15:41 -0500)]
prevent spurious errors when requesting specific message parts
no one should be reporting NOTOK for failure to display parts that
weren't actually requested. failure should be reserved for parts that
we really attempted to display.