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.
David Levine [Sat, 15 Nov 2014 14:40:36 +0000 (08:40 -0600)]
Removed "If this draft originated on the local host, then" phrase
from mh-alias man page. Alias resolution applies no matter where
the draft originated.
David Levine [Thu, 30 Oct 2014 00:37:18 +0000 (19:37 -0500)]
Added initial "MH-Profile-Version: 1.0\n" line to newly created
profiles. The main purpose of this first line is to fool file(1).
Without it, if the first line of the profile is Path:, file 5.19
reports its type as message/news. With it, it reports the type as
text/plain.
mhn.defaults: make fetch less agressive on FreeBSD.
Drop the -a flag to fetch. Its retry logic has a bug where it will
go into an endless loop when trying to re-fetch an object behind
an https:// link when it is unable to validate the X.509 certificate
chain.