[Nmh-commits] nmh/sbr client.c
CVSROOT:/sources/nmh Module name:nmh Changes by: Ken Hornstein 09/01/16 15:48:10 Modified files: sbr: client.c Log message: Move freeaddrinfo() to inside of our loop; this prevents a memory leak and also prevents it from being called with a NULL pointer. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/client.c?cvsroot=nmh&r1=1.4&r2=1.5 Patches: Index: client.c === RCS file: /sources/nmh/nmh/sbr/client.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- client.c16 Jan 2009 02:28:55 - 1.4 +++ client.c16 Jan 2009 15:48:09 - 1.5 @@ -2,7 +2,7 @@ /* * client.c -- connect to a server * - * $Id: client.c,v 1.4 2009/01/16 02:28:55 kenh Exp $ + * $Id: client.c,v 1.5 2009/01/16 15:48:09 kenh Exp $ * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -111,9 +111,10 @@ close(sd); } -} freeaddrinfo(res); +} + client_freelist(ap); strncpy (response, "no servers available", len_response); return NOTOK; ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] nmh mts/smtp/smtp.c sbr/client.c uip/whatnowsbr.c
CVSROOT:/sources/nmh Module name:nmh Changes by: Ken Hornstein 09/01/21 19:38:36 Modified files: mts/smtp : smtp.c sbr: client.c uip: whatnowsbr.c Log message: Fix warning in getaddrinfo() call. Add missing support for -port in whatnow. Make sure the SASL input buffer is allocated when using the sendmail mts. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/nmh/mts/smtp/smtp.c?cvsroot=nmh&r1=1.25&r2=1.26 http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/client.c?cvsroot=nmh&r1=1.5&r2=1.6 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/whatnowsbr.c?cvsroot=nmh&r1=1.12&r2=1.13 Patches: Index: mts/smtp/smtp.c === RCS file: /sources/nmh/nmh/mts/smtp/smtp.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- mts/smtp/smtp.c 16 Jan 2009 02:28:55 - 1.25 +++ mts/smtp/smtp.c 21 Jan 2009 19:38:36 - 1.26 @@ -1,7 +1,7 @@ /* * smtp.c -- nmh SMTP interface * - * $Id: smtp.c,v 1.25 2009/01/16 02:28:55 kenh Exp $ + * $Id: smtp.c,v 1.26 2009/01/21 19:38:36 kenh Exp $ * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -144,7 +144,7 @@ static int sm_fwrite(char *, int); static int sm_fputs(char *); static int sm_fputc(int); -static int sm_getc(void); +static int sm_fgetc(FILE *); static void sm_fflush(void); static int sm_fgets(char *, int, FILE *); @@ -326,6 +326,13 @@ client = "localhost"; #endif +#ifdef CYRUS_SASL +sasl_inbuffer = malloc(SASL_MAXRECVBUF); +if (!sasl_inbuffer) + return sm_ierror("Unable to allocate %d bytes for read buffer", +SASL_MAXRECVBUF); +#endif /* CYRUS_SASL */ + if (pipe (pdi) == NOTOK) return sm_ierror ("no pipes"); if (pipe (pdo) == NOTOK) { Index: sbr/client.c === RCS file: /sources/nmh/nmh/sbr/client.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- sbr/client.c16 Jan 2009 15:48:09 - 1.5 +++ sbr/client.c21 Jan 2009 19:38:36 - 1.6 @@ -2,7 +2,7 @@ /* * client.c -- connect to a server * - * $Id: client.c,v 1.5 2009/01/16 15:48:09 kenh Exp $ + * $Id: client.c,v 1.6 2009/01/21 19:38:36 kenh Exp $ * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -85,7 +85,7 @@ char address[NI_MAXHOST]; rc = getnameinfo(ai->ai_addr, ai->ai_addrlen, address, -sizeof(address), NULL, NULL, NI_NUMERICHOST); +sizeof(address), NULL, 0, NI_NUMERICHOST); fprintf(stderr, "Connecting to %s...\n", rc ? "unknown" : address); Index: uip/whatnowsbr.c === RCS file: /sources/nmh/nmh/uip/whatnowsbr.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- uip/whatnowsbr.c16 Jan 2009 02:28:55 - 1.12 +++ uip/whatnowsbr.c21 Jan 2009 19:38:36 - 1.13 @@ -2,7 +2,7 @@ /* * whatnowsbr.c -- the WhatNow shell * - * $Id: whatnowsbr.c,v 1.12 2009/01/16 02:28:55 kenh Exp $ + * $Id: whatnowsbr.c,v 1.13 2009/01/21 19:38:36 kenh Exp $ * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -1229,6 +1229,7 @@ case SERVSW: case SASLMECHSW: case USERSW: + case PORTSW: vec[vecp++] = --cp; if (!(cp = *argp++) || *cp == '-') { advise (NULL, "missing argument to %s", argp[-2]); ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] nmh aclocal.m4 configure.in config/Makefile.in ...
CVSROOT:/sources/nmh Module name:nmh Changes by: Ken Hornstein 10/11/19 20:13:40 Modified files: . : aclocal.m4 configure.in config : Makefile.in man: mh-chart.man post.man send.man mts/smtp : Makefile.in smtp.c smtp.h sbr: Makefile.in uip: Makefile.in post.c send.c whatnowsbr.c whom.c Log message: (Minor) cleanup of some of the autoconf code with respect to the handling of compiler flags for SASL, and also rototill (and simplify) the autoconf handling for the same. Add TLS support for the SMTP MTA. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/nmh/aclocal.m4?cvsroot=nmh&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/nmh/configure.in?cvsroot=nmh&r1=1.87&r2=1.88 http://cvs.savannah.gnu.org/viewcvs/nmh/config/Makefile.in?cvsroot=nmh&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/nmh/man/mh-chart.man?cvsroot=nmh&r1=1.6&r2=1.7 http://cvs.savannah.gnu.org/viewcvs/nmh/man/post.man?cvsroot=nmh&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/nmh/man/send.man?cvsroot=nmh&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/nmh/mts/smtp/Makefile.in?cvsroot=nmh&r1=1.8&r2=1.9 http://cvs.savannah.gnu.org/viewcvs/nmh/mts/smtp/smtp.c?cvsroot=nmh&r1=1.30&r2=1.31 http://cvs.savannah.gnu.org/viewcvs/nmh/mts/smtp/smtp.h?cvsroot=nmh&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/nmh/sbr/Makefile.in?cvsroot=nmh&r1=1.29&r2=1.30 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/Makefile.in?cvsroot=nmh&r1=1.25&r2=1.26 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/post.c?cvsroot=nmh&r1=1.24&r2=1.25 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/send.c?cvsroot=nmh&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/whatnowsbr.c?cvsroot=nmh&r1=1.14&r2=1.15 http://cvs.savannah.gnu.org/viewcvs/nmh/uip/whom.c?cvsroot=nmh&r1=1.5&r2=1.6 Patches: Index: aclocal.m4 === RCS file: /sources/nmh/nmh/aclocal.m4,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- aclocal.m4 16 Jan 2009 02:28:54 - 1.7 +++ aclocal.m4 19 Nov 2010 20:13:39 - 1.8 @@ -1,24 +1,14 @@ -# Originally by John Hawkinson -# Under Solaris, those -# applications need to link with "-lsocket -lnsl". Under IRIX, they -# need to link with "-lnsl" but should *not* link with "-lsocket" -# because libsocket.a breaks a number of things (for instance, -# gethostbyname() under IRIX 5.2, and snoop sockets under most versions -# of IRIX). # -# The check for libresolv is in case you are attempting to link -# statically and happen to have a libresolv.a lying around (and no -# libnsl.a). An example of such a case would be Solaris with -# BIND 4.9.5 installed. - -AC_DEFUN(AC_CHECK_NETLIBS, -[AC_CHECK_FUNC(getaddrinfo, , - AC_CHECK_LIB(nsl, getaddrinfo, , -AC_CHECK_LIB(resolv, getaddrinfo))) -AC_CHECK_FUNC(socket, , - AC_CHECK_LIB(socket, socket)) -]) +# Updated for more modern systems. Check to see if we need to link against +# optional libraries for networking functions. +# + +AC_DEFUN([AC_CHECK_NETLIBS], +[AC_SEARCH_LIBS([gethostbyname], [nsl], , + [AC_MSG_ERROR([gethostbyname not found])]) + AC_SEARCH_LIBS([connect], [socket], , [AC_MSG_ERROR([connect not found])]) +])dnl dnl -- dnl CHECK FOR NDBM Index: configure.in === RCS file: /sources/nmh/nmh/configure.in,v retrieving revision 1.87 retrieving revision 1.88 diff -u -b -r1.87 -r1.88 --- configure.in10 Nov 2010 22:26:07 - 1.87 +++ configure.in19 Nov 2010 20:13:39 - 1.88 @@ -1,15 +1,11 @@ dnl dnl configure.in -- autoconf template for nmh dnl -dnl $Id: configure.in,v 1.87 2010/11/10 22:26:07 pm215 Exp $ +dnl $Id: configure.in,v 1.88 2010/11/19 20:13:39 kenh Exp $ dnl -dnl 2.13 definitely chokes; 2.53 is the earliest version I've tested. -dnl 2.58 needed for help string macro but that only affects help output -dnl 2.50 is the major breakpoint between the old autoconf and the new, -dnl so require that. If there are bug reports about 2.50-2.52 not working -dnl we can always move this up a little. -AC_PREREQ(2.50) +dnl Move this up a bit +AC_PREREQ(2.61) AC_INIT(nmh, m4_normalize(m4_include([VERSION]))) AC_CONFIG_SRCDIR(h/nmh.h) @@ -106,8 +102,8 @@ dnl Do you want client-side support for using SASL for authentication? dnl Note that this code will be enabled for both POP and SMTP -AC_ARG_WITH(cyrus-sasl, AS_HELP_STRING([--with-cyrus-sasl=DIR], - [specify location of Cyrus SASL library])) +AC_ARG_WITH(cyrus-sasl, AS_HELP_STRING([--with-cyrus-sasl], + [Enable SASL support via the Cyrus SASL library])) if test x"$with_cyrus_sasl"
[Nmh-commits] nmh configure.in
CVSROOT:/sources/nmh Module name:nmh Changes by: Ken Hornstein 10/11/21 22:19:51 Modified files: . : configure.in Log message: Fix the test for sasl.h to look in the correct place. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/nmh/configure.in?cvsroot=nmh&r1=1.88&r2=1.89 Patches: Index: configure.in === RCS file: /sources/nmh/nmh/configure.in,v retrieving revision 1.88 retrieving revision 1.89 diff -u -b -r1.88 -r1.89 --- configure.in19 Nov 2010 20:13:39 - 1.88 +++ configure.in21 Nov 2010 22:19:51 - 1.89 @@ -1,7 +1,7 @@ dnl dnl configure.in -- autoconf template for nmh dnl -dnl $Id: configure.in,v 1.88 2010/11/19 20:13:39 kenh Exp $ +dnl $Id: configure.in,v 1.89 2010/11/21 22:19:51 kenh Exp $ dnl dnl Move this up a bit @@ -704,7 +704,7 @@ dnl AS_IF([test x"$sasl_support" = x"yes"],[ - AC_CHECK_HEADER([sasl.h], , [AC_MSG_ERROR([sasl.h not found])]) + AC_CHECK_HEADER([sasl/sasl.h], , [AC_MSG_ERROR([sasl.h not found])]) AC_CHECK_LIB([sasl2], [sasl_client_new], , [AC_MSG_ERROR([Cyrus SASL library not found])])]) ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] Test
This is a test; please ignore. --Ken ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. d9bed5c7b73965ffdc48176825690b94f096ec3b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via d9bed5c7b73965ffdc48176825690b94f096ec3b (commit) from c6abf17d7aceffcce6ff2a871cc4d95bc31fc5bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d9bed5c7b73965ffdc48176825690b94f096ec3b commit d9bed5c7b73965ffdc48176825690b94f096ec3b Author: Ken Hornstein Date: Mon Feb 21 20:44:30 2011 -0500 Updated the developer README with a few notes about the git conversion. Signed-off-by: Ken Hornstein diff --git a/docs/README.developers b/docs/README.developers index abfb3e5..f026c74 100644 --- a/docs/README.developers +++ b/docs/README.developers @@ -25,8 +25,8 @@ of the users (and the configure script) it is an output file from the point of view of the developers (and the autoconf script). Note that the automatically generated autoconf files (such as config.h.in, -stamp-h.in, and configure), are NOT kept in CVS. Thus, when you check out -a CVS tree, you need to run the autogen.sh script before you can build +stamp-h.in, and configure), are NOT kept in git. Thus, when you check out +a git tree, you need to run the autogen.sh script before you can build anything: % ./autogen.sh @@ -119,6 +119,18 @@ zotnet/tws/ (deprecated, now in sbr/) away completely. +--- +git +--- + +As of December 2010, nmh has switched to using git for revision control +instead of CVS. While the topic of git is beyond the scope of this FAQ, +to get started with git & nmh, you can run the following command to checkout +the nmh repository: + +% git clone git://git.savannah.nongnu.org/nmh.git + + --- nmh-local functions to use in preference to OS versions --- --- Summary of changes: docs/README.developers | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. a01a41d031c796b526329a4170eb23f0ac93b949
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via a01a41d031c796b526329a4170eb23f0ac93b949 (commit) from d9bed5c7b73965ffdc48176825690b94f096ec3b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a01a41d031c796b526329a4170eb23f0ac93b949 commit a01a41d031c796b526329a4170eb23f0ac93b949 Author: Ken Hornstein Date: Wed Apr 13 10:50:49 2011 -0400 Whoops, user & port were in the wrong order so msgchk didn't work for POP connections. diff --git a/uip/msgchk.c b/uip/msgchk.c index 03525c8..9b56649 100644 --- a/uip/msgchk.c +++ b/uip/msgchk.c @@ -369,7 +369,7 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw, ruserpass (host, &user, &pass); /* open the POP connection */ -if (pop_init (host, user, port, pass, proxy, snoop, sasl, saslmech) == NOTOK +if (pop_init (host, port, user, pass, proxy, snoop, sasl, saslmech) == NOTOK || pop_stat (&nmsgs, &nbytes) == NOTOK /* check for messages */ || pop_quit () == NOTOK) { /* quit POP connection */ advise (NULL, "%s", response); --- Summary of changes: uip/msgchk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org http://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. cbe5256a53c1c5a724264c14d96c4ade664a577a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via cbe5256a53c1c5a724264c14d96c4ade664a577a (commit) from a01a41d031c796b526329a4170eb23f0ac93b949 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=cbe5256a53c1c5a724264c14d96c4ade664a577a commit cbe5256a53c1c5a724264c14d96c4ade664a577a Author: David Malone Date: Wed Dec 7 10:19:40 2011 -0500 Add support to inc for incorporting email from Maildir dropboxes. Add missing #include for to bring in definitions of PF_UNSPEC. Signed-off-by: Ken Hornstein diff --git a/man/inc.man b/man/inc.man index 540b378..44153a5 100644 --- a/man/inc.man +++ b/man/inc.man @@ -47,6 +47,14 @@ incorporates mail from the user's incoming mail drop into an .B nmh folder. +If the mail drop is a file, it can be in +.B mbox +or +.B MMDF +format. +If the mail drop is a directory it will considered to be a +.B Maildir +format mail drop. .PP You may specify which folder to use with .IR +folder . diff --git a/mts/smtp/hosts.c b/mts/smtp/hosts.c index a10509c..94287b5 100644 --- a/mts/smtp/hosts.c +++ b/mts/smtp/hosts.c @@ -16,6 +16,7 @@ #include #include +#include #include static struct host { diff --git a/sbr/mts.c b/sbr/mts.c index cd2a3d8..15f182c 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_UTSNAME_H diff --git a/uip/inc.c b/uip/inc.c index 8f99b7b..1bc0766 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -112,22 +112,29 @@ static struct swit switches[] = { #define INC_POP 1 static int inc_type; +static struct Maildir_entry { + char *filename; + time_t mtime; +} *Maildir = NULL; +static int num_maildir_entries = 0; static int snoop = 0; #ifdef POP extern char response[]; -static char *packfile = NULL; static int size; static long pos; -static long start; -static long stop; static int mbx_style = MMDF_FORMAT; static int pd = NOTOK; -static FILE *pf = NULL; #endif /* POP */ +static long start; +static long stop; + +static char *packfile = NULL; +static FILE *pf = NULL; + /* This is an attempt to simplify things by putting all the * privilege ops into macros. * *GROUPPRIVS() is related to handling the setgid MAIL property, @@ -192,6 +199,17 @@ static int pop_pack(char *); static int map_count(void); #endif +int +maildir_srt(const void *va, const void *vb) +{ +const struct Maildir_entry *a = va, *b = vb; +if (a->mtime > b->mtime) + return 1; +else if (a->mtime < b->mtime) + return -1; +else + return 0; +} int main (int argc, char **argv) @@ -476,6 +494,55 @@ main (int argc, char **argv) } if (stat (newmail, &s1) == NOTOK || s1.st_size == 0) adios (NULL, "no mail to incorporate"); + if (s1.st_mode & S_IFDIR) { + DIR *md; + struct dirent *de; + struct stat ms; + int i; + i = 0; + cp = concat (newmail, "/new", NULL); + if ((md = opendir(cp)) == NULL) + adios (NULL, "unable to open %s", cp); + while ((de = readdir (md)) != NULL) { + if (de->d_name[0] == '.') + continue; + if (i >= num_maildir_entries) { + if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL) + adios(NULL, "not enough memory for %d messages", 2*i+16); + num_maildir_entries = 2*i+16; + } + Maildir[i].filename = concat (cp, "/", de->d_name, NULL); + if (stat(Maildir[i].filename, &ms) != 0) + adios (Maildir[i].filename, "couldn't get delivery time"); + Maildir[i].mtime = ms.st_mtime; + i++; + } + free (cp); + closedir (md); + cp = concat (newmail, "/cur", NULL); + if ((md = opendir(cp)) == NULL) + adios (NULL, "unable to open %s", cp); + while ((de = readdir (md)) != NULL) { + if (de->d_name[0] == '.') + continue; + if (i >= num_maildir_entries) { + if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL) + adios(NULL, "not enough memory for %d messages", 2*i+16); + num_maildir_entries = 2*i+16; +
[Nmh-commits] [SCM] The nmh Mail Handling System branch, nmh-1_4-release, created. cbe5256a53c1c5a724264c14d96c4ade664a577a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, nmh-1_4-release has been created at cbe5256a53c1c5a724264c14d96c4ade664a577a (commit) - Log - --- hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. b5ba1be476f2f67ef35ae5766c6a215d44dcd295
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via b5ba1be476f2f67ef35ae5766c6a215d44dcd295 (commit) via 4ecf8b50d51e49113046aba7598fdbcabe590861 (commit) from cbe5256a53c1c5a724264c14d96c4ade664a577a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b5ba1be476f2f67ef35ae5766c6a215d44dcd295 commit b5ba1be476f2f67ef35ae5766c6a215d44dcd295 Author: Ken Hornstein Date: Wed Dec 7 12:00:26 2011 -0500 Make sure to ignore the nmh dist file. diff --git a/.gitignore b/.gitignore index f3a4caa..418afea 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ /uip/viamail /uip/whatnow /uip/whom +/nmh-*.tar.gz *.o *.1 *.5 http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4ecf8b50d51e49113046aba7598fdbcabe590861 commit 4ecf8b50d51e49113046aba7598fdbcabe590861 Author: Ken Hornstein Date: Wed Dec 7 11:36:53 2011 -0500 Since we're now moving past 1.4, bump this. diff --git a/VERSION b/VERSION index cd438c9..d918f45 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3-dev +1.4-dev --- Summary of changes: .gitignore |1 + VERSION|2 +- 2 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, nmh-1_4-release, updated. 94db154197f8d62b45a7bd517b4cef873aaf2ce9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, nmh-1_4-release has been updated via 94db154197f8d62b45a7bd517b4cef873aaf2ce9 (commit) via 00b3979f92b6259fd15b8410413f443050dfb294 (commit) via d4f16a6413a5ab4a6d949d615076410c49b72b9a (commit) from cbe5256a53c1c5a724264c14d96c4ade664a577a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=94db154197f8d62b45a7bd517b4cef873aaf2ce9 commit 94db154197f8d62b45a7bd517b4cef873aaf2ce9 Author: Ken Hornstein Date: Wed Dec 7 12:00:26 2011 -0500 Make sure to ignore the nmh dist file. diff --git a/.gitignore b/.gitignore index f3a4caa..418afea 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ /uip/viamail /uip/whatnow /uip/whom +/nmh-*.tar.gz *.o *.1 *.5 http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=00b3979f92b6259fd15b8410413f443050dfb294 commit 00b3979f92b6259fd15b8410413f443050dfb294 Author: Ken Hornstein Date: Wed Dec 7 12:00:00 2011 -0500 Remove netdb.h from the DIST variable. diff --git a/h/Makefile.in b/h/Makefile.in index b616524..7dcbb6f 100644 --- a/h/Makefile.in +++ b/h/Makefile.in @@ -10,7 +10,7 @@ VPATH = @srcdir@ # header files included in distribution HDRS = addrsbr.h aliasbr.h crawl_folders.h dropsbr.h fmt_compile.h fmt_scan.h \ md5.h mf.h mh.h mhcachesbr.h mhparse.h mime.h msh.h mts.h \ - netdb.h nmh.h picksbr.h popsbr.h prototypes.h rcvmail.h \ + nmh.h picksbr.h popsbr.h prototypes.h rcvmail.h \ scansbr.h signals.h tws.h vmhsbr.h utils.h # auxiliary files http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d4f16a6413a5ab4a6d949d615076410c49b72b9a commit d4f16a6413a5ab4a6d949d615076410c49b72b9a Author: Ken Hornstein Date: Wed Dec 7 11:36:34 2011 -0500 Update for new release diff --git a/DATE b/DATE index 4a3bde8..6c5495a 100644 --- a/DATE +++ b/DATE @@ -1 +1 @@ -27 April 2008 + 7 December 2011 diff --git a/VERSION b/VERSION index cd438c9..7f02206 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3-dev +1.4-RC1 diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 47b0106..3870298 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -1,6 +1,8 @@ Things to add to the release notes for the next full release: - SASL security layers (encryption) are now supported for the SMTP MTA. +- TLS is now supported for the SMTP MTA. +- inc can now incorporate mail from Maildir drops. - You can now select the SMTP server and port from either "send" or a user's mh_profile (you could always select the server; that option is now documented). These are available via the -server and -port switches. --- Summary of changes: .gitignore |1 + DATE |2 +- VERSION|2 +- docs/pending-release-notes |2 ++ h/Makefile.in |2 +- 5 files changed, 6 insertions(+), 3 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, nmh-1_4-release, updated. b842f8892f5c5be05301b65935aacd9bbd1a270b
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, nmh-1_4-release has been updated via b842f8892f5c5be05301b65935aacd9bbd1a270b (commit) from 94db154197f8d62b45a7bd517b4cef873aaf2ce9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b842f8892f5c5be05301b65935aacd9bbd1a270b commit b842f8892f5c5be05301b65935aacd9bbd1a270b Author: Ken Hornstein Date: Mon Dec 12 12:59:42 2011 -0500 Make sure to not reset hghnum (in the Maildir code) if we are incorporating mail from a POP mailbox. diff --git a/uip/inc.c b/uip/inc.c index 1bc0766..3dd1872 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -875,7 +875,7 @@ go_to_it: */ break; } -} else { /* Maildir inbox to process */ +} else if (inc_type == INC_FILE) { /* Maildir inbox to process */ char *sp; FILE *sf; int i; --- Summary of changes: uip/inc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. bc20acd6c385612fd19bc3ce40f56c32983748f1
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via bc20acd6c385612fd19bc3ce40f56c32983748f1 (commit) from cc9254b17cbfe044120d58053212eb9983631c11 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=bc20acd6c385612fd19bc3ce40f56c32983748f1 commit bc20acd6c385612fd19bc3ce40f56c32983748f1 Author: Ken Hornstein Date: Mon Dec 12 12:59:42 2011 -0500 Make sure to not reset hghnum (in the Maildir code) if we are incorporating mail from a POP mailbox. diff --git a/uip/inc.c b/uip/inc.c index 1bc0766..3dd1872 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -875,7 +875,7 @@ go_to_it: */ break; } -} else { /* Maildir inbox to process */ +} else if (inc_type == INC_FILE) { /* Maildir inbox to process */ char *sp; FILE *sf; int i; --- Summary of changes: uip/inc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, nmh-1_4-release, updated. b53f0e1400337a00a3f754eb694f05c440eae0c3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, nmh-1_4-release has been updated via b53f0e1400337a00a3f754eb694f05c440eae0c3 (commit) from b842f8892f5c5be05301b65935aacd9bbd1a270b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b53f0e1400337a00a3f754eb694f05c440eae0c3 commit b53f0e1400337a00a3f754eb694f05c440eae0c3 Author: Ken Hornstein Date: Tue Dec 13 14:12:15 2011 -0500 Update for new release candidate. diff --git a/VERSION b/VERSION index 7f02206..995f9d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4-RC1 +1.4-RC2 --- Summary of changes: VERSION |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System tag, PRE_POSIX_CONVERSION, created. 3bf07d227725f798f654ac09f015f35d27ab83cb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The tag, PRE_POSIX_CONVERSION has been created at 3bf07d227725f798f654ac09f015f35d27ab83cb (commit) - Log - commit 3bf07d227725f798f654ac09f015f35d27ab83cb Author: David Levine Date: Tue Aug 31 15:00:53 2010 + * uip/.cvsignore: added "new". --- hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System tag, nmh-1_4_RC1, created. 94db154197f8d62b45a7bd517b4cef873aaf2ce9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The tag, nmh-1_4_RC1 has been created at 94db154197f8d62b45a7bd517b4cef873aaf2ce9 (commit) - Log - commit 94db154197f8d62b45a7bd517b4cef873aaf2ce9 Author: Ken Hornstein Date: Wed Dec 7 12:00:26 2011 -0500 Make sure to ignore the nmh dist file. --- hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System annotated tag, nmh-1_4_RC2, created. nmh-1_4_RC2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The annotated tag, nmh-1_4_RC2 has been created at fa66b487d231048a3c8b5581a0d4060751422e9a (tag) tagging b53f0e1400337a00a3f754eb694f05c440eae0c3 (commit) tagged by Ken Hornstein on Tue Dec 13 14:13:06 2011 -0500 - Log - The tag for the second release candidate of nmh-1.4 (RC2). Anders Eriksson (1): Changed scan to always pass the folder argument. This is in line Bill Wohler (4): A couple of questions from nmh's original FAQ were folded into Since faqs.org appears to be moribund, I'm now using my site as the Changed Questions The MH web site is now http://rand-mh.sourceforge.net/ and the MH Dan Harkless (215): Properly deal with relative folder names. Problem noted by Jerry Peek Fix krb4 code to work with the original krb4 libraries as well as Add check for modf and link with -lm if it's not in libc. Needed for add HAVE_LIBM Make whatnow "list" work with "lproc: show" again. From Ruud de Rooij Fix a buffer overrun that caused packf -mbox to mess up on Change ordering of a conditional to prevent a bad pointer dereference. Allow display of 8bit encoded messages. From Kimmo Suominen Don't add line breaks in the middle of long addresses when building a Added -library switch so it can parse user aliases like post does. Changed configure.in's check for sigsetjmp to properly deal with Fixed a signal-handling bug that could cause whatnow to sometimes exit deal with SIGPIPE so mhl doesn't print "Broken pipe" if you quit out man page updates from Jerry Peek add a note about Irix make Use "#include " instead of "extern int errno;". Suggested by Update for the brave new world 1.0.1 patches 1.0.1 I renamed the old rcvdistcomps to rcvdistcomps.outbox and removed the New $(DIST_FILES) entry: rcvdistcomps.outbox. I think it's totally inappropriate for the default rcvdistcomps to save all Changed call of done() to return of done() to eliminate compilation warning. Changed from returning void to returning int so that main()s who call done() at Changed done() from returning void to returning int so that main()s who call Eliminated compilation warnings. Eliminated compilation warnings. Eliminated compilation warnings. err2peer() previously returned garbage. Now it returns result of callee donote() previously was written such that it could return garbage. Eliminated compilation warnings. Eliminated compilation warnings. pop_action() and pop_pack() used to return Previously contained the code: Eliminated unsued sigset_t variables set and oset. Eliminated compilation warnings. * slocal -debug used to leave a copy of each message processed in /tmp. Automated #define of MAILGROUP and installation of inc as setgid mail when the Just removed some useless whitespace that [X]Emacs' Make mode highlights as Automated #define of MAILGROUP and installation of inc as setgid mail when the Automated #define of MAILGROUP and installation of inc as setgid mail when the Just adding some text to this file so that cvs will see a difference and let me check it in. Every time acconfig.h or configure.in are changed (which I just Crap. That's what I get for using vi instead of xemacs for a change. Inserted Renamed from ZSH.COMPLETION so it'll alphabetize next to new COMPLETION-TCSH. Renamed to COMPLETION-ZSH so it'll alphabetize next to new COMPLETION-TCSH. New file along the lines of the old ZSH.COMPLETION, but for tcsh. Pretty bare Renamed ZSH.COMPLETION to COMPLETION-ZSH and added COMPLETION-TCSH. Doug's fix for my MAILGROUP autoconf support on his platform (yep, I was Touched because I changed configure.in. I didn't like the double use of "MAILGROUP" for two different variables used in * Fixed a portability problem in Doug's fix of a portability Added '-L' to the calls of 'ls' in configure.in -- I have seen multiple machines Upped the version number to 1.0.3. If we don't do this, then when people report Changed the version number from 1.0.3 to 1.0.2+dev. There was not unanimous * Add command to reverse the action of rmm [-nounlink] -- "urmm"? "umm"? "um"? Typecast to get rid of warnings that array index into types[] is a char. Put in prototype for initgroups() to get rid of "def
[Nmh-commits] [SCM] The nmh Mail Handling System branch, nmh-1_4-release, updated. nmh-1_4_RC2-1-g94d6045
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, nmh-1_4-release has been updated via 94d6045cdb13b2f01ac3aa06866525cea8f129a1 (commit) from b53f0e1400337a00a3f754eb694f05c440eae0c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=94d6045cdb13b2f01ac3aa06866525cea8f129a1 commit 94d6045cdb13b2f01ac3aa06866525cea8f129a1 Author: Ken Hornstein Date: Sun Jan 1 12:15:19 2012 -0500 Updated for 1.4 release. diff --git a/DATE b/DATE index 6c5495a..93127c0 100644 --- a/DATE +++ b/DATE @@ -1 +1 @@ - 7 December 2011 + 1 January 2012 diff --git a/VERSION b/VERSION index 995f9d4..c068b24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4-RC2 +1.4 --- Summary of changes: DATE|2 +- VERSION |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System annotated tag, nmh-1_4, created. nmh-1_4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The annotated tag, nmh-1_4 has been created at 2bae99b6035d22c541f2f9b28c81d63c4e4c1d2a (tag) tagging 94d6045cdb13b2f01ac3aa06866525cea8f129a1 (commit) replaces nmh-1_4_RC2 tagged by Ken Hornstein on Sun Jan 1 22:55:16 2012 -0500 - Log - The released version of nmh 1.4. Ken Hornstein (1): Updated for 1.4 release. --- hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 98ca421a4a9b4363ca37a45d6ccae14edb1fb587
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 98ca421a4a9b4363ca37a45d6ccae14edb1fb587 (commit) from 988cf5d51958127d579f97a0d4632930a25ee11e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=98ca421a4a9b4363ca37a45d6ccae14edb1fb587 commit 98ca421a4a9b4363ca37a45d6ccae14edb1fb587 Author: Ken Hornstein Date: Tue Jan 3 10:36:14 2012 -0500 Updated these files since we've finally got 1.4 out the door. diff --git a/DATE b/DATE index 4a3bde8..0d6a82e 100644 --- a/DATE +++ b/DATE @@ -1 +1 @@ -27 April 2008 + 3 January 2012 diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 47b0106..226d1fb 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -1,18 +1,2 @@ Things to add to the release notes for the next full release: -- SASL security layers (encryption) are now supported for the SMTP MTA. -- You can now select the SMTP server and port from either "send" or a - user's mh_profile (you could always select the server; that option is - now documented). These are available via the -server and -port switches. -- All networking code has been modified to use the new networking APIs - (getaddrinfo and friends). All networking code (with the exception of - the ftp client) now supports IPv6. -- Support for prefixing a \01 in the "servers" entry in mts.conf to - connect to all servers on a particular named net has been removed. -- New commands 'new', 'fnext', 'fprev', and 'unseen' for showing folders with - unseen mail (or mail in any specified sequence), changing to next such - folder, changing to previous such folder, and scanning all such folders, - respectively. This is based on Luke Mewburn's 'new': - http://www.mewburn.net/luke/src/new -- nmh will no longer attempt to install a mhn.defaults file that causes mhshow - to open its own xterms. --- Summary of changes: DATE |2 +- docs/pending-release-notes | 16 2 files changed, 1 insertions(+), 17 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, posix_conversion, created. 7774a9f7d38193647420218405e429b58c547bff
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, posix_conversion has been created at 7774a9f7d38193647420218405e429b58c547bff (commit) - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=7774a9f7d38193647420218405e429b58c547bff commit 7774a9f7d38193647420218405e429b58c547bff Author: Lyndon Nerenberg Date: Sat Aug 20 15:07:12 2011 -0700 Mark as POSIX development branch. diff --git a/VERSION b/VERSION index cd438c9..50b807e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3-dev +1.3--posix-dev --- hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 096c67eb7451cd78ed1e74c5b2a0c07ceb5c69d9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 096c67eb7451cd78ed1e74c5b2a0c07ceb5c69d9 (commit) from 98ca421a4a9b4363ca37a45d6ccae14edb1fb587 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=096c67eb7451cd78ed1e74c5b2a0c07ceb5c69d9 commit 096c67eb7451cd78ed1e74c5b2a0c07ceb5c69d9 Author: Ken Hornstein Date: Tue Jan 3 15:17:54 2012 -0500 Switch to using buffered I/O when doing TLS (but only for output). diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index e7a64a0..8d3a233 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -116,6 +116,7 @@ static SSL_CTX *sslctx = NULL; static SSL *ssl = NULL; static BIO *sbior = NULL; static BIO *sbiow = NULL; +static BIO *io = NULL; #endif /* TLS_SUPPORT */ #if defined(CYRUS_SASL) || defined(TLS_SUPPORT) @@ -286,6 +287,8 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, */ if (tls) { + BIO *ssl_bio; + if (! EHLOset("STARTTLS")) { sm_end(NOTOK); return sm_ierror("SMTP server does not support TLS"); @@ -338,8 +341,36 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, } SSL_set_bio(ssl, sbior, sbiow); + SSL_set_connect_state(ssl); + + /* +* Set up a BIO to handle buffering for us +*/ + + io = BIO_new(BIO_f_buffer()); + + if (! io) { + sm_end(NOTOK); + return sm_ierror("Unable to create a buffer BIO: %s", +ERR_error_string(ERR_get_error(), NULL)); + } - if (SSL_connect(ssl) < 1) { + ssl_bio = BIO_new(BIO_f_ssl()); + + if (! ssl_bio) { + sm_end(NOTOK); + return sm_ierror("Unable to create a SSL BIO: %s", +ERR_error_string(ERR_get_error(), NULL)); + } + + BIO_set_ssl(ssl_bio, ssl, BIO_CLOSE); + BIO_push(io, ssl_bio); + + /* +* Try doing the handshake now +*/ + + if (BIO_do_handshake(io) < 1) { sm_end(NOTOK); return sm_ierror("Unable to negotiate SSL connection: %s", ERR_error_string(ERR_get_error(), NULL)); @@ -787,8 +818,8 @@ sm_end (int type) #ifdef TLS_SUPPORT if (tls_active) { - SSL_shutdown(ssl); - SSL_free(ssl); + BIO_ssl_shutdown(io); + BIO_free_all(io); } #endif /* TLS_SUPPORT */ @@ -1235,9 +1266,9 @@ sm_fwrite(char *buffer, int len) if (tls_active) { int ret; - ret = SSL_write(ssl, buffer, len); + ret = BIO_write(io, buffer, len); - if (SSL_get_error(ssl, ret) != SSL_ERROR_NONE) { + if (ret <= 0) { sm_ierror("TLS error during write: %s", ERR_error_string(ERR_get_error(), NULL)); return NOTOK; @@ -1316,6 +1347,12 @@ sm_fflush(void) } #endif /* CYRUS_SASL */ +#ifdef TLS_SUPPORT +if (tls_active) { + (void) BIO_flush(io); +} +#endif /* TLS_SUPPORT */ + fflush(sm_wfp); } --- Summary of changes: mts/smtp/smtp.c | 47 ++- 1 files changed, 42 insertions(+), 5 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. eaa371139c2042251ab0376cfddc6983833fd2ba
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via eaa371139c2042251ab0376cfddc6983833fd2ba (commit) from 3a86e04e4c7947ea045b849d081502b772182128 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=eaa371139c2042251ab0376cfddc6983833fd2ba commit eaa371139c2042251ab0376cfddc6983833fd2ba Author: Ken Hornstein Date: Tue Jan 3 16:30:50 2012 -0500 Updated pending-release-notes diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 226d1fb..dbc2608 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -1,2 +1,4 @@ Things to add to the release notes for the next full release: +- Switched to buffered output when performing TLS encryption in the SMTP + MTA to increase performance. --- Summary of changes: docs/pending-release-notes |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. a395a8839181b9895fdd0cafdb40be35675ced48
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via a395a8839181b9895fdd0cafdb40be35675ced48 (commit) from 93bd0519e7383755a82da4aeff3e1e368f048525 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a395a8839181b9895fdd0cafdb40be35675ced48 commit a395a8839181b9895fdd0cafdb40be35675ced48 Author: Ken Hornstein Date: Thu Jan 5 12:05:43 2012 -0500 Bring in all of the mh-e support that is actually used to be compiled by default, and garbage collect the stuff that is not used. diff --git a/configure.in b/configure.in index 9cb18fc..55e1393 100644 --- a/configure.in +++ b/configure.in @@ -56,17 +56,6 @@ AC_ARG_ENABLE(masquerade, fi], [masquerade="draft_from mmailid username_extension"]) AC_SUBST(masquerade)dnl -dnl Do you want mhe support? -AC_ARG_ENABLE(mhe, - AS_HELP_STRING([--disable-mhe],[disable mhe support])) - -dnl mhe support is on by default, so define it unless --disable-mhe or the -dnl deprecated, undocumented --disable-nmh-mhe are specified. -if test x"$enable_mhe" != x"no" -a x"$enable_nmh_mhe" != x"no"; then - AC_DEFINE(MHE, 1, -[Define to compile in support for the Emacs front-end mh-e.])dnl -fi - dnl Do you want client-side support for pop? AC_ARG_ENABLE(pop, AS_HELP_STRING([--enable-pop], [enable client-side support for plain POP3])) diff --git a/man/forw.man b/man/forw.man index 877b49b..5b7dc6d 100644 --- a/man/forw.man +++ b/man/forw.man @@ -265,18 +265,13 @@ will prevent any edit from occurring.) The .B \-build switch is intended to be used by the Emacs mh-e interface to -.BR nmh , -and is only present if -.B nmh -was compiled with support for mh-e. It implies +.BR nmh . +It implies .BR \-nowhatnowproc . It causes a file /draft to be created, containing the draft message that would normally be presented to the user for editing. -No mail is actually sent. Note that this switch is not guaranteed to -be present or to have the same effects in future versions of -.BR nmh : -it is documented here only for completeness. +No mail is actually sent. .PP The .B \-file diff --git a/man/mh-profile.man b/man/mh-profile.man index cd47524..e5a7b52 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -223,21 +223,6 @@ command. (context, no default) .RE .PP -.BR mhe : -.RS 5 -If present, tells -.B inc -to compose an -.I MHE -auditfile in addition to its other tasks. -.I MHE -is Brian Reid's -.B emacs -front-end for -.BR nmh . -(profile, no default) -.RE -.PP .BR Alternate\-Mailboxes : mh@uci\-750a, bug-mh* .RS 5 diff --git a/man/repl.man b/man/repl.man index 9f2f489..acc1c76 100644 --- a/man/repl.man +++ b/man/repl.man @@ -425,20 +425,14 @@ The .B \-build switch is intended to be used by the Emacs mh-e interface to -.BR nmh , -and is only present if -.B nmh -was compiled with support -for mh-e. It implies +.BR nmh . +It implies .BR \-nowhatnowproc . It causes a file .I /reply to be created, containing the draft message that would normally be presented to the user for editing. -No mail is actually sent. Note that this switch is not guaranteed to -be present or to have the same effects in future versions of -.BR nmh : -it is documented here only for completeness. +No mail is actually sent. .PP The .B \-file diff --git a/sbr/folder_read.c b/sbr/folder_read.c index bb88659..2920448 100644 --- a/sbr/folder_read.c +++ b/sbr/folder_read.c @@ -99,9 +99,6 @@ folder_read (char *name) switch (dp->d_name[0]) { case '.': case ',': -#ifdef MHE - case '+': -#endif /* MHE */ continue; default: diff --git a/uip/forw.c b/uip/forw.c index ac0c4c5..8b5e008 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -68,11 +68,8 @@ static struct swit switches[] = { { "help", 0 }, #defineFILESW24 { "file file", 4 },/* interface from msh */ - -#ifdef MHE #defineBILDSW25 { "build", 5 },/* interface from mhe */ -#endif /* MHE */ { NULL, 0 } }; @@ -132,9 +129,7 @@ main (int argc, char **argv) char **argp, **arguments, *msgs[MAXARGS]; struct stat st; -#ifdef MHE int buildsw = 0; -#endif /* MHE */ #ifdef LOCALE setlocale(LC_ALL, ""); @@ -186,10 +181,8 @@ main (int argc, char **argv) adios (NULL, "missing argument to %s", argp[-2]);
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. e0230d2817eb33d4c754cbe5c8ed34517086da8d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via e0230d2817eb33d4c754cbe5c8ed34517086da8d (commit) from a395a8839181b9895fdd0cafdb40be35675ced48 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e0230d2817eb33d4c754cbe5c8ed34517086da8d commit e0230d2817eb33d4c754cbe5c8ed34517086da8d Author: Ken Hornstein Date: Thu Jan 5 12:26:48 2012 -0500 Update this with mh-e changes. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index dbc2608..c4ae22a 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -2,3 +2,6 @@ Things to add to the release notes for the next full release: - Switched to buffered output when performing TLS encryption in the SMTP MTA to increase performance. +- mh-e support has been changed so that it is always compiled into nmh; + old features that were previously enabled by the MHE option have been + garbage collected. --- Summary of changes: docs/pending-release-notes |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. c47ebdd0668b01a9227558c31febb0bd3d37f076
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via c47ebdd0668b01a9227558c31febb0bd3d37f076 (commit) from e0230d2817eb33d4c754cbe5c8ed34517086da8d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c47ebdd0668b01a9227558c31febb0bd3d37f076 commit c47ebdd0668b01a9227558c31febb0bd3d37f076 Author: Ken Hornstein Date: Thu Jan 5 13:39:47 2012 -0500 Garbage collect all of the old UCI #ifdef'd code. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index c4ae22a..7c27535 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -5,3 +5,5 @@ Things to add to the release notes for the next full release: - mh-e support has been changed so that it is always compiled into nmh; old features that were previously enabled by the MHE option have been garbage collected. +- Old code enabled by the UCI preprocessor definition has been + garbage-collected. diff --git a/man/mh-profile.man b/man/mh-profile.man index e5a7b52..f8ae608 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -317,11 +317,8 @@ environment variable If .B $SIGNATURE is not set and this profile entry is not present, the \*(lqgcos\*(rq field of -the \fI/etc/passwd\fP file will be used; otherwise, on hosts where -.B nmh -was configured with the UCI option, the file -.I $HOME/.signature -is consulted. Your signature will be added to the address +the \fI/etc/passwd\fP file will be used. +Your signature will be added to the address .B send puts in the \*(lqFrom:\*(rq header; do not include an address in the signature text. (profile, no default) diff --git a/uip/anno.c b/uip/anno.c index 41716f7..ab15a4a 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -238,11 +238,6 @@ main (int argc, char **argv) return 1; } -#ifdef UCI -if (strcmp(invo_name, "fanno") == 0) /* ugh! */ - datesw = 0; -#endif /* UCI */ - if (!context_find ("path")) free (path ("./", TFOLDER)); if (!msgs.size) diff --git a/uip/conflict.c b/uip/conflict.c index 07e77fc..a3bd1d7 100644 --- a/uip/conflict.c +++ b/uip/conflict.c @@ -131,10 +131,6 @@ main (int argc, char **argv) grp_names (); grp_members (); grp_ids (); -#ifdef UCI -ldr_names (); -ldr_ship (); -#endif /* UCI */ maildrops (); done (0); @@ -379,169 +375,3 @@ setup (void) } } } - -#ifdef UCI -/* - * UCI specific stuff for conflict - */ - -/* taken from */ - -#defineGLDRS "/admin/etc/GroupLeaders" - -struct grpldr { -char *gl_name; -char **gl_ldr; -}; - -int setglent (), endglent (); -struct grpldr *getglent (), *getglnam (); - - -/* taken from the getglent() routines */ - -#defineMAXGLS 100 - -static FILE *glp = NULL; -static char line[BUFSIZ+1]; -static struct grpldr grpldr; -static char *gl_ldr[MAXGLS + 1]; - - -setglent() { -if (glp == NULL) - glp = fopen (GLDRS, "r"); -else - rewind (glp); - -return (glp != NULL); -} - - -endglent() { -if (glp != NULL) { - fclose (glp); - glp = NULL; -} - -return 1; -} - -struct grpldr *getglent () { -register char *cp, - **q; - -if (glp == NULL && !setglent ()) - return NULL; -if ((cp = fgets (line, BUFSIZ, glp)) == NULL) - return NULL; - -grpldr.gl_name = cp; -grpldr.gl_ldr = q = gl_ldr; - -while (*cp) { - while (*cp && !isspace (*cp)) - cp++; - while (*cp && isspace (*cp)) - *cp++ = '\0'; - if (*cp == '\0') - break; - if (q < gl_ldr + MAXGLS) - *q++ = cp; - else - break; -} -*q = NULL; - -return (&grpldr); -} - -struct grpldr *getglnam (name) -char *name; -{ -register struct grpldr *gl = NULL; - -setglent (); -while (gl = getglent ()) - if (strcmp (name, gl->gl_name) == 0) - break; -endglent (); - -return gl; -} - -ldr_names () { -register int gp, -hit = 0; -char *gldrs[NGRPS]; -register struct grpldr *gl; - -gldrs[0] = NULL; -setglent (); -while (gl = getglent ()) { - if (getgrnam (gl->gl_name) == NULL) { - setup (); - fprintf (out, "unknown group %s in group leaders file\n", - gl->gl_name); - hit++; - } - for (gp = 0; gldrs[gp]; gp++) - if (strcmp (gldrs[gp], gl->gl_name) == 0) {
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 74d27af89981fc92ea56dec5474a1cec7ac5e474
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 74d27af89981fc92ea56dec5474a1cec7ac5e474 (commit) via b227669eb3338ad951c81e7efea1c76026b9f661 (commit) from ee7927a7998bde4f7ff8303b88b101cd9da1dfc3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=74d27af89981fc92ea56dec5474a1cec7ac5e474 commit 74d27af89981fc92ea56dec5474a1cec7ac5e474 Author: Ken Hornstein Date: Thu Jan 5 22:13:08 2012 -0500 Not sure why we're checking for st_blksize; it's required by POSIX and we're not even using the define! diff --git a/configure.in b/configure.in index 64fcd4f..4657b50 100644 --- a/configure.in +++ b/configure.in @@ -779,7 +779,6 @@ fi dnl dnl CHECK STRUCTURES dnl -AC_CHECK_MEMBERS(struct stat.st_blksize) AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#ifdef TIME_WITH_SYS_TIME http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b227669eb3338ad951c81e7efea1c76026b9f661 commit b227669eb3338ad951c81e7efea1c76026b9f661 Author: Ken Hornstein Date: Thu Jan 5 22:08:23 2012 -0500 Switch the use of LOCKDIR in acconfig.h to --enable-lockdir. diff --git a/acconfig.h b/acconfig.h index 3649bf3..70c2c6d 100644 --- a/acconfig.h +++ b/acconfig.h @@ -12,15 +12,6 @@ */ /* - * If you have defined DOT_LOCKING, then the default is to - * place the lock files in the same directory as the file that - * is to be locked. Alternately, if you define LOCKDIR, you - * can specify that all lock files go in a specific directory. - * Don't define this unless you know you need it. - */ -/* #define LOCKDIR "/usr/spool/locks" */ - -/* * Define this if your passwords are stored in some type of * distributed name service, such as NIS, or NIS+. */ diff --git a/configure.in b/configure.in index 55e1393..64fcd4f 100644 --- a/configure.in +++ b/configure.in @@ -153,6 +153,17 @@ else AC_DEFINE(DOT_LOCKING)dnl fi +dnl Should we use a locking directory? +AC_ARG_ENABLE([lockdir], [ + AS_HELP_STRING([--enable-lockdir=dir], [Store dot-lock files in "dir"])], [ + AS_IF([test "x$enableval" = xyes],[ +AC_MSG_ERROR([--enable-lockdir requires an argument])]) + AS_IF([test "x$LOCKTYPE" != xdot],[ +AC_MSG_ERROR([Can only use --enable-lockdir with dot locking])]) + AC_DEFINE_UNQUOTED([LOCKDIR], ["$enableval"], +[Directory to store dot-locking lock files]) +]) + dnl What method of posting should post use? AC_ARG_WITH(mts, AS_HELP_STRING([--with-mts=@<:@smtp|sendmail@:>@], diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 7c27535..14ad579 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -7,3 +7,4 @@ Things to add to the release notes for the next full release: garbage collected. - Old code enabled by the UCI preprocessor definition has been garbage-collected. +- LOCKDIR is now configurable via --enable-lockdir diff --git a/man/mh-tailor.man b/man/mh-tailor.man index 15704ee..4a30db1 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -387,12 +387,11 @@ specifies that a file should be created whose existence means \*(lqlocked\*(rq and whose non-existence means \*(lqunlocked\*(rq. The name of this file is constructed by appending \*(lq.lock\*(rq to the name of the file being -locked. If -.B LOCKDIR -is not specified, lock files will be created +locked. If \*(lq--enable-lockdir=directory\*(rq +is not specified at build time, lock files will be created in the directory where the file being locked resides. Otherwise, lock files will be created in the directory specified by -.BR LOCKDIR . +\*(lq--enable-lockdir\*(rq. .PP Prior to installing .BR nmh , --- Summary of changes: acconfig.h |9 - configure.in | 12 +++- docs/pending-release-notes |1 + man/mh-tailor.man |7 +++ 4 files changed, 15 insertions(+), 14 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 55795751a1513b7018b38c6c50c5bccc710feff2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 55795751a1513b7018b38c6c50c5bccc710feff2 (commit) via 9680f38826145311f8720dab2d19d3796e8514ee (commit) via aac9670c207aaefb17521c2ce4db39cb8893f660 (commit) via fd83882889b45c597fd051705147e8bc0ba0890d (commit) via a51ad22240aacc586d164bf9b79b9f0380fc8992 (commit) via c152db5d6a64036d4e51ec75c93b6accbb1bfa13 (commit) via 30542ddcbeb83a58e5802ec3421516ed9c252991 (commit) from 58af02b57c4d2cc732fea0f5ed86e02789d92438 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=55795751a1513b7018b38c6c50c5bccc710feff2 commit 55795751a1513b7018b38c6c50c5bccc710feff2 Author: Ken Hornstein Date: Fri Jan 6 10:48:03 2012 -0500 Garbage collect all of the builtin ftp client support. diff --git a/acconfig.h b/acconfig.h index a326761..a6d8742 100644 --- a/acconfig.h +++ b/acconfig.h @@ -26,15 +26,6 @@ /* #define REALLYDUMB 1 */ /* - * Compile simple ftp client into mhn. This will be used by mhn - * for ftp access unless you have specified another access method - * in your .mh_profile or mhn.defaults. Use the "mhn-access-ftp" - * profile entry to override this. Check mhn(1) man page for - * details. - */ -#define BUILTIN_FTP 1 - -/* * If you enable POP support, this is the the port name that nmh will use. Make * sure this is defined in your /etc/services file (or its NIS/NIS+ equivalent). * If you are using KPOP, you will need to change this to "kpop" unless you want diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 14ad579..83c39ee 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -8,3 +8,7 @@ Things to add to the release notes for the next full release: - Old code enabled by the UCI preprocessor definition has been garbage-collected. - LOCKDIR is now configurable via --enable-lockdir +- All configuration options that were formerly only adjustable via editing + config.h have been removed. +- Support for the built-in ftp client (used when dealing with external body + message parts in MIME messages) has been removed. diff --git a/h/arpa_ftp.h b/h/arpa_ftp.h deleted file mode 100644 index 64532b9..000 --- a/h/arpa_ftp.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 1983, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - *notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - *notice, this list of conditions and the following disclaimer in the - *documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - *may be used to endorse or promote products derived from this software - *without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ftp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _FTP_H_ -#define_FTP_H_ - -/* Definitions for FTP; see RFC-765. */ - -/* - * Reply codes. - */ -#define PRELIM 1 /* positive preliminary */ -#define COMPLETE 2 /* positive completion */ -#define CONTINUE 3 /* positive intermediate */ -#define TRANSIENT 4 /* transie
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. d2e40bd9ce3c3973a1666eaa9477cea927baf84f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via d2e40bd9ce3c3973a1666eaa9477cea927baf84f (commit) via d4e112ae5fad828f33e3a44de40c6e5db7db51ad (commit) via 6dd3c59d6c3d8b25512aeb5d3c0433941ea688e6 (commit) from 55795751a1513b7018b38c6c50c5bccc710feff2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d2e40bd9ce3c3973a1666eaa9477cea927baf84f commit d2e40bd9ce3c3973a1666eaa9477cea927baf84f Author: Ken Hornstein Date: Fri Jan 6 14:40:31 2012 -0500 Move definition of LINK to mh header file, and garbage collect ATTVIBUG code. diff --git a/acconfig.h b/acconfig.h index 1894504..a99e544 100644 --- a/acconfig.h +++ b/acconfig.h @@ -25,17 +25,5 @@ */ /* #define REALLYDUMB 1 */ -/* - * Name of link to file to which you are replying. - */ -#define LINK "@" - -/* - * Define to 1 if your vi has ATT bug, such that it returns - * non-zero exit codes on `pseudo-errors'. - */ -#undef ATTVIBUG - - /* END USER CONFIGURATION SECTION */ @TOP@ diff --git a/h/mh.h b/h/mh.h index abcf445..e3a382a 100644 --- a/h/mh.h +++ b/h/mh.h @@ -261,6 +261,9 @@ extern char *msg_delim; /* .. */ #define OUTPUTLINELEN 72 /* default line length for headers */ +#define LINK "@" /* Name of link to file to which you are */ + /* replying. */ + /* * miscellaneous macros */ diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index eaea7e1..18c25f8 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -726,13 +726,6 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, default: if ((status = pidwait (pid, NOTOK))) { -#ifdef ATTVIBUG - if ((cp = r1bindex (*ed, '/')) - && strcmp (cp, "vi") == 0 - && (status & 0x00ff) == 0) - status = 0; - else { -#endif if (((status & 0xff00) != 0xff00) && (!reedit || (status & 0x00ff))) { if (!use && (status & 0xff00) && @@ -744,9 +737,6 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, } status = -2;/* maybe "reedit ? -2 : -1"? */ break; -#ifdef ATTVIBUG - } -#endif } reedit++; http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d4e112ae5fad828f33e3a44de40c6e5db7db51ad commit d4e112ae5fad828f33e3a44de40c6e5db7db51ad Author: Ken Hornstein Date: Fri Jan 6 14:18:46 2012 -0500 Hardcode the defaults for Msg-Protect and Folder-Protect. Also fix the documentation (had the wrong value for the default for Msg-Protect). diff --git a/acconfig.h b/acconfig.h index 3961a30..1894504 100644 --- a/acconfig.h +++ b/acconfig.h @@ -26,12 +26,6 @@ /* #define REALLYDUMB 1 */ /* - * Define the default creation modes for folders and messages. - */ -#define DEFAULT_FOLDER_MODE "700" -#define DEFAULT_MESSAGE_MODE "600" - -/* * Name of link to file to which you are replying. */ #define LINK "@" diff --git a/config/config.c b/config/config.c index a4edc46..82d20b1 100644 --- a/config/config.c +++ b/config/config.c @@ -346,7 +346,7 @@ char *AliasFile = nmhetcdir (/MailAliases); * Folders (directories) are created with this protection (mode) */ -char *foldprot = DEFAULT_FOLDER_MODE; +char *foldprot = "700"; /* * Every NEW message will be created with this protection. When a @@ -354,5 +354,5 @@ char *foldprot = DEFAULT_FOLDER_MODE; * to messages coming in through inc. */ -char *msgprot = DEFAULT_MESSAGE_MODE; +char *msgprot = "600"; diff --git a/man/mh-profile.man b/man/mh-profile.man index f8ae608..4299a30 100644 --- a/man/mh-profile.man +++ b/man/mh-profile.man @@ -154,17 +154,17 @@ composition draft before it is sent. .RE .PP .BR Msg\-Protect : -644 +600 .RS 5 An octal number which defines the permission bits for new message files. See .BR chmod (1) for an explanation of the octal number. -(profile, default: 0644) +(profile, default: 0600) .RE .PP .BR Folder\-Protect : -750 +700 .RS 5 An octal number which defines the permission bits for new folder directories. See http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=6dd3c59d6c3d8b25512aeb5d3c0433941ea688e6 commit 6dd3c59d6c3d8b25512aeb5d3c0433941ea688e6 Author: Ken Hornstein Date: Fri Jan 6 14:12:13 2012 -0500
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 19f0a0fb37951be3155401e02425cb25365ff601
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 19f0a0fb37951be3155401e02425cb25365ff601 (commit) via d45c3d28d788129428036fd7f26fa417beccd93e (commit) from 4505679feac62b930d0eba541b65328a491bd3b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=19f0a0fb37951be3155401e02425cb25365ff601 commit 19f0a0fb37951be3155401e02425cb25365ff601 Author: Ken Hornstein Date: Mon Jan 9 13:38:02 2012 -0500 Finally able to get rid of acconfig.h! Since we're doing slightly better in the autoconf universe, rename configure.in to configure.ac, the "more correct" name for the configure script template. diff --git a/Makefile.in b/Makefile.in index 6b7b1d6..8bb2b40 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,7 +75,7 @@ INSTALL_DATA= @INSTALL_DATA@ # all files in this directory included in the distribution DIST = ChangeLog COPYRIGHT DATE INSTALL MACHINES README VERSION \ ChangeLog install-sh mkinstalldirs Makefile.in aclocal.m4 \ - acconfig.h config.h.in configure.in configure stamp-h.in\ + config.h.in configure.ac configure stamp-h.in \ config.sub config.guess # subdirectories in distribution @@ -145,7 +145,7 @@ Makefile: Makefile.in config.status config.status: configure VERSION ./config.status --recheck -configure: configure.in aclocal.m4 +configure: configure.ac aclocal.m4 cd $(srcdir) && autoconf config.h: stamp-h @@ -153,7 +153,7 @@ stamp-h: config.h.in config.status ./config.status config.h stamp config.h.in: stamp-h.in -stamp-h.in: configure.in acconfig.h aclocal.m4 +stamp-h.in: configure.ac aclocal.m4 cd $(srcdir) && autoheader date > $@ diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index a99e544..000 --- a/acconfig.h +++ /dev/null @@ -1,29 +0,0 @@ - -/** BEGIN USER CONFIGURATION SECTION */ - -/* - * IMPORTANT: You should no longer need to edit this file to handle - * your operating system. That should be handled and set correctly by - * configure now. - * - * These are slowly being phased out, but currently - * not everyone is auto-configured. Then decide if you - * wish to change the features that are compiled into nmh. - */ - -/* - * Directs nmh not to try and rewrite addresses - * to their official form. You probably don't - * want to change this without good reason. - */ -#define DUMB1 - -/* - * Define this if you do not want nmh to attach the local hostname - * to local addresses. You must also define DUMB. You probably - * don't need this unless you are behind a firewall. - */ -/* #define REALLYDUMB 1 */ - -/* END USER CONFIGURATION SECTION */ -@TOP@ diff --git a/configure.in b/configure.ac similarity index 100% rename from configure.in rename to configure.ac diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 227b40b..649e06f 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -17,6 +17,9 @@ addresses. The routines in sbr/addrsbr.c associate semantics with those addresses. + The comments below are left in for historical purposes; DUMB and + REALLYDUMB are now the default in the code. + If #ifdef DUMB is in effect, a full 822-style parser is called for syntax recongition. This breaks each address into its components. Note however that no semantics are assumed about the parts or their @@ -113,9 +116,6 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) { char *pp; struct mailname *mp; -#ifndefDUMB -char *dp; -#endif /* not DUMB */ if (err[0]) { if (eresult) @@ -188,13 +188,11 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) else { mp->m_nohost = 1; mp->m_mbox = getcpy (mbox); -#ifdef DUMB if (route == NULL && dftype == LOCALHOST) { mp->m_host = NULL; mp->m_type = dftype; } else -#endif /* DUMB */ { mp->m_host = route ? NULL : getcpy (dfhost); mp->m_type = route ? NETHOST : dftype; @@ -206,27 +204,8 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) if (wanthost == AD_NHST) mp->m_type = !mh_strcasecmp (LocalName (), mp->m_host) ? LOCALHOST : NETHOST; -#ifdef DUMB else mp->m_type = mh_strcasecmp (LocalName(), mp->m_host) ? NETHOST : LOCALHOST; -#else /* not DUMB */ -else -
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. f475d48680eb8bb0b6543efab9057eba2773666e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via f475d48680eb8bb0b6543efab9057eba2773666e (commit) from 19f0a0fb37951be3155401e02425cb25365ff601 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=f475d48680eb8bb0b6543efab9057eba2773666e commit f475d48680eb8bb0b6543efab9057eba2773666e Author: Ken Hornstein Date: Mon Jan 9 13:56:30 2012 -0500 We are making POSIX signal support a requirement; remove all support for other signal interfaces. diff --git a/configure.ac b/configure.ac index db75827..2a56e97 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl -dnl configure.in -- autoconf template for nmh +dnl configure.ac -- autoconf template for nmh dnl dnl Move this up a bit @@ -487,8 +487,7 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, dnl --- dnl CHECK FUNCTIONS dnl --- -AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo sigaction sigprocmask \ - sigblock sigsetmask sighold sigrelse) +AC_CHECK_FUNCS(writev lstat tzset getutent nl_langinfo) dnl Look for the initgroups() declaration. On AIX 4.[13], Solaris 4.1.3, and dnl ULTRIX 4.2A the function is defined in libc but there's no declaration in @@ -763,18 +762,6 @@ AC_TYPE_UID_T AC_TYPE_MODE_T AC_TYPE_SIZE_T -dnl Check for sigset_t. Currently I'm looking in -dnl and . Others might need -dnl to be added. -AC_CACHE_CHECK(for sigset_t, nmh_cv_type_sigset_t, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include ]], [[sigset_t tempsigset;]])], -nmh_cv_type_sigset_t=yes,nmh_cv_type_sigset_t=no)]) -if test $nmh_cv_type_sigset_t = no; then - AC_DEFINE(sigset_t, unsigned int, -[Define to `unsigned int' if or doesn't define.]) -fi - dnl dnl CHECK STRUCTURES dnl @@ -795,34 +782,6 @@ AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include ]) AC_STRUCT_DIRENT_D_TYPE -dnl - -dnl CHECK SIGNALS -dnl - -dnl What style of signal do you have (POSIX, BSD, or SYSV)? -AH_TEMPLATE(RELIABLE_SIGNALS, [Define to 1 if you have reliable signals.]) -AC_MSG_CHECKING(what style of signals to use) -if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then - signals_style=POSIX_SIGNALS - AC_DEFINE(POSIX_SIGNALS, 1, -[Define to 1 if you use POSIX style signal handling.]) - AC_DEFINE(RELIABLE_SIGNALS) -elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then - signals_style=BSD_SIGNALS - AC_DEFINE(BSD_SIGNALS,1, -[Define to 1 if you use BSD style signal handling (and can block signals).]) - AC_DEFINE(RELIABLE_SIGNALS) -elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then - signals_style=SYSV_SIGNALS - AC_DEFINE(SYSV_SIGNALS,1, -[Define to 1 if you use SYSV style signal handling (and can block signals).]) -else - signals_style=NO_SIGNAL_BLOCKING - AC_DEFINE(NO_SIGNAL_BLOCKING,1, -[Define to 1 if you have no signal blocking at all (bummer).]) -fi - -AC_MSG_RESULT($signals_style) - dnl Where is located? Needed as input for signames.awk AC_CACHE_CHECK(where signal.h is located, nmh_cv_path_signal_h, [for SIGNAL_H in /usr/include/bsd/sys/signal.h dnl Next diff --git a/h/signals.h b/h/signals.h index 905b811..6f7ed6c 100644 --- a/h/signals.h +++ b/h/signals.h @@ -13,22 +13,7 @@ typedef void (*SIGNAL_HANDLER)(int); /* - * If not a POSIX machine, then we create our - * own POSIX style signal sets functions. This - * currently assumes you have 31 signals, which - * should be true on most pure BSD machines. - */ -#ifndef POSIX_SIGNALS -# define sigemptyset(s)(*(s) = 0) -# define sigfillset(s) (*(s) = ~((sigset_t) 0), 0) -# define sigaddset(s,n)(*(s) |= (1 << ((n) - 1)), 0) -# define sigdelset(s,n)(*(s) &= ~(1 << ((n) - 1)), 0) -# define sigismember(s,n) ((*(s) & (1 << ((n) - 1))) != 0) -#endif - -/* * prototypes */ -int SIGPROCMASK (int, const sigset_t *, sigset_t *); SIGNAL_HANDLER SIGNAL (int, SIGNAL_HANDLER); SIGNAL_HANDLER SIGNAL2 (int, SIGNAL_HANDLER); diff --git a/sbr/context_save.c b/sbr/context_save.c index 4ee40ca..33cd23d 100644 --- a/sbr/context_save.c +++ b/sbr/context_save.c @@ -41,7 +41,7 @@ context_save (void) sigaddset (&set, SIGINT); sigaddset (&set, SIGQUIT); sigaddset (&set, SIGTERM); -SIGPROCMASK (SIG_BLOCK, &set, &oset); +sigprocmask (SIG_BLOCK, &set, &oset); if (!(out = lkfopen (ctxpath, "w"))) adios (ctxpath, "unable to write&quo
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. ae6d25b39b09560916481983b30d3b09ccf9390e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via ae6d25b39b09560916481983b30d3b09ccf9390e (commit) via c2191f6961409263271aaeb0f9685e10492389a8 (commit) via 9827ca52b9f69d29f3bc3c74a8ca95e14ee226ff (commit) via c33891a4d5265bdbbbadae72ab6d8d92589636ca (commit) from a2469f5ecbca3a179251ac9b777b561bc5245d4c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ae6d25b39b09560916481983b30d3b09ccf9390e commit ae6d25b39b09560916481983b30d3b09ccf9390e Merge: c2191f6 a2469f5 Author: Ken Hornstein Date: Mon Jan 9 15:52:34 2012 -0500 Merge branch 'master' of git.sv.nongnu.org:/srv/git/nmh http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c2191f6961409263271aaeb0f9685e10492389a8 commit c2191f6961409263271aaeb0f9685e10492389a8 Author: Ken Hornstein Date: Mon Jan 9 15:51:57 2012 -0500 Remove OS-specific defines. As part of it, remove scary longjmp() inside signal handlers that was part of the code under #ifdef BSD42. diff --git a/configure.ac b/configure.ac index 0df49ba..43a1029 100644 --- a/configure.ac +++ b/configure.ac @@ -767,59 +767,6 @@ SIGNAL_H=$nmh_cv_path_signal_h AC_SUBST(SIGNAL_H)dnl dnl -dnl OS SPECIFIC DEFINES -dnl -AH_TEMPLATE(SYS5, [Defined for Solaris 2.x, Irix, OSF/1, HP-UX, AIX, SCO5; only used in vmh.c which is not built.]) -AH_TEMPLATE(SVR4, [Defined for Solaris 2.x, Irix, OSF/1, HP-UX, AIX; only used in vmh.c which is not built.]) -AH_TEMPLATE(BSD44, [Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS, Mac OS X/Rhapsody; only used in vmh.c which is not built.]) -AH_TEMPLATE(BSD42, [Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS, Mac OS X/Rhapsody -- does PicoBSD have uname?]) -AH_TEMPLATE(SCO_5_STDIO, [Defined for SCO5.]) - -case "$target_os" in - - solaris2*) -AC_DEFINE(SYS5) -AC_DEFINE(SVR4) -;; - irix*) -AC_DEFINE(SYS5) -AC_DEFINE(SVR4) -;; - osf*) -AC_DEFINE(SYS5) -AC_DEFINE(SVR4) -;; - aix*) -AC_DEFINE(SYS5) -AC_DEFINE(SVR4) -;; - sunos4*) -AC_DEFINE(BSD42) -;; - freebsd*) -AC_DEFINE(BSD42) -AC_DEFINE(BSD44) -;; - netbsd*) -AC_DEFINE(BSD42) -AC_DEFINE(BSD44) -;; - openbsd*) -AC_DEFINE(BSD42) -AC_DEFINE(BSD44) -;; - bsd/os*) -AC_DEFINE(BSD42) -AC_DEFINE(BSD44) -;; - sco5*) -AC_DEFINE(SYS5) -AC_DEFINE(SCO_5_STDIO) -;; -esac - - -dnl dnl OUTPUT MAKEFILES dnl AC_CONFIG_FILES(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \ diff --git a/h/msh.h b/h/msh.h index 201c7ec..fb80f23 100644 --- a/h/msh.h +++ b/h/msh.h @@ -75,11 +75,6 @@ extern int interrupted; /* SIGINT detected */ extern int broken_pipe;/* SIGPIPE detected */ extern int told_to_quit; /* SIGQUIT detected */ -#ifdef BSD42 -extern int should_intr;/* signal handler should interrupt call */ -extern jmp_buf sigenv; /* the environment pointer */ -#endif - /* * prototypes */ diff --git a/sbr/discard.c b/sbr/discard.c index dbe309d..a1efa48 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -11,13 +11,6 @@ #include -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -#endif - void discard (FILE *io) diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index f31b9c4..585df64 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -190,14 +190,6 @@ static int (*eom_action)(int) = NULL; # define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC #endif -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC -#endif - #ifndef DEFINED__FILBUF_TO_SOMETHING_SPECIFIC extern int _filbuf(FILE*); #endif diff --git a/sbr/mts.c b/sbr/mts.c index 37f6e23..71836e4 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -370,7 +370,6 @@ getuserinfo (void) field, like phone number. Also, if mmailid masquerading is turned on due to "mmailid" appearing on the "masquerade:" line of mts.conf, stop if we hit a '<' (which should precede any ','s). */ -#ifndef BSD42 if (mmailid_masquerading) /* Stop at ',' or '<'. */ for (cp = fullname; *np != '\0' && *np != ',' && *np != '<'; @@ -385,46 +384,6 @@ ge
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 2c3d90ed127ab47e695350367ca3c34d4324bcc4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 2c3d90ed127ab47e695350367ca3c34d4324bcc4 (commit) via 811c11557492b9a6e6bd5ae45bb5597647ba5c99 (commit) via 01943d78230ead5bcc568e8a87d3cdbaac1f5584 (commit) from ae6d25b39b09560916481983b30d3b09ccf9390e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2c3d90ed127ab47e695350367ca3c34d4324bcc4 commit 2c3d90ed127ab47e695350367ca3c34d4324bcc4 Author: Ken Hornstein Date: Wed Jan 11 15:04:39 2012 -0500 Completely remove the use of TIME_WITH_SYS_TIME (I removed the autoconf test but never removed the code, and this caused some problems on systems that needed some prototypes in ). diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index 0191086..29c4dd0 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -160,16 +160,10 @@ static int day_map[] = { --cp; } #ifdef ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST -# ifdef TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H # include -# include -# else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif # endif +#include static void zonehack (struct tws *tw) diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index a180c56..a86661e 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -13,16 +13,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include /* * hash table for deciding if a component is "interesting" diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 8d03836..9784919 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -13,16 +13,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include #ifdef MULTIBYTE_SUPPORT # include # include diff --git a/sbr/lock_file.c b/sbr/lock_file.c index c4353b5..c7dffcf 100644 --- a/sbr/lock_file.c +++ b/sbr/lock_file.c @@ -19,16 +19,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include #include #ifdef HAVE_FCNTL_H diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index ea2bcd6..2a3f899 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -27,16 +27,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include extern int debugsw; diff --git a/uip/mhcachesbr.c b/uip/mhcachesbr.c index 807cf60..cf9087b 100644 --- a/uip/mhcachesbr.c +++ b/uip/mhcachesbr.c @@ -21,16 +21,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include extern int debugsw; diff --git a/uip/picksbr.c b/uip/picksbr.c index bd4c263..4afd094 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -12,16 +12,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include static struct swit parswit[] = { #definePRAND 0 diff --git a/uip/post.c b/uip/post.c index 6429cb4..515e1d5 100644 --- a/uip/post.c +++ b/uip/post.c @@ -23,16 +23,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include #ifdef SMTPMTS # include diff --git a/uip/sendsbr.c b/uip/sendsbr.c index f0c84f5..6215219 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -16,16 +16,10 @@ #include #include -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef TM_IN_SYS_TIME -# include -# else -# include -# endif #endif +#include int debugsw = 0; /* global */ int forwsw = 1; http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=811c11557492b9a6e6bd5ae45bb5597647ba5c99 commit 811c11557492b9a6e6bd5ae45bb5597647ba5c99 Author: Ken Hornstein Date: Wed Jan 11 14:52:23 2012 -0500 Ignore a.out.DSYM (this file sometims shows up when using the debugger) diff --git a/.gitignore b/.gitignore index fbd844a..8cf8b22 100644 --- a/.gitignore +++ b/.gitignore @@ -80,
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 162f2a7d23a18a87cad101f68ab27de057de533d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 162f2a7d23a18a87cad101f68ab27de057de533d (commit) from a4d2c92d013879e3a2bf70260c34fffae47aa1bf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=162f2a7d23a18a87cad101f68ab27de057de533d commit 162f2a7d23a18a87cad101f68ab27de057de533d Author: Ken Hornstein Date: Thu Jan 12 21:07:33 2012 -0500 Create two new mh-format functions: %(putlit) and %(concataddr). %(putlit) outputs a string without any space compression or control character conversion %(concataddr) is just like %(formataddr), except that inside of repl there will not be any duplicate address supression. diff --git a/h/fmt_compile.h b/h/fmt_compile.h index 22be450..3cbae02 100644 --- a/h/fmt_compile.h +++ b/h/fmt_compile.h @@ -14,95 +14,97 @@ #define FT_STR 8 /* "str" as text */ #define FT_STRF9 /* "str" as text, filled */ #define FT_STRFW 10 /* "str" as text, filled, width in "value" */ -#define FT_PUTADDR 11 /* split and print address line*/ +#define FT_STRLIT 11 /* "str" as text, no space compression */ +#define FT_PUTADDR 12 /* split and print address line*/ /* types that modify the "str" or "value" registers */ -#define FT_LS_COMP 12 /* set "str" to component text */ -#define FT_LS_LIT 13 /* set "str" to literal text*/ -#define FT_LS_GETENV 14 /* set "str" to getenv(text)*/ -#define FT_LS_CFIND15 /* set "str" to context_find(text) */ -#define FT_LS_DECODECOMP 16/* set "str" to decoded component text */ -#define FT_LS_DECODE 17 /* decode "str" as RFC-2047 header */ -#define FT_LS_TRIM 18 /* trim trailing white space from "str" */ -#define FT_LV_COMP 19 /* set "value" to comp (as dec. num)*/ -#define FT_LV_COMPFLAG 20 /* set "value" to comp flag word*/ -#define FT_LV_LIT 21 /* set "value" to literal num */ -#define FT_LV_DAT 22 /* set "value" to dat[n]*/ -#define FT_LV_STRLEN 23 /* set "value" to length of "str" */ -#define FT_LV_PLUS_L 24 /* set "value" += literal */ -#define FT_LV_MINUS_L 25 /* set "value" -= literal */ -#define FT_LV_DIVIDE_L 26 /* set "value" to value / literal */ -#define FT_LV_MODULO_L 27 /* set "value" to value % literal */ -#define FT_LV_CHAR_LEFT 28 /* set "value" to char left in output */ +#define FT_LS_COMP 13 /* set "str" to component text */ +#define FT_LS_LIT 14 /* set "str" to literal text*/ +#define FT_LS_GETENV 15 /* set "str" to getenv(text)*/ +#define FT_LS_CFIND16 /* set "str" to context_find(text) */ +#define FT_LS_DECODECOMP 17/* set "str" to decoded component text */ +#define FT_LS_DECODE 18 /* decode "str" as RFC-2047 header */ +#define FT_LS_TRIM 19 /* trim trailing white space from "str" */ +#define FT_LV_COMP 20 /* set "value" to comp (as dec. num)*/ +#define FT_LV_COMPFLAG 21 /* set "value" to comp flag word*/ +#define FT_LV_LIT 22 /* set "value" to literal num */ +#define FT_LV_DAT 23 /* set "value" to dat[n]*/ +#define FT_LV_STRLEN 24 /* set "value" to length of "str" */ +#define FT_LV_PLUS_L 25 /* set "value" += literal */ +#define FT_LV_MINUS_L 26 /* set "value" -= literal */ +#define FT_LV_DIVIDE_L 27 /* set "value" to value / literal */ +#define FT_LV_MODULO_L 28 /* set "value" to value % literal */ +#define FT_LV_CHAR_LEFT 29 /* set "value" to char left in output */ -#define FT_LS_MONTH29 /* set "str" to tws month */ -#define FT_LS_LMONTH 30 /* set "str" to long tws month */ -#define FT_LS_ZONE 31 /* set &
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 93cf33c07eed0e56b4f3a0d1c07ff183ac1510ef
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 93cf33c07eed0e56b4f3a0d1c07ff183ac1510ef (commit) via c3ed95b3c5530b84a73dbdd531cb9aca9ba8dea0 (commit) via 5ee3667d7daf6e7090e3de104c3679259eb26da5 (commit) from 3a84d814004fd4557bf4f44952648e9e69bd22a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=93cf33c07eed0e56b4f3a0d1c07ff183ac1510ef commit 93cf33c07eed0e56b4f3a0d1c07ff183ac1510ef Merge: c3ed95b 3a84d81 Author: Ken Hornstein Date: Fri Jan 13 12:05:13 2012 -0500 Merge branch 'master' of git.sv.nongnu.org:/srv/git/nmh http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c3ed95b3c5530b84a73dbdd531cb9aca9ba8dea0 commit c3ed95b3c5530b84a73dbdd531cb9aca9ba8dea0 Author: Ken Hornstein Date: Fri Jan 13 12:04:13 2012 -0500 Add some comments to the format compiler and engine. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index c73464c..f7e0ac7 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -14,3 +14,4 @@ Things to add to the release notes for the next full release: message parts in MIME messages) has been removed. - fileproc and mhlproc mh-profile entries will now be obeyed by send, rcvdist, and whatnow. +- New format instructions %(putlit) and %(concataddr) have been implemented. diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 8368728..f643421 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -5,6 +5,38 @@ * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. + * + * This code compiles the format strings (documented in mh-format(5)) into + * an internal form to be later processed by fmt_scan.c. + * + * What happens here is that the format strings are parsed and an array + * of struct format structures are returned. Each format structure is + * a single operation interpreted by the the routines in fmt_scan.c. + * + * There is a NOT a one-to-one correspondence between format strings and + * format instructions; some functions have side effects that can result + * in multiple instructions being generated. The exact list of instructions + * generated by a format string can be seem with the nmh fmtdump utility. + * + * A list of format instructions can be found in fmt_compile.h. + * + * If you wish to add a new function, you will need to do the following + * things: + * + * - Add a new instruction to the list of instructions in fmt_compile.h. + * Note that test instructions (starting with FT_IF_S_NULL) have special + * handling, so if you are NOT writing a test function then you need + * to insert it into the list before that _and_ bump all of the + * following instruction numbers. + * + * - Add the function name to the functable[] array below, and write any + * special code that your function may require in terms of parsing + * (it very well may not need anything). + * + * - Add the code in fmt_scan.c to handle your new function. + * + * - Document the new function in the mh-format(5) man page. + * */ #include @@ -51,6 +83,31 @@ extern struct mailname fmt_mnull; #defineTFL_PUTS 1/* implicit putstr if top level */ #defineTFL_PUTN 2/* implicit putnum if top level */ +/* + * The functable array maps between the text names of format functions and + * the format instructions interpreted by the engine in fmt_scan.c. + * + * The elements of this structure are as follows: + * + * name - The name of the function as seen in the format string. This is + * what maps a particular function name into a format instruction. + * type - The type of argument this function expects. Those types are + * listed above (with the TF_ prefix). This affects what gets + * placed in the format instruction (the f_un union). + * f_type - The instruction corresponding to this function (from the list + * in fmt_compile.h). + * extra - Used by some functions to provide extra data to the compiler. + * Uses include: + * - Providing an alternate instruction to combine a load + * and test operation (see do_if()). + * - Passed in f_value in the format instruction to provide + * extra information for the engine (see FT_LV_DAT handling + * in fmt_scan.c). + * - Provide a hint as to preprocessing that is required for + * this instruction (see do_name()). + * flags - See the defi
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. e9503b88ca04e265a27d8425f9fdcb2c877500f3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via e9503b88ca04e265a27d8425f9fdcb2c877500f3 (commit) via 7ba29497ff3f164e2a507eda35e81f1cb0658c74 (commit) from 4548981fb45fbc917cc2c26b7c96b31cfa14bc9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e9503b88ca04e265a27d8425f9fdcb2c877500f3 commit e9503b88ca04e265a27d8425f9fdcb2c877500f3 Author: Ken Hornstein Date: Tue Jan 17 10:58:40 2012 -0500 Update .gitignore with .DS_Store (seen occasionally on MacOS X systems). diff --git a/.gitignore b/.gitignore index 8cf8b22..db2e5c0 100644 --- a/.gitignore +++ b/.gitignore @@ -81,4 +81,5 @@ *.5 *.8 a.out.DSYM +.DS_Store RPM/ http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=7ba29497ff3f164e2a507eda35e81f1cb0658c74 commit 7ba29497ff3f164e2a507eda35e81f1cb0658c74 Author: Ken Hornstein Date: Tue Jan 17 10:57:54 2012 -0500 Convert from utmp functions to utmpx functions (which are in POSIX). diff --git a/configure.ac b/configure.ac index 3491f96..18b4ab3 100644 --- a/configure.ac +++ b/configure.ac @@ -510,7 +510,7 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, dnl --- dnl CHECK FUNCTIONS dnl --- -AC_CHECK_FUNCS(writev lstat getutent nl_langinfo) +AC_CHECK_FUNCS(writev lstat nl_langinfo) dnl Check for multibyte character set support if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = "xyes" \ @@ -767,8 +767,6 @@ dnl dnl CHECK STRUCTURES dnl -AC_CHECK_MEMBERS(struct utmp.ut_type,,,[#include ]) - AC_STRUCT_DIRENT_D_TYPE dnl Where is located? Needed as input for signames.awk diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 1ae8576..8e659ff 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -22,17 +22,7 @@ #include #include -#include - -#ifndef HAVE_GETUTENT -# ifndef UTMP_FILE -# ifdef _PATH_UTMP -# define UTMP_FILE _PATH_UTMP -# else -# define UTMP_FILE "/etc/utmp" -# endif -# endif -#endif +#include #defineSCANFMT \ "%2(hour{dtimenow}):%02(min{dtimenow}): %<(size)%5(size) %>%<{encrypted}E%>\ @@ -91,13 +81,7 @@ main (int argc, char **argv) int md, vecp = 0; char *cp, *user, buf[BUFSIZ], tty[BUFSIZ]; char **argp, **arguments, *vec[MAXARGS]; -#ifdef HAVE_GETUTENT -struct utmp * utp; -#else -struct utmp ut; -register FILE *uf; -#endif - +struct utmpx *utp; #ifdef LOCALE setlocale(LC_ALL, ""); #endif @@ -172,33 +156,16 @@ main (int argc, char **argv) user = getusername(); -#ifdef HAVE_GETUTENT -setutent(); -while ((utp = getutent()) != NULL) { -if ( -#ifdef HAVE_STRUCT_UTMP_UT_TYPE - utp->ut_type == USER_PROCESS - && -#endif - utp->ut_name[0] != 0 +setutxent(); +while ((utp = getutxent()) != NULL) { +if (utp->ut_type == USER_PROCESS && utp->ut_user[0] != 0 && utp->ut_line[0] != 0 - && strncmp (user, utp->ut_name, sizeof(utp->ut_name)) == 0) { + && strncmp (user, utp->ut_user, sizeof(utp->ut_user)) == 0) { strncpy (tty, utp->ut_line, sizeof(utp->ut_line)); alert (tty, md); } } -endutent(); -#else -if ((uf = fopen (UTMP_FILE, "r")) == NULL) - exit (RCV_MBX); -while (fread ((char *) &ut, sizeof(ut), 1, uf) == 1) - if (ut.ut_name[0] != 0 - && strncmp (user, ut.ut_name, sizeof(ut.ut_name)) == 0) { - strncpy (tty, ut.ut_line, sizeof(ut.ut_line)); - alert (tty, md); - } -fclose (uf); -#endif +endutxent(); exit (RCV_MOK); return 0; /* dead code to satisfy the compiler */ diff --git a/uip/slocal.c b/uip/slocal.c index d701e78..5026d82 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -51,17 +51,7 @@ #include NDBM_HEADER #endif -#include - -#ifndef HAVE_GETUTENT -# ifndef UTMP_FILE -# ifdef _PATH_UTMP -# define UTMP_FILE _PATH_UTMP -# else -# define UTMP_FILE "/etc/utmp" -# endif -# endif -#endif +#include static struct swit switches[] = { #defineADDRSW 0 @@ -937,62 +927,29 @@ lookup (struct pair *pairs, char *key) * logged in. */ -#ifdef HAVE_GETUTENT static int logged_in (void) { -struct utmp * utp; +struct utmpx *utp; if (utmped) return utmped; -setutent(); +setutxent(); -w
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. ea753f01343768ef27bd27d5eca987a602e3949e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via ea753f01343768ef27bd27d5eca987a602e3949e (commit) via 2daf28cdb048aa7276f05e19980b0a818e82fcf1 (commit) from e9503b88ca04e265a27d8425f9fdcb2c877500f3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ea753f01343768ef27bd27d5eca987a602e3949e commit ea753f01343768ef27bd27d5eca987a602e3949e Author: Ken Hornstein Date: Tue Jan 17 14:27:06 2012 -0500 Convert from our use of aclocal.m4 to a subdirectory with autoconf macros in it. diff --git a/.gitignore b/.gitignore index db2e5c0..5d5d4db 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ /uip/whatnow /uip/whom /nmh-*.tar.gz +/aclocal.m4 *.o *.1 *.5 diff --git a/Makefile.in b/Makefile.in index 8bb2b40..753cb5e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -74,7 +74,7 @@ INSTALL_DATA= @INSTALL_DATA@ # all files in this directory included in the distribution DIST = ChangeLog COPYRIGHT DATE INSTALL MACHINES README VERSION \ - ChangeLog install-sh mkinstalldirs Makefile.in aclocal.m4 \ + ChangeLog install-sh mkinstalldirs Makefile.in \ config.h.in configure.ac configure stamp-h.in \ config.sub config.guess @@ -145,7 +145,7 @@ Makefile: Makefile.in config.status config.status: configure VERSION ./config.status --recheck -configure: configure.ac aclocal.m4 +configure: configure.ac cd $(srcdir) && autoconf config.h: stamp-h @@ -153,7 +153,7 @@ stamp-h: config.h.in config.status ./config.status config.h stamp config.h.in: stamp-h.in -stamp-h.in: configure.ac aclocal.m4 +stamp-h.in: configure.ac cd $(srcdir) && autoheader date > $@ diff --git a/autogen.sh b/autogen.sh index 71a2912..fd544c2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -5,5 +5,6 @@ # building from a distributed tarball. set -e +aclocal -I m4 autoreconf date > stamp-h.in diff --git a/configure.ac b/configure.ac index 741d69f..4f3d260 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ dnl - dnl define a macro or two dnl - -AC_DEFUN(NMH_PROG_GNU_LIBTOOL, [ +AC_DEFUN([NMH_PROG_GNU_LIBTOOL], [ if test -n "$LIBTOOL" ; then tmptest=`$LIBTOOL --version 2>&1 | grep GNU` if test x"$tmptest" != x ; then diff --git a/aclocal.m4 b/m4/ndbm.m4 similarity index 83% rename from aclocal.m4 rename to m4/ndbm.m4 index e76b93f..afe62ca 100644 --- a/aclocal.m4 +++ b/m4/ndbm.m4 @@ -1,15 +1,3 @@ - -# -# Updated for more modern systems. Check to see if we need to link against -# optional libraries for networking functions. -# - -AC_DEFUN([NMH_CHECK_NETLIBS], -[AC_SEARCH_LIBS([gethostbyname], [nsl], , - [AC_MSG_ERROR([gethostbyname not found])]) - AC_SEARCH_LIBS([connect], [socket], , [AC_MSG_ERROR([connect not found])]) -])dnl - dnl -- dnl CHECK FOR NDBM dnl -- @@ -41,7 +29,7 @@ dnl done AC_PROG_CC or something that implies it before dnl using this macro autoconf complains about a recursive dnl expansion. -AC_DEFUN(NMH_CHECK_NDBM, +AC_DEFUN([NMH_CHECK_NDBM], [ if test "x$2" = "x"; then nmh_libs= diff --git a/m4/netlibs.m4 b/m4/netlibs.m4 new file mode 100644 index 000..8b55688 --- /dev/null +++ b/m4/netlibs.m4 @@ -0,0 +1,10 @@ +dnl +dnl Updated for more modern systems. Check to see if we need to link against +dnl optional libraries for networking functions. +dnl + +AC_DEFUN([NMH_CHECK_NETLIBS], +[AC_SEARCH_LIBS([gethostbyname], [nsl], , + [AC_MSG_ERROR([gethostbyname not found])]) + AC_SEARCH_LIBS([connect], [socket], , [AC_MSG_ERROR([connect not found])]) +])dnl http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2daf28cdb048aa7276f05e19980b0a818e82fcf1 commit 2daf28cdb048aa7276f05e19980b0a818e82fcf1 Author: Ken Hornstein Date: Tue Jan 17 14:15:32 2012 -0500 Change the name of AC_CHECK_NETLIBS, since it's not a macro distributed by Autoconf. diff --git a/aclocal.m4 b/aclocal.m4 index a7e5447..e76b93f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -4,7 +4,7 @@ # optional libraries for networking functions. # -AC_DEFUN([AC_CHECK_NETLIBS], +AC_DEFUN([NMH_CHECK_NETLIBS], [AC_SEARCH_LIBS([gethostbyname], [nsl], , [AC_MSG_ERROR([gethostbyname not found])]) AC_SEARCH_LIBS([connect], [socket], , [AC_MSG_ERROR([connect not found])]) diff --git a/configure.ac b/configure.ac index 18b4ab3..741d69f 100644 --- a/configure.ac +++ b/configure.ac @@ -526,7 +526,
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 07e7ce5969d56152bb7ea9d31ebe0695d6535377
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 07e7ce5969d56152bb7ea9d31ebe0695d6535377 (commit) from da04deaf832ac32974a5bb9499a0ba8321eaf86b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=07e7ce5969d56152bb7ea9d31ebe0695d6535377 commit 07e7ce5969d56152bb7ea9d31ebe0695d6535377 Author: Ken Hornstein Date: Fri Jan 20 23:39:14 2012 -0500 Fix some problems that the Automake migration caused. diff --git a/.gitignore b/.gitignore index 59bd997..cda14f2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ /Makefile.in /stamp-h1 /config/version.c -/config/libmhconfig.a /depcomp /docs/Makefile /etc/mhn.defaults diff --git a/Makefile.am b/Makefile.am index 4972b3b..a3097e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ ACLOCAL_AMFLAGS = -I m4 ## LDADD is included in the program-specific LDADD since we want to add ## to this list of libraries, not replace it. ## -LDADD = config/libmhconfig.a sbr/libmh.a +LDADD = sbr/libmh.a ## ## These are used to create the default mhn.defaults config file @@ -67,7 +67,7 @@ auxexec_PROGRAMS = uip/ap uip/conflict uip/dp uip/fmtdump uip/mhl uip/post \ ## Internal libraries that we don't create as part of the build process ## but do not install ## -noinst_LIBRARIES = config/libmhconfig.a sbr/libmh.a mts/libmts.a +noinst_LIBRARIES = sbr/libmh.a mts/libmts.a ## ## These are all of our header files. Right now we don't install any of @@ -286,10 +286,10 @@ uip_mhl_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) uip_mhtest_SOURCES = uip/mhtest.c uip/mhparse.c uip/mhcachesbr.c \ uip/mhoutsbr.c uip/mhmisc.c uip/mhfree.c \ uip/termsbr.c uip/md5.c -uip_mhtest_LDFLAGS = $(LDADD) $(TERMLIB) +uip_mhtest_LDADD = $(LDADD) $(TERMLIB) uip_post_SOURCES = uip/post.c uip/aliasbr.c -uip_post_LDFLAGS = $(LDADD) mts/libmts.a $(SASLLIB) +uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB) uip_rcvdist_SOURCES = uip/rcvdist.c uip/distsbr.c uip_rcvdist_LDADD = $(LDADD) $(ICONVLIB) @@ -302,6 +302,7 @@ uip_rcvtty_SOURCES = uip/rcvtty.c uip/scansbr.c uip/termsbr.c uip_rcvtty_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) uip_slocal_SOURCES = uip/slocal.c uip/aliasbr.c uip/dropsbr.c +uip_slocal_LDADD = $(LDADD) $(NDBM_LIBS) uip_spost_SOURCES = uip/spost.c uip/aliasbr.c @@ -321,7 +322,7 @@ etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile rm -f $@ $(SED) -e 's,%mts%,$(MTS),' \ -e 's,%mailspool%,$(mailspool),' \ - -e 's,%etcdir%,$(etcdir),' \ + -e 's,%etcdir%,$(sysconfdir),' \ -e 's,%masquerade%,$(masquerade),' \ -e 's,%smtpservers%,$(smtpservers),' \ < $(srcdir)/etc/mts.conf.in > $@ @@ -354,10 +355,12 @@ install-exec-hook: ln $(DESTDIR)/$(bindir)/show$(EXEEXT) $(DESTDIR)/$(bindir)/prev$(EXEEXT) ln $(DESTDIR)/$(bindir)/show$(EXEEXT) $(DESTDIR)/$(bindir)/next$(EXEEXT) +install-data-hook: + ln $(DESTDIR)/$(man5dir)/mh-profile.5 $(DESTDIR)/$(man5dir)/mh_profile.5 ## ## Make sure we remove those links at uninstall time ## -uninstall-local: +uninstall-hook: rm -f $(DESTDIR)/$(bindir)/flists$(EXEEXT) rm -f $(DESTDIR)/$(bindir)/folders$(EXEEXT) rm -f $(DESTDIR)/$(bindir)/fnext$(EXEEXT) @@ -365,11 +368,10 @@ uninstall-local: rm -f $(DESTDIR)/$(bindir)/unseen$(EXEEXT) rm -f $(DESTDIR)/$(bindir)/prev$(EXEEXT) rm -f $(DESTDIR)/$(bindir)/next$(EXEEXT) + rm -f $(DESTDIR)/$(man5dir)/mh_profile.5 ## -## Our rules to build our internal libraries (libmh.a, libmhconfig.a, libmts.a) -## No, I'm not quite sure why the first two aren't simply combined into one -## library. Maybe in the future. +## Our rules to build our internal libraries (libmh.a, libmts.a) ## sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/brkstring.c \ sbr/check_charset.c sbr/client.c sbr/closefds.c \ @@ -403,19 +405,17 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/brkstring.c \ sbr/snprintb.c sbr/ssequal.c sbr/strcasecmp.c \ sbr/strindex.c sbr/trimcpy.c sbr/uprf.c sbr/vfgets.c \ sbr/fmt_def.c sbr/m_msgdef.c sbr/mf.c sbr/utils.c \ - sbr/m_mktemp.c + sbr/m_mktemp.c config/config.c config/version.c sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(sysconfdir)"
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 16e8854330e53d608f4db3b26544fdcf7d75f6e7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 16e8854330e53d608f4db3b26544fdcf7d75f6e7 (commit) via e60b2e239644475065e6ab6ac65776ed9370bffd (commit) via c17fbc69c337402f9f98ce9c7fe4268c8f070d0c (commit) from 07e7ce5969d56152bb7ea9d31ebe0695d6535377 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=16e8854330e53d608f4db3b26544fdcf7d75f6e7 commit 16e8854330e53d608f4db3b26544fdcf7d75f6e7 Author: Ken Hornstein Date: Sun Jan 22 01:15:40 2012 -0500 Make sigmsg.h NOT depend on the Makefile. diff --git a/Makefile.am b/Makefile.am index 0045f70..0799555 100644 --- a/Makefile.am +++ b/Makefile.am @@ -315,7 +315,7 @@ uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/mhoutsbr.c uip/sendsbr.c \ config/version.c: Makefile sh $(srcdir)/config/version.sh $(VERSION) > $@ -sbr/sigmsg.h: Makefile $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) +sbr/sigmsg.h: $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) $(AWK) -f $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) > $@ etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e60b2e239644475065e6ab6ac65776ed9370bffd commit e60b2e239644475065e6ab6ac65776ed9370bffd Author: Ken Hornstein Date: Sun Jan 22 01:14:34 2012 -0500 Clean up DESTDIR usage. diff --git a/Makefile.am b/Makefile.am index 91e6739..0045f70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -340,20 +340,20 @@ etc/sendfiles: $(srcdir)/etc/sendfiles.in Makefile ## between different programs. ## install-exec-hook: - rm -f $(DESTDIR)/$(bindir)/flists$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/folders$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/fnext$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/fprev$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/unseen$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/prev$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/next$(EXEEXT) - ln $(DESTDIR)/$(bindir)/flist$(EXEEXT) $(DESTDIR)/$(bindir)/flists$(EXEEXT) - ln $(DESTDIR)/$(bindir)/folder$(EXEEXT) $(DESTDIR)/$(bindir)/folders$(EXEEXT) - ln $(DESTDIR)/$(bindir)/new$(EXEEXT) $(DESTDIR)/$(bindir)/fnext$(EXEEXT) - ln $(DESTDIR)/$(bindir)/new$(EXEEXT) $(DESTDIR)/$(bindir)/fprev$(EXEEXT) - ln $(DESTDIR)/$(bindir)/new$(EXEEXT) $(DESTDIR)/$(bindir)/unseen$(EXEEXT) - ln $(DESTDIR)/$(bindir)/show$(EXEEXT) $(DESTDIR)/$(bindir)/prev$(EXEEXT) - ln $(DESTDIR)/$(bindir)/show$(EXEEXT) $(DESTDIR)/$(bindir)/next$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/next$(EXEEXT) + ln $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT) + ln $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT) + ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT) + ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT) + ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT) + ln $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT) + ln $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT) if test x$(SETGID_MAIL) != x; then \ chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT); \ chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \ @@ -365,14 +365,14 @@ install-data-hook: ## Make sure we remove those links at uninstall time ## uninstall-hook: - rm -f $(DESTDIR)/$(bindir)/flists$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/folders$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/fnext$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/fprev$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/unseen$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/prev$(EXEEXT) - rm -f $(DESTDIR)/$(bindir)/next$(EXEEXT) - rm -f $(DESTDIR)/$(man5dir)/mh_profile.5 + rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT) + rm -f $(DESTDIR)$(bindir)/next$(EXEEXT) + rm -f $(DESTDIR)$(man5dir)/mh_profile.5 ## ## Our rules to build our internal libraries (libmh.a, libmts.a) http://git.savannah.gnu.org/cgi
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 8a47223f0be8c6ef74209339d69440f2f72bb152
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 8a47223f0be8c6ef74209339d69440f2f72bb152 (commit) from 29a3e9f413c20e96891fabb90208096ebc101afb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=8a47223f0be8c6ef74209339d69440f2f72bb152 commit 8a47223f0be8c6ef74209339d69440f2f72bb152 Author: Ken Hornstein Date: Tue Jan 24 12:56:45 2012 -0500 Create a "cscope" target that creates the necessary files to use cscope. diff --git a/.gitignore b/.gitignore index 03b9be3..f00adc1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /config.log /config.status /configure +/cscope.files /cscope.out /Makefile /Makefile.in diff --git a/Makefile.am b/Makefile.am index 0799555..9e43b59 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,6 +37,11 @@ CLEANFILES = config/version.c sbr/sigmsg.h etc/mts.conf etc/sendfiles \ etc/mhn.defaults man/man.sed $(man_MANS) ## +## Stuff that should be cleaned via "make maintainer-clean" +## +MAINTAINERCLEANFILES = cscope.files cscope.out + +## ## Files that need to be built before everything else ## BUILT_SOURCES = sbr/sigmsg.h @@ -486,3 +491,11 @@ rpm: $(DIST_ARCHIVES) @rpmbuild --define '_topdir $(rpmdir)' \ --define '_tmppath %{_topdir}/TMP' \ -ba $(rpmdir)/SPECS/nmh.spec + +## +## A target to build information needed by cscope +## + +cscope: + echo "-I $(srcdir)/h -I $(srcdir)/sbr -I $(srcdir)/uip -I $(srcdir)/mts/smtp" > cscope.files + find $(srcdir) \( -name \*.c -o -name \*.l \) -print | grep -v dtimep.c >> cscope.files diff --git a/cscope.files b/cscope.files deleted file mode 100644 index d324c50..000 --- a/cscope.files +++ /dev/null @@ -1,176 +0,0 @@ --I h -I sbr -I uip -I mts/smtp -config/config.c -mts/smtp/hosts.c -mts/smtp/smtp.c -sbr/addrsbr.c -sbr/ambigsw.c -sbr/atooi.c -sbr/brkstring.c -sbr/check_charset.c -sbr/client.c -sbr/closefds.c -sbr/concat.c -sbr/context_del.c -sbr/context_find.c -sbr/context_foil.c -sbr/context_read.c -sbr/context_replace.c -sbr/context_save.c -sbr/copy.c -sbr/copyip.c -sbr/cpydata.c -sbr/cpydgst.c -sbr/crawl_folders.c -sbr/discard.c -sbr/done.c -sbr/dtime.c -sbr/dtimep.l -sbr/error.c -sbr/ext_hook.c -sbr/fdcompare.c -sbr/fmt_addr.c -sbr/fmt_compile.c -sbr/fmt_def.c -sbr/fmt_new.c -sbr/fmt_rfc2047.c -sbr/fmt_scan.c -sbr/folder_addmsg.c -sbr/folder_delmsgs.c -sbr/folder_free.c -sbr/folder_pack.c -sbr/folder_read.c -sbr/folder_realloc.c -sbr/gans.c -sbr/getans.c -sbr/getanswer.c -sbr/getarguments.c -sbr/getcpy.c -sbr/getfolder.c -sbr/getpass.c -sbr/lock_file.c -sbr/m_atoi.c -sbr/m_backup.c -sbr/m_convert.c -sbr/m_draft.c -sbr/m_getfld.c -sbr/m_gmprot.c -sbr/m_maildir.c -sbr/m_mktemp.c -sbr/m_msgdef.c -sbr/m_name.c -sbr/m_setjmp.c -sbr/makedir.c -sbr/mf.c -sbr/mts.c -sbr/norm_charmap.c -sbr/path.c -sbr/peekc.c -sbr/pidstatus.c -sbr/pidwait.c -sbr/print_help.c -sbr/print_sw.c -sbr/print_version.c -sbr/push.c -sbr/putenv.c -sbr/r1bindex.c -sbr/readconfig.c -sbr/refile.c -sbr/remdir.c -sbr/ruserpass.c -sbr/seq_add.c -sbr/seq_bits.c -sbr/seq_del.c -sbr/seq_getnum.c -sbr/seq_list.c -sbr/seq_nameok.c -sbr/seq_print.c -sbr/seq_read.c -sbr/seq_save.c -sbr/seq_setcur.c -sbr/seq_setprev.c -sbr/seq_setunseen.c -sbr/showfile.c -sbr/signals.c -sbr/smatch.c -sbr/snprintb.c -sbr/ssequal.c -sbr/strcasecmp.c -sbr/strindex.c -sbr/trimcpy.c -sbr/uprf.c -sbr/utils.c -sbr/vfgets.c -uip/ali.c -uip/aliasbr.c -uip/anno.c -uip/annosbr.c -uip/ap.c -uip/burst.c -uip/comp.c -uip/conflict.c -uip/dist.c -uip/distsbr.c -uip/dp.c -uip/dropsbr.c -uip/flist.c -uip/fmtdump.c -uip/folder.c -uip/forw.c -uip/inc.c -uip/install-mh.c -uip/mark.c -uip/md5.c -uip/mhbuild.c -uip/mhbuildsbr.c -uip/mhcachesbr.c -uip/mhfree.c -uip/mhl.c -uip/mhlist.c -uip/mhlistsbr.c -uip/mhlsbr.c -uip/mhmail.c -uip/mhmisc.c -uip/mhn.c -uip/mhoutsbr.c -uip/mhparam.c -uip/mhparse.c -uip/mhpath.c -uip/mhshow.c -uip/mhshowsbr.c -uip/mhstore.c -uip/mhstoresbr.c -uip/mhtest.c -uip/msgchk.c -uip/msh.c -uip/mshcmds.c -uip/new.c -uip/packf.c -uip/pick.c -uip/picksbr.c -uip/popsbr.c -uip/post.c -uip/prompter.c -uip/rcvdist.c -uip/rcvpack.c -uip/rcvstore.c -uip/rcvtty.c -uip/refile.c -uip/repl.c -uip/replsbr.c -uip/rmf.c -uip/rmm.c -uip/scan.c -uip/scansbr.c -uip/send.c -uip/sendsbr.c -uip/show.c -uip/slocal.c -uip/sortm.c -uip/spost.c -uip/termsbr.c -uip/viamail.c -uip/vmhsbr.c -uip/whatnow.c -uip/whatnowproc.c -uip/whatnowsbr.c -uip/whom.c --- Summary of changes:
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 5dded84775cbfdef4e84f7c61c340ba15c0dcdaf
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 5dded84775cbfdef4e84f7c61c340ba15c0dcdaf (commit) via 77a8a873bf6678bc2c36a5839da714c5620683b6 (commit) via 7e5bac1a416e400bd3c8941b1c312577f2d9e9e4 (commit) from 7d83ecc430f4b3bf3830e16efe5d13cc0a00345d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=5dded84775cbfdef4e84f7c61c340ba15c0dcdaf commit 5dded84775cbfdef4e84f7c61c340ba15c0dcdaf Author: Ken Hornstein Date: Fri Jan 27 13:47:14 2012 -0500 Fix long-standing problem with getans(); handle the case if we get an interrupted by a signal during a character read and return an EINTR. diff --git a/sbr/getans.c b/sbr/getans.c index 682a3b1..9c10fd3 100644 --- a/sbr/getans.c +++ b/sbr/getans.c @@ -11,6 +11,7 @@ #include #include #include +#include static char ansbuf[BUFSIZ]; static sigjmp_buf sigenv; @@ -32,7 +33,6 @@ getans (char *prompt, struct swit *ansp) istat = SIGNAL (SIGINT, intrser); } else { SIGNAL (SIGINT, istat); - printf("returning NULL\n"); return NULL; } @@ -42,8 +42,34 @@ getans (char *prompt, struct swit *ansp) cp = ansbuf; while ((i = getchar ()) != '\n') { if (i == EOF) { - printf("Got EOF\n"); - siglongjmp (sigenv, 1); + /* +* If we get an EOF, return +*/ + if (feof(stdin)) + siglongjmp (sigenv, 1); + + /* +* For errors, if we get an EINTR that means that we got +* a signal and we should retry. If we get another error, +* then just return. +*/ + + else if (ferror(stdin)) { + if (errno == EINTR) { + clearerr(stdin); + continue; + } + fprintf(stderr, "\nError %s during read\n", + strerror(errno)); + siglongjmp (sigenv, 1); + } else { + /* +* Just for completeness's sake ... +*/ + + fprintf(stderr, "\nUnknown problem in getchar()\n"); + siglongjmp (sigenv, 1); + } } if (cp < &ansbuf[sizeof ansbuf - 1]) *cp++ = i; http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=77a8a873bf6678bc2c36a5839da714c5620683b6 commit 77a8a873bf6678bc2c36a5839da714c5620683b6 Author: Ken Hornstein Date: Fri Jan 27 13:34:17 2012 -0500 Convert to the use of siglongjmp() diff --git a/sbr/getans.c b/sbr/getans.c index 95e34c4..682a3b1 100644 --- a/sbr/getans.c +++ b/sbr/getans.c @@ -13,7 +13,7 @@ #include static char ansbuf[BUFSIZ]; -static jmp_buf sigenv; +static sigjmp_buf sigenv; /* * static prototypes @@ -28,10 +28,11 @@ getans (char *prompt, struct swit *ansp) SIGNAL_HANDLER istat = NULL; char *cp, **cpp; -if (!(m_setjmp (sigenv))) { +if (!(sigsetjmp(sigenv, 1))) { istat = SIGNAL (SIGINT, intrser); } else { SIGNAL (SIGINT, istat); + printf("returning NULL\n"); return NULL; } @@ -40,8 +41,10 @@ getans (char *prompt, struct swit *ansp) fflush (stdout); cp = ansbuf; while ((i = getchar ()) != '\n') { - if (i == EOF) - longjmp (sigenv, 1); + if (i == EOF) { + printf("Got EOF\n"); + siglongjmp (sigenv, 1); + } if (cp < &ansbuf[sizeof ansbuf - 1]) *cp++ = i; } @@ -75,5 +78,5 @@ intrser (int i) /* * should this be siglongjmp? */ -longjmp (sigenv, 1); +siglongjmp (sigenv, 1); } http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=7e5bac1a416e400bd3c8941b1c312577f2d9e9e4 commit 7e5bac1a416e400bd3c8941b1c312577f2d9e9e4 Author: Ken Hornstein Date: Fri Jan 27 12:30:52 2012 -0500 Make POP support always be turned on. diff --git a/Makefile.am b/Makefile.am index 65fd867..9d10a03 100644 --- a/Makefile.am +++ b/Makefile.am @@ -188,10 +188,8 @@ uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c uip_forw_LDADD = $(LDADD) $(ICONVLIB) -uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c -if POP_SUPPORT -uip_inc_SOURCES += uip/popsbr.c -
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 0d66f3e510572d738a78343d672789cf16419eb1
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 0d66f3e510572d738a78343d672789cf16419eb1 (commit) from b347bb6f1897eb70aac91193ce8acba20c87a505 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=0d66f3e510572d738a78343d672789cf16419eb1 commit 0d66f3e510572d738a78343d672789cf16419eb1 Author: Ken Hornstein Date: Sat Jan 28 00:29:13 2012 -0500 Create "nowrap" flag to turn off all line wrapping. diff --git a/man/mhl.man b/man/mhl.man index f8546c3..cc62b7c 100644 --- a/man/mhl.man +++ b/man/mhl.man @@ -235,6 +235,8 @@ leftadjust flagstrip off leading whitespace on each noleftadjust flagdon't leftadjust compress flagchange newlines in text to spaces nocompress flagdon't compress +wrap flagWrap lines that exceed width (default) +nowrap flagDo not perform line wrapping split flagdon't combine multiple fields into a single field nosplitflagcombine multiple fields into diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 6335463..5f355ab 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -109,8 +109,9 @@ static struct swit mhlswitches[] = { #defineFACEDFLT0x008000/* default for face */ #defineSPLIT 0x01/* split headers (don't concatenate) */ #defineNONEWLINE 0x02/* don't write trailing newline */ -#defineLBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT\022NONEWLINE" -#defineGFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS | SPLIT) +#define NOWRAP 0x04 /* Don't wrap lines ever */ +#defineLBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT\022NONEWLINE\023NOWRAP" +#defineGFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS | SPLIT | NOWRAP) struct mcomp { char *c_name; /* component name */ @@ -192,6 +193,8 @@ static struct triple triples[] = { { "datefield", DATEFMT, ADDRFMT }, { "newline", 0, NONEWLINE }, { "nonewline", NONEWLINE, 0 }, +{ "wrap", 0, NOWRAP }, +{ "nowrap",NOWRAP, 0 }, { NULL,0, 0 } }; @@ -269,8 +272,8 @@ static struct mcomp *add_queue (struct mcomp **, struct mcomp **, char *, char * static void free_queue (struct mcomp **, struct mcomp **); static void putcomp (struct mcomp *, struct mcomp *, int); static char *oneline (char *, long); -static void putstr (char *); -static void putch (char); +static void putstr (char *, long); +static void putch (char, long); static void intrser (int); static void pipeser (int); static void quitser (int); @@ -1199,8 +1202,8 @@ putcomp (struct mcomp *c1, struct mcomp *c2, int flag) onelp = NULL; if (c1->c_flags & CLEARTEXT) { - putstr (c1->c_text); - putstr ("\n"); + putstr (c1->c_text, c1->c_flags); + putstr ("\n", c1->c_flags); return; } @@ -1233,9 +1236,9 @@ putcomp (struct mcomp *c1, struct mcomp *c2, int flag) for (cp = (c1->c_text ? c1->c_text : c1->c_name); *cp; cp++) if (islower (*cp)) *cp = toupper (*cp); - putstr (c1->c_text ? c1->c_text : c1->c_name); + putstr (c1->c_text ? c1->c_text : c1->c_name, c1->c_flags); if (flag != BODYCOMP) { - putstr (": "); + putstr (": ", c1->c_flags); if (!(c1->c_flags & SPLIT)) c1->c_flags |= HDROUTPUT; @@ -1243,7 +1246,7 @@ putcomp (struct mcomp *c1, struct mcomp *c2, int flag) if ((count = c1->c_cwidth - strlen (c1->c_text ? c1->c_text : c1->c_name) - 2) > 0) while (count--) - putstr (" "); + putstr (" ", c1->c_flags); } else c1->c_flags |= HDROUTPUT; /* for BODYCOMP */ @@ -1256,15 +1259,15 @@ putcomp (struct mcomp *c1, struct mcomp *c2, int flag) for (cp = c2->c_name; *
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 3e151103c954aad7871a197b438b8d79d557e07e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 3e151103c954aad7871a197b438b8d79d557e07e (commit) from 8a5ee47c4884d56e13a50c4d28d22559101e1510 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3e151103c954aad7871a197b438b8d79d557e07e commit 3e151103c954aad7871a197b438b8d79d557e07e Author: Ken Hornstein Date: Tue Jan 31 12:58:04 2012 -0500 Add support for calling an external format program inside of mhl. diff --git a/config/config.c b/config/config.c index 82d20b1..72896c2 100644 --- a/config/config.c +++ b/config/config.c @@ -194,6 +194,13 @@ char *faceproc = NULL; char *fileproc = nmhbindir (/refile); +/* + * This program is used to optionally format the bodies of messages by + * "mhl". + */ + +char *formatproc = NULL; + /* * This program is called to incorporate messages into a folder. */ diff --git a/h/mh.h b/h/mh.h index b0a841a..1f563b9 100644 --- a/h/mh.h +++ b/h/mh.h @@ -315,6 +315,7 @@ extern char *draft; extern char *faceproc; extern char *fileproc; extern char *foldprot; +extern char *formatproc; extern char *forwcomps; extern char *inbox; extern char *incproc; diff --git a/man/mhl.man b/man/mhl.man index cc62b7c..eff230f 100644 --- a/man/mhl.man +++ b/man/mhl.man @@ -250,6 +250,10 @@ decode flagdecode text as RFC-2047 encoded header field addrfield flagfield contains addresses datefield flagfield contains dates +format flagRun component through formatproc filter + (body only) +noformat flagDo not run component through + formatproc filter (default) .fi .RE .PP @@ -315,7 +319,24 @@ can be given a default format string for either address or date fields (but not both). To do this, on a global line specify: either the flag addrfield or datefield, along with the appropriate formatfield variable string. - +.PP +The \*(lqformat\*(rq flag specifies that this component will be run through +the filter program specified by the +.IR formatproc +profile entry. This filter program is expected to read data on standard +input and output data on standard output. Currently the \*(lqformat\*(rq +flag is only supported for the \(*lqbody\*(rq component. The component +name will be prefixed to the output +.IR after +the filter has been run. The expected use of this is to filter a message +body to create more pleasing text to use in a reply message. +A suggested filter to use for +.BR repl(1) +is as follows: +.PP +.RS 5 +body:component=">",overflowtext=">",overflowoffset=0,format,nowrap +.RE .SH FILES .fc ^ ~ .nf @@ -331,6 +352,8 @@ appropriate formatfield variable string. .ta 2.4i .ta \w'ExtraBigProfileName 'u ^moreproc:~^Program to use as interactive front\-end +^formatproc:~^Program to use as a filter for components that +^^have the \*(lqformat\*(rq flag set. .fi .SH "SEE ALSO" diff --git a/man/repl.man b/man/repl.man index acc1c76..f67cee7 100644 --- a/man/repl.man +++ b/man/repl.man @@ -303,6 +303,22 @@ This message filter file cites the Message-ID and author of the message being replied\-to, and then outputs each line of the body prefaced with the \*(lq>\*(rq character. .PP +You can also use an external format program to format the message body. +The format program is specified by the +.IR formatproc +profile entry, and is enabled by the \*(lqformat\(*rq flag. A message +filter using an external format program would look like this: +.PP +.RS 5 +.nf +body:component=\*(lq>\*(rq,\|nowrap,\|format +.fi +.RE +.PP +See the +.BR mhl(1) +documentation for more information. +.PP To use the MIME rules for encapsulation, specify the .B \-mime switch. diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 2a68019..7f30975 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -22,6 +22,7 @@ static struct procstr procs[] = { { "buildmimeproc", &buildmimeproc }, { "faceproc", &faceproc }, { "fileproc", &fileproc }, +{ "formatproc",&formatproc }, { "incproc", &incproc }, { "installproc", &installproc }, { "lproc", &lproc }, diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 5f355ab..1446c2a 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -15,6 +15,7 @@ #include #include #include +#include /* * MAJOR BUG: @@ -110,7 +111,8 @@ static struct swit mhlswitches[] = { #defineSPLIT 0x01/* spl
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. aaf31d46368bcf63f7ae4b0019ef09d098f98491
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via aaf31d46368bcf63f7ae4b0019ef09d098f98491 (commit) from 3e151103c954aad7871a197b438b8d79d557e07e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=aaf31d46368bcf63f7ae4b0019ef09d098f98491 commit aaf31d46368bcf63f7ae4b0019ef09d098f98491 Author: Ken Hornstein Date: Tue Jan 31 13:20:40 2012 -0500 Whoops, I need to make sure the buffer I pass to putcomp() is NULL-terminated. diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 1446c2a..a44413c 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -1949,7 +1949,8 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp) holder.c_text = buf; -while ((cc = read(fdoutput[0], buf, bufsz)) > 0) { +while ((cc = read(fdoutput[0], buf, bufsz - 1)) > 0) { + buf[cc] = '\0'; putcomp(c1, &holder, BODYCOMP); } --- Summary of changes: uip/mhlsbr.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 2a1a6bda2b5a7fd8fd79cdf60ee86a02c2d55107
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 2a1a6bda2b5a7fd8fd79cdf60ee86a02c2d55107 (commit) from e86388e2505cf502c3470f30b4234d3308c771a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2a1a6bda2b5a7fd8fd79cdf60ee86a02c2d55107 commit 2a1a6bda2b5a7fd8fd79cdf60ee86a02c2d55107 Author: Ken Hornstein Date: Thu Feb 2 22:13:57 2012 -0500 Move the eval statements inside of AC_CONFIG_COMMANDS_POST macro, otherwise the stuff we output might not be correct. diff --git a/configure.ac b/configure.ac index 6a75a38..ba848c3 100644 --- a/configure.ac +++ b/configure.ac @@ -733,6 +733,19 @@ nmh_cv_path_signal_h=$SIGNAL_H SIGNAL_H=$nmh_cv_path_signal_h AC_SUBST(SIGNAL_H)dnl +dnl +dnl Sigh, this is required because under the new world order autoconf has +dnl nothing to create in a few of the build directories when doing an object +dnl tree build. So make sure we created certain directories if they don't +dnl exist. +dnl + +AC_CONFIG_COMMANDS([build-directories], +[test -d etc || ${MKDIR_P} etc +test -d man || ${MKDIR_P} man]) + +AC_CONFIG_COMMANDS_POST([ + dnl These odd looking assignments are done to expand out unexpanded dnl variables in bindir et al (for instance mandir is '${datarootdir}/man', dnl but expanding that gives '${prefix}/share/man', so we need to expand @@ -746,18 +759,6 @@ eval "nmhlib=${libdir}"; eval "nmhlib=${nmhlib}" eval "nmhman=${mandir}"; eval "nmhman=${nmhman}" eval "nmhrpm=${nmhrpm}"; -dnl -dnl Sigh, this is required because under the new world order autoconf has -dnl nothing to create in a few of the build directories when doing an object -dnl tree build. So make sure we created certain directories if they don't -dnl exist. -dnl - -AC_CONFIG_COMMANDS([build-directories], -[test -d etc || ${MKDIR_P} etc -test -d man || ${MKDIR_P} man]) - -AC_CONFIG_COMMANDS_POST([ echo " nmh configuration - --- Summary of changes: configure.ac | 25 + 1 files changed, 13 insertions(+), 12 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 196f9810eda97012980606456d5a8b429501bd9d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 196f9810eda97012980606456d5a8b429501bd9d (commit) via 07808bdbf87f2caf032bfbe8f47fa6c1ab851332 (commit) via d2272611c4877d55e7159d45f8f7de4d8b66e5cd (commit) via 3d7026ec516097979e9e07ea1c868f31e930bff9 (commit) via 20638d1b033f5f083bef65d51a0a5ff6642c3069 (commit) from 2a1a6bda2b5a7fd8fd79cdf60ee86a02c2d55107 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=196f9810eda97012980606456d5a8b429501bd9d commit 196f9810eda97012980606456d5a8b429501bd9d Author: Ken Hornstein Date: Fri Feb 3 15:38:49 2012 -0500 Convert from the poorly-named and confusing adrsprintf() to getlocaladdr(). diff --git a/h/addrsbr.h b/h/addrsbr.h index a6c7a41..2611e5a 100644 --- a/h/addrsbr.h +++ b/h/addrsbr.h @@ -35,6 +35,6 @@ struct mailname { void mnfree(struct mailname *); int ismymbox(struct mailname *); char *getname(char *); -char *adrsprintf(char *, char *); +char *getlocaladdr(void); char *auxformat(struct mailname *, int); struct mailname *getm(char *, char *, int, int, char *); diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 7d1350e..07bc810 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -287,17 +287,20 @@ auxformat (struct mailname *mp, int extras) /* - * address specific "sprintf" + * This used to be adrsprintf() (where it would format an address for you + * given a username and a domain). But somewhere we got to the point where + * the only caller was post, and it only called it with both arguments NULL. + * So the function was renamed with a more sensible name. */ char * -adrsprintf (char *username, char *domain) +getlocaladdr(void) { int snprintf_return; +char*username, *domain; static char addr[BUFSIZ]; -if (username == NULL) - username = getusername(); +username = getusername(); if (username_extension_masquerading) { /* mts.conf contains "masquerade:[...]username_extension[...]", so tack @@ -324,8 +327,7 @@ adrsprintf (char *username, char *domain) return username; -if (domain == NULL) - domain = LocalName(); +domain = LocalName(); snprintf_return = snprintf (addr, sizeof(addr), "%s@%s", username, domain); diff --git a/uip/post.c b/uip/post.c index 2449d5f..dcd563b 100644 --- a/uip/post.c +++ b/uip/post.c @@ -868,7 +868,7 @@ start_headers (void) mygid = getgid (); time (&tclock); -strncpy (from, adrsprintf (NULL, NULL), sizeof(from)); +strncpy (from, getlocaladdr(), sizeof(from)); strncpy (myhost, LocalName (), sizeof(myhost)); for (cp = myhost; *cp; cp++) @@ -877,7 +877,7 @@ start_headers (void) if ((cp = getfullname ()) && *cp) { strncpy (sigbuf, cp, sizeof(sigbuf)); snprintf (signature, sizeof(signature), "%s <%s>", - sigbuf, adrsprintf (NULL, NULL)); + sigbuf, getlocaladdr()); if ((cp = getname (signature)) == NULL) adios (NULL, "getname () failed -- you lose extraordinarily big"); if ((mp = getm (cp, NULL, 0, AD_HOST, NULL)) == NULL) @@ -886,7 +886,7 @@ start_headers (void) while (getname ("")) continue; } else { - strncpy (signature, adrsprintf (NULL, NULL), sizeof(signature)); + strncpy (signature, getlocaladdr(), sizeof(signature)); } } http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=07808bdbf87f2caf032bfbe8f47fa6c1ab851332 commit 07808bdbf87f2caf032bfbe8f47fa6c1ab851332 Author: Ken Hornstein Date: Fri Feb 3 15:03:00 2012 -0500 Make the upload target phony. diff --git a/Makefile.am b/Makefile.am index e43f9bc..fc2e621 100644 --- a/Makefile.am +++ b/Makefile.am @@ -533,3 +533,4 @@ upload: dist fi @echo "Uploading to savannah" scp -p $(DIST_ARCHIVES)* $(SAVANNAH_USERNAME)@savannah.gnu.org:/releases/nmh +.PHONY: upload http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d2272611c4877d55e7159d45f8f7de4d8b66e5cd commit d2272611c4877d55e7159d45f8f7de4d8b66e5cd Author: Ken Hornstein Date: Fri Feb 3 15:01:50 2012 -0500 Beginnings of an upload Makefile target. diff --git a/Makefile.am b/Makefile.am index cd3c886..e43f9bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -173,11 +173,6 @@ EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \ ## overrides that are used to select different library options from the ## default. ## -## Note that a few prog
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 2645f808bdcc325e143a9c6300ff97b813e5429f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 2645f808bdcc325e143a9c6300ff97b813e5429f (commit) via f931795fd8973c1edb40a26ecf87dbe27f7a6148 (commit) from d1622b3fcf620fb6dbd1a8eeb46fd368e0e3d460 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2645f808bdcc325e143a9c6300ff97b813e5429f commit 2645f808bdcc325e143a9c6300ff97b813e5429f Author: Ken Hornstein Date: Sat Feb 4 00:11:27 2012 -0500 Whoops, used "buffer" when I meant "buf". diff --git a/sbr/mts.c b/sbr/mts.c index 451a9b2..939a8c7 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -267,7 +267,7 @@ LocalName (int flag) if (*localname && flag == 0) { strncpy (buf, localname, sizeof(buffer0)); } else { - memset(buffer, 0, sizeof(buffer0)); + memset(buf, 0, sizeof(buffer0)); /* first get our local name */ gethostname (buf, sizeof(buffer0) - 1); /* now fully qualify our name */ http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=f931795fd8973c1edb40a26ecf87dbe27f7a6148 commit f931795fd8973c1edb40a26ecf87dbe27f7a6148 Author: Ken Hornstein Date: Fri Feb 3 23:43:53 2012 -0500 Change LocalName() to take an argument (about whether or not to use local hostname versus entry in mts.conf). diff --git a/h/mts.h b/h/mts.h index 2d2aa95..a8d795f 100644 --- a/h/mts.h +++ b/h/mts.h @@ -6,7 +6,7 @@ /* * Local and UUCP Host Name */ -char *LocalName(void); +char *LocalName(int); char *SystemName(void); /* diff --git a/h/prototypes.h b/h/prototypes.h index 12124cd..11db40d 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -133,7 +133,7 @@ int strncasecmp (const char *s1, const char *s2, size_t n); * some prototypes for address parsing system * (others are in addrsbr.h) */ -char *LocalName(void); +char *LocalName(int); char *SystemName(void); char *OfficialName(char *); diff --git a/mts/smtp/hosts.c b/mts/smtp/hosts.c index 29ac6d8..94a22d5 100644 --- a/mts/smtp/hosts.c +++ b/mts/smtp/hosts.c @@ -48,8 +48,8 @@ OfficialName (char *name) *q = '\0'; q = site; -if (!mh_strcasecmp (LocalName(), site)) - return LocalName(); +if (!mh_strcasecmp (LocalName(1), site)) + return LocalName(1); memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index ee98dce..faca17a 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -216,7 +216,7 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose, if (clientname) { client = clientname; } else { - client = LocalName(); /* no clientname -> LocalName */ + client = LocalName(1); /* no clientname -> LocalName */ } } @@ -475,7 +475,7 @@ sendmail_init (char *client, char *server, int watch, int verbose, if (clientname) client = clientname; else - client = LocalName(); /* no clientname -> LocalName */ + client = LocalName(1); /* no clientname -> LocalName */ } /* diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 07bc810..8a468bb 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -145,7 +145,7 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) } if (dfhost == NULL) { - dfhost = LocalName (); + dfhost = LocalName (0); dftype = LOCALHOST; } @@ -202,10 +202,10 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) } if (wanthost == AD_NHST) - mp->m_type = !mh_strcasecmp (LocalName (), mp->m_host) + mp->m_type = !mh_strcasecmp (LocalName (0), mp->m_host) ? LOCALHOST : NETHOST; else - mp->m_type = mh_strcasecmp (LocalName(), mp->m_host) ? NETHOST : LOCALHOST; + mp->m_type = mh_strcasecmp (LocalName(0), mp->m_host) ? NETHOST : LOCALHOST; got_host: ; if (route) @@ -327,7 +327,7 @@ getlocaladdr(void) return username; -domain = LocalName(); +domain = LocalName(0); snprintf_return = snprintf (addr, sizeof(addr), "%s@%s", username, domain); @@ -419,7 +419,7 @@ ismymbox (struct mailname *np) switch (np->m_type) { case NETHOST: - len = strlen (cp = LocalName ()); + len = strlen (cp = LocalName (0)); if (!uprf (np->m_host, cp) || np->m_host[len] != '.') break; goto local_test; diff --git a/sbr/mts.c b/sb
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 0d86c4af58df9a6361d12bc25cdfba30c4983868
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 0d86c4af58df9a6361d12bc25cdfba30c4983868 (commit) from 318ee655d8080cbc1e8edc573ca91672659b2dee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=0d86c4af58df9a6361d12bc25cdfba30c4983868 commit 0d86c4af58df9a6361d12bc25cdfba30c4983868 Author: Ken Hornstein Date: Sun Feb 5 17:17:41 2012 -0500 Autoconf cleanup to suggested practice (AS_IF & AC_MSG_FAILURE). More to do. diff --git a/configure.ac b/configure.ac index cee74a8..70832a8 100644 --- a/configure.ac +++ b/configure.ac @@ -28,31 +28,25 @@ dnl Do you want to debug nmh? AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[enable nmh code debugging])) dnl The old redundant --enable-nmh-debug is deprecated and undocumented. -if test x"$enable_nmh_debug" = x"yes"; then - enable_debug=yes -fi +AS_IF([test x"$enable_nmh_debug" = x"yes"], [enable_debug=yes]) dnl Allow users to send email from addresses other than their default? AC_ARG_ENABLE(masquerade, AS_HELP_STRING([--enable-masquerade='draft_from mmailid username_extension'], [enable up to 3 types of address masquerading]), - [if test x"$enable_masquerade" = x"yes"; then -masquerade="draft_from mmailid username_extension" - else -masquerade="$enable_masquerade" - fi], [masquerade="draft_from mmailid username_extension"]) + [AS_IF([test x"$enable_masquerade" = x"yes"], +[masquerade="draft_from mmailid username_extension"], +[masquerade="$enable_masquerade"])], + [masquerade="draft_from mmailid username_extension"]) AC_SUBST(masquerade)dnl dnl Do you want to disable use of locale functions AH_TEMPLATE([LOCALE], [Undefine if you don't want locale features. By default this is defined.]) AC_ARG_ENABLE([locale], -AC_HELP_STRING([--disable-locale], [turn off locale features]), -[if test x$enableval = xyes; then - AC_DEFINE(LOCALE) -fi], -AC_DEFINE(LOCALE) -) + [AC_HELP_STRING([--disable-locale], [turn off locale features])], + [AS_IF([test x$enableval = xyes], [AC_DEFINE(LOCALE)])], + [AC_DEFINE(LOCALE)]) dnl Do you want client-side support for using SASL for authentication? dnl Note that this code will be enabled for both POP and SMTP @@ -136,13 +130,9 @@ AC_ARG_WITH([mts], AS_HELP_STRING([--with-mts=@<:@smtp|sendmail@:>@], [specify the default mail transport agent/service])) -if test x"$with_mts" = x"smtp"; then - MTS="smtp" -elif test x"$with_mts" = x"sendmail"; then - MTS="sendmail" -else - MTS="smtp" -fi +AS_IF([test x"$with_mts" = x"smtp"], [MTS="smtp"], + [test x"$with_mts" = x"sendmail"], [MTS="sendmail"], + [MTS="smtp"]) AC_SUBST([MTS])dnl dnl Both the smtp and sendmail mail transport services use the smtp code @@ -161,11 +151,8 @@ dnl What should be the default mail server(s)? AC_ARG_WITH(smtpservers, AS_HELP_STRING([--with-smtpservers='SMTPSERVER1@<:@ SMTPSERVER2...@:>@'], [specify the default SMTP server(s) @<:@localhost@:>@])) -if test -n "$with_smtpservers"; then - smtpservers="$with_smtpservers" -else - smtpservers="localhost" -fi +AS_IF([test -n "$with_smtpservers"], [smtpservers="$with_smtpservers"], + [smtpservers="localhost"]) AC_SUBST([smtpservers])dnl dnl @@ -214,7 +201,7 @@ AC_CACHE_CHECK([whether compiler supports -Wno-pointer-sign], [nmh_cv_has_noptrs dnl if the user hasn't specified CFLAGS, then dnl if compiler is gcc, then -dnl use -O2 and some warning flags +dnluse -O2 and some warning flags dnl else use -O dnl We use -Wall and -Wextra if supported. If the compiler supports it we dnl also use -Wno-pointer-sign, because gcc 4 now produces a lot of new @@ -462,7 +449,7 @@ dnl --- dnl CHECK FOR LIBRARIES dnl --- dnl Check location of modf -AC_CHECK_FUNC(modf, , AC_CHECK_LIB(m, modf)) +AC_CHECK_FUNC([modf], , AC_CHECK_LIB([m], [modf])) dnl Checks for network libraries (nsl, socket) NMH_CHECK_NETLIBS @@ -472,11 +459,9 @@ for lib in $termcap_curses_order; do AC_CHECK_LIB(${lib}, tgetent, [TERMLIB="-l$lib"; break]) done AC_SUBST([TERMLIB])dnl -if test "x$TERMLIB&qu
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 0287c2e441fbc748cb11f96a5afd6dbdf68b0818
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 0287c2e441fbc748cb11f96a5afd6dbdf68b0818 (commit) via e6d71f88fe62d7508ccd1809cd7e822bbb116b00 (commit) from 0d86c4af58df9a6361d12bc25cdfba30c4983868 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=0287c2e441fbc748cb11f96a5afd6dbdf68b0818 commit 0287c2e441fbc748cb11f96a5afd6dbdf68b0818 Author: Ken Hornstein Date: Mon Feb 6 10:27:43 2012 -0500 Update the developer documentation with the changes to the release process. diff --git a/docs/README.developers b/docs/README.developers index cba9f46..3876ba6 100644 --- a/docs/README.developers +++ b/docs/README.developers @@ -136,67 +136,50 @@ getpass()nmh_getpass() releasing nmh - -To make a public release of nmh (we'll use version 1.0.4 and my mhost.com +To make a public release of nmh (we'll use version 1.5 and my mhost.com account, danh, as examples here; the convention for release candidates -is to use something like "1.0.4-RC1"): +is to use something like "1.5-RC1"): - 1. % echo 1.0.4 > VERSION + 1. % echo 1.5 > VERSION % date +"%e %B %Y" > DATE (DATE should contain something like "30 December 2000") 2. % git commit VERSION DATE; git push - 3. % git tag -a nmh-1_0_4 -m 'Releasing nmh-1_0_4.' + 3. % git tag -a 1.5 -m 'Releasing nmh-1.5.' - 4. % make nmhdist +Note that the new convention for tagging is to simply tag with the +version number (tag formats in the past have varied). - 5. Untar nmh-1.0.4.tar.gz and `diff -r' it vs. your workspace. Make -sure no files got left out of the distribution that should be in -it (due to someone forgetting to update the DIST variables in the -Makefiles). + 4. % make distcheck - 6. If you have root access on your machine, it's good at this point to do: +If you want to check the distribution build with some particular +configure options, set the DISTCHECK_CONFIGURE_FLAGS variable. +E.g.: -% chown -R 0:0 nmh-1.0.4 -% tar cvf nmh-1.0.4.tar nmh-1.0.4 -% gzip nmh-1.0.4.tar +% make distcheck DISTCHECK_CONFIGURE_FLAGS=--with-cyrus-sasl -If you leave the files in the archive as being owned by yourself, your UID -may coincide with one of a user on a machine where nmh is being installed, -making it possible for that user to Trojan the nmh code before the system -administrator finishes installing it. - - 7. Make sure your new tarball uncompresses and untars with no problem. Make -sure you can configure, make, and install nmh from it. - - 8. If all is well and your tarball is final, go back to your workspace and do: + 5. If all is well and your tarball is final, go back to your workspace and do: % echo 1.0.4+dev > VERSION - 9. % git commit VERSION; git push - -10. If possible, make an MD5 hash and/or a PGP signature of nmh-1.0.4.tar.gz. -Assuming you have gpg set up, this should be: -% gpg --output nmh-1.0.4.tar.gz.sig --detach-sig nmh-1.0.4.tar.gz + 6. % git commit VERSION; git push -You can verify the signature with -% gpg --verify nmh-1.0.4.tar.gz.sig nmh-1.0.4.tar.gz + 7. Upload the distribution file to savannah. You can automate this process +by doing: -11. Upload the files to savannah. First make sure they are mode 664 so -they will have the right permissions on the server end -(see https://savannah.gnu.org/maintenance/SharedDownloadArea) -% chmod 664 nmh-1.0.4.tar.gz* +% make upload SAVANNAH_USERNAME=username -Then scp them across: -% scp -p nmh-1.0.4.tar.gz* youru...@dl.sv.nongnu.org:/releases/nmh/ +This will automatically call gpg to sign the release. You can bypass +this step by setting the SKIP_GPG_SIG variable. -12. Update the http://www.nongnu.org/nmh/ homepage. (It lives in the CVS + 8. Update the http://www.nongnu.org/nmh/ homepage. (It lives in the CVS 'webpages repository'; see https://savannah.nongnu.org/cvs/?group=nmh) -13. Add a news item to the savannah nmh page. You'll have to submit it first + 9. Add a news item to the savannah nmh page. You'll have to submit it first and then separately approve it (under News->Manage). -14. Send the release announcement email to the following places: +10. Send the release announcement email to the following places: nmh-work...@nongnu.org nmh-annou...@nongnu.org exmh-us...@redhat.com http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e6d7
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. d6bc0d17efe54a1dd7110547aae4b1bb6e223bb7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via d6bc0d17efe54a1dd7110547aae4b1bb6e223bb7 (commit) from 0287c2e441fbc748cb11f96a5afd6dbdf68b0818 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d6bc0d17efe54a1dd7110547aae4b1bb6e223bb7 commit d6bc0d17efe54a1dd7110547aae4b1bb6e223bb7 Author: Ken Hornstein Date: Mon Feb 6 11:31:18 2012 -0500 Patch from Harvey Eneman: fixes problem on some systems where a free() would be called on non-malloc'd memory (only would happen if you had more than one entry in the server: line in mts.conf). diff --git a/sbr/client.c b/sbr/client.c index 7ae356a..7ab49a9 100644 --- a/sbr/client.c +++ b/sbr/client.c @@ -95,7 +95,7 @@ client (char *args, char *service, char *response, int len_response, int debug) if (connect(sd, ai->ai_addr, ai->ai_addrlen) == 0) { freeaddrinfo(res); - client_freelist(ap); + client_freelist(arguments); return sd; } @@ -109,7 +109,7 @@ client (char *args, char *service, char *response, int len_response, int debug) freeaddrinfo(res); } -client_freelist(ap); +client_freelist(arguments); strncpy (response, "no servers available", len_response); return NOTOK; } @@ -122,8 +122,7 @@ client (char *args, char *service, char *response, int len_response, int debug) static void client_freelist(char **list) { -while (*list++ != NULL) - free(*list); +free(*list); } --- Summary of changes: sbr/client.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. a7ce6ecebce9ee549a8367f048ef5468ef16768c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via a7ce6ecebce9ee549a8367f048ef5468ef16768c (commit) from d6bc0d17efe54a1dd7110547aae4b1bb6e223bb7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a7ce6ecebce9ee549a8367f048ef5468ef16768c commit a7ce6ecebce9ee549a8367f048ef5468ef16768c Author: Ken Hornstein Date: Mon Feb 6 14:12:00 2012 -0500 Still more autoconf cleanup (quoting & more use of M4sh). diff --git a/configure.ac b/configure.ac index 10da4b3..fd91d36 100644 --- a/configure.ac +++ b/configure.ac @@ -12,12 +12,12 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AC_CANONICAL_HOST -echo "configuring for AC_PACKAGE_NAME-AC_PACKAGE_VERSION" +AC_MSG_NOTICE([configuring for AC_PACKAGE_NAME-AC_PACKAGE_VERSION]) AC_SUBST(VERSION,AC_PACKAGE_VERSION)dnl dnl What date of nmh are we building? DATE=`cat ${srcdir}/DATE` -echo "configuring for nmh dated $DATE" +AC_MSG_NOTICE([configuring for nmh dated $DATE]) AC_SUBST([DATE])dnl dnl -- @@ -75,11 +75,8 @@ AS_IF([test -n "$with_editor"], [editorpath="$with_editor"]) dnl Set the backup prefix AC_ARG_WITH([hash-backup], AS_HELP_STRING([--with-hash-backup],[use # as the backup prefix (default: ,)])) -if test x"$with_hash_backup" != x -a x"$with_hash_backup" != x"no"; then - backup_prefix="#" -else - backup_prefix="," -fi +AS_IF([test x"$with_hash_backup" != x -a x"$with_hash_backup" != x"no"], + [backup_prefix="#"], [backup_prefix=","]) AC_DEFINE_UNQUOTED([BACKUP_PREFIX], "$backup_prefix", [The prefix that is prepended to the name of message files when they are "removed" by rmm. This should typically be `,' or `#'.])dnl @@ -134,9 +131,7 @@ dnl What should be the default pager? AC_ARG_WITH([pager], AS_HELP_STRING([--with-pager=PAGER],[specify the default pager])) -if test -n "$with_pager"; then - pagerpath="$with_pager" -fi +AS_IF([test -n "$with_pager"], [pagerpath="$with_pager"]) dnl What should be the default mail server(s)? AC_ARG_WITH(smtpservers, @@ -331,7 +326,7 @@ done nmh_cv_mailspool=$mailspool ]) mailspool=$nmh_cv_mailspool -AC_SUBST(mailspool)dnl +AC_SUBST([mailspool])dnl dnl See whether the mail spool directory is world-writable. if test "$lspath" != "no" -a "$cutpath" != "no"; then @@ -345,7 +340,7 @@ if test "$lspath" != "no" -a "$cutpath" != "no"; then fi dnl Also, check for liblockfile (as found on Debian systems) -AC_CHECK_HEADER([lockfile.h], AC_CHECK_LIB(lockfile, lockfile_create) ) +AC_CHECK_HEADER([lockfile.h], [AC_CHECK_LIB(lockfile, lockfile_create)]) dnl and whether its companion program dotlockfile is setgid AC_PATH_PROG(dotlockfilepath, dotlockfile, no) @@ -391,20 +386,18 @@ dnl because it must be set before any system header is included and there's no dnl portable way to make sure that files generated by lex include config.h dnl before system header files. -case "$host_os" in - linux*) -# Like DEFS, but doesn't get stomped on by configure when using config.h: +AS_CASE(["$host_os"], + [linux*], + [# Like DEFS, but doesn't get stomped on by configure when using config.h: test -z "$OURDEFS" && OURDEFS="-D_GNU_SOURCE" \ -|| OURDEFS="$OURDEFS -D_GNU_SOURCE" -;; -esac +|| OURDEFS="$OURDEFS -D_GNU_SOURCE"]) AC_SUBST(OURDEFS) AC_HEADER_STDC AC_HEADER_TIOCGWINSZ -AC_CHECK_HEADERS(errno.h fcntl.h crypt.h ncurses/termcap.h termcap.h \ - langinfo.h wchar.h wctype.h iconv.h netdb.h \ - sys/param.h sys/time.h sys/stream.h) +AC_CHECK_HEADERS([errno.h fcntl.h crypt.h ncurses/termcap.h termcap.h \ + langinfo.h wchar.h wctype.h iconv.h netdb.h \ + sys/param.h sys/time.h sys/stream.h]) dnl dnl Checks for _IO_write_ptr. A Linuxism used by nmh on linux. We @@ -425,7 +418,7 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, dnl --- dnl CHECK FUNCTIONS dnl --- -AC_CHECK_FUNCS(writev lstat nl_langinfo) +AC_CHECK_FUNCS([writev lstat nl_langinfo]) dnl Check for multibyte character set support if test "x$ac_cv_header_wchar_h" = "xyes" -a
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 062356283e3de7e2da9b488853e1f4381a3e5267
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 062356283e3de7e2da9b488853e1f4381a3e5267 (commit) from 14e2dd6c1ded9759c365ea3d29da180bb69920a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=062356283e3de7e2da9b488853e1f4381a3e5267 commit 062356283e3de7e2da9b488853e1f4381a3e5267 Author: Ken Hornstein Date: Thu Feb 9 23:43:30 2012 -0500 Fix typo in variable test. diff --git a/configure.ac b/configure.ac index fd91d36..e38fae1 100644 --- a/configure.ac +++ b/configure.ac @@ -167,7 +167,7 @@ AC_CACHE_CHECK([whether preprocessor supports -Wunused-macros], CPPFLAGS="$nmh_saved_cppflags"]) if test "$nmh_cv_has_unusedmacros" = 'yes'; then - test -z "$CPPLAGS" && CPPFLAGS=-Wunused-macros \ + test -z "$CPPFLAGS" && CPPFLAGS=-Wunused-macros \ || CPPFLAGS="$CPPFLAGS -Wunused-macros" DISABLE_UNUSED_MACROS_WARNING=-Wno-unused-macros fi --- Summary of changes: configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 00949f4fa56dc4e1a7d4ea1972d7492d80880b2c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 00949f4fa56dc4e1a7d4ea1972d7492d80880b2c (commit) from 062356283e3de7e2da9b488853e1f4381a3e5267 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=00949f4fa56dc4e1a7d4ea1972d7492d80880b2c commit 00949f4fa56dc4e1a7d4ea1972d7492d80880b2c Author: Ken Hornstein Date: Fri Feb 10 09:50:48 2012 -0500 With the fixing of the bug that caused CPPFLAGS to get tromped on, remove support for OURDEFS and direct people to use CPPFLAGS instead. diff --git a/INSTALL b/INSTALL index 04a0c0d..3cefafc 100644 --- a/INSTALL +++ b/INSTALL @@ -140,8 +140,9 @@ environment. For example, ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix -If you want to add to, not replace, compile flags, you can use OURDEFS: - ./configure OURDEFS='-Wextra -Wno-sign-compare' +If you wish to add options that are only used at compile time instead of +link time, you can use the CPPFLAGS variable: + ./configure CPPFLAGS='-Wextra -Wno-sign-compare' If you want to add to both compile and link flags at build time without putting them in the configuration, you can use an otherwise @@ -177,7 +178,7 @@ run the "configure" script. "configure" automatically checks for the source code in the directory that "configure" is in. For example, cd /usr/local/solaris/nmh -/usr/local/src/nmh-1.0/configure +/usr/local/src/nmh-1.5/configure make - diff --git a/Makefile.am b/Makefile.am index 42e71fe..41dee6c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,11 +31,6 @@ MHNSEARCHPROG = $(srcdir)/etc/mhn.find.sh auxexecdir = @libdir@ ## -## For backward compatibility, include OURDEFS in DEFS. See INSTALL. -## -DEFS = @DEFS@ @OURDEFS@ - -## ## nmh _does_ have a test suite! ## testdir = $(srcdir)/test diff --git a/configure.ac b/configure.ac index e38fae1..a6b5525 100644 --- a/configure.ac +++ b/configure.ac @@ -389,9 +389,8 @@ dnl before system header files. AS_CASE(["$host_os"], [linux*], [# Like DEFS, but doesn't get stomped on by configure when using config.h: -test -z "$OURDEFS" && OURDEFS="-D_GNU_SOURCE" \ -|| OURDEFS="$OURDEFS -D_GNU_SOURCE"]) -AC_SUBST(OURDEFS) + AS_IF([test -z "$CPPFLAGS"],[CPPFLAGS="-D_GNU_SOURCE"], +[CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"])]) AC_HEADER_STDC AC_HEADER_TIOCGWINSZ @@ -740,7 +739,7 @@ host os: ${host} compiler : ${CC} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} -definitions: ${OURDEFS} +preprocessor flags : ${CPPFLAGS} source code location : ${srcdir} binary install path: ${nmhbin} library install path : ${nmhlib} --- Summary of changes: INSTALL |7 --- Makefile.am |5 - configure.ac |7 +++ 3 files changed, 7 insertions(+), 12 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 8ae191f927b3e294b7a50124b8c806365c4dbeb8
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 8ae191f927b3e294b7a50124b8c806365c4dbeb8 (commit) from 00949f4fa56dc4e1a7d4ea1972d7492d80880b2c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=8ae191f927b3e294b7a50124b8c806365c4dbeb8 commit 8ae191f927b3e294b7a50124b8c806365c4dbeb8 Author: Ken Hornstein Date: Fri Feb 10 15:11:05 2012 -0500 Make the test suite work on systems other than Linux. Still needs work. diff --git a/.gitignore b/.gitignore index df57aa8..159cacf 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ /config.h /config.log /config.status +/test/common.sh /stamp-h1 # Removed by clean: diff --git a/Makefile.am b/Makefile.am index 41dee6c..1340639 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,9 +40,13 @@ testdir = $(srcdir)/test ## And it would be easier to clean up if tests were launched from a ## tmp directory, and/or each test cleaned up after itself on ## successful completion. -MOSTLYCLEANFILES = test/testinstall/*.actual* test/testinstall/*.expected* \ - test/testinstall/*.replgroupcomps test/testinstall/*.draft \ - test/testinstall/,*.draft* \* +##MOSTLYCLEANFILES = test/testinstall/*.actual* test/testinstall/*.expected* \ +##test/testinstall/*.replgroupcomps test/testinstall/*.draft \ +##test/testinstall/,*.draft* + +mostlyclean-local: + rm -rf test/testinstall + rm -rf test/testbuild ## ## Stuff that should be cleaned via "make clean" @@ -180,7 +184,9 @@ EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \ man/rcvpack.man man/rcvstore.man man/rcvtty.man man/refile.man \ man/repl.man man/rmf.man man/rmm.man man/scan.man man/send.man \ man/sendfiles.man man/show.man man/slocal.man man/sortm.man \ -man/unseen.man man/whatnow.man man/whom.man +man/unseen.man man/whatnow.man man/whom.man test/common.sh.in \ +test/README test/runalltests test/runtest test/setup-test \ +test/teardown-test test/tests ## ## These are all of the definitions for each of the programs listed above. diff --git a/configure.ac b/configure.ac index a6b5525..2e8cbd7 100644 --- a/configure.ac +++ b/configure.ac @@ -247,7 +247,17 @@ AC_PROG_LEX dnl Check for lex/flex dnl Look for `cut' pathtmp=/usr/bin:/bin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb -AC_PATH_PROG(cutpath, cut, no, [$pathtmp]) +AC_PATH_PROG([cutpath], [cut], [no], [$pathtmp]) + +dnl +dnl Check for MD5 program and formatting command +dnl +AC_CHECK_PROGS([MD5SUM], [md5sum md5], [missing]) +AS_CASE(["${MD5SUM}"], + [md5sum], [MD5FMT="cat"], + [md5], [[MD5FMT="${SED} -e 's/MD5 *(\(.*\)) *= \([0-9a-f]*\)/\2 \1/'"]], + [MD5FMT="missing"]) +AC_SUBST([MD5FMT]) dnl -- dnl check for lclint, and lint if it doesn't exist @@ -760,5 +770,5 @@ TLS support: ${tls_support} dnl --- dnl OUTPUT MAKEFILE dnl --- -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile test/common.sh]) AC_OUTPUT diff --git a/test/common.sh b/test/common.sh.in similarity index 95% rename from test/common.sh rename to test/common.sh.in index 5d46c8c..c7d557a 100644 --- a/test/common.sh +++ b/test/common.sh.in @@ -1,4 +1,10 @@ # Common helper routines for test shell scripts -- intended to be sourced by them + +output_md5() +{ + @MD5SUM@ $* | @MD5FMT@ +} + test_skip () { WHY="$1" diff --git a/test/runtest b/test/runtest index 5cfc158..f23608b 100755 --- a/test/runtest +++ b/test/runtest @@ -22,7 +22,7 @@ mkdir $MH_TEST_DIR/Mail echo "Path: $MH_TEST_DIR/Mail" > $MH folder -create +inbox > /dev/null # create 10 basic messages -for i in `seq 1 10`; +for i in 1 2 3 4 5 6 7 8 9 10; do cat > $MH_TEST_DIR/Mail/inbox/$i < @@ -47,7 +47,7 @@ elif [ $return_value -eq 120 ]; then # indicates test was skipped (eg needed program not found) # test itself should have printed a message about this, # so print nothing here. -: +status=0 else echo Test $1 FAIL fi diff --git a/test/tests/inc/test-deb359167 b/test/tests/inc/test-deb359167 index 36cd1c2..ef0abc8 100644 --- a/test/tests/inc/test-deb359167 +++ b/test/tests/inc/test-deb359167 @@ -10,7 +10,7 @@ require_prog valgrind TESTMBOX="$THISDIR/deb359167.mbox" -if [ "$(md5sum &
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 6106441685a38400d9aa94ccb7218218102f941c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 6106441685a38400d9aa94ccb7218218102f941c (commit) via e2b5453864a9343161ed2dd53527a0ea858d3c43 (commit) from 8ae191f927b3e294b7a50124b8c806365c4dbeb8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=6106441685a38400d9aa94ccb7218218102f941c commit 6106441685a38400d9aa94ccb7218218102f941c Author: Ken Hornstein Date: Fri Feb 10 23:09:03 2012 -0500 Re-work the test suite so it now works with Automake (via "make check"). diff --git a/.gitignore b/.gitignore index 159cacf..b65e540 100644 --- a/.gitignore +++ b/.gitignore @@ -45,8 +45,7 @@ a.out.DSYM/ /mts/libmts.a /sbr/*.a /sbr/sigmsg.h -/test/testbuild/ -/test/testinstall/ +/test/testdir /uip/ali /uip/anno /uip/ap diff --git a/Makefile.am b/Makefile.am index 1340639..e2aa952 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,20 +33,24 @@ auxexecdir = @libdir@ ## ## nmh _does_ have a test suite! ## -testdir = $(srcdir)/test -## It might be nice to configure testinstall and testbuild -## directories, but for now they're hard-coded here and in the test -## scripts. -## And it would be easier to clean up if tests were launched from a -## tmp directory, and/or each test cleaned up after itself on -## successful completion. -##MOSTLYCLEANFILES = test/testinstall/*.actual* test/testinstall/*.expected* \ -##test/testinstall/*.replgroupcomps test/testinstall/*.draft \ -##test/testinstall/,*.draft* - -mostlyclean-local: - rm -rf test/testinstall - rm -rf test/testbuild + +TESTS_ENVIRONMENT = MH_TEST_DIR=`pwd`/test/testdir \ + MH_TEST_COMMON=`pwd`/test/common.sh \ + MH_OBJ_DIR=`pwd` mandir=$(mandir) bindir=$(bindir) \ + sysconfdir=$(sysconfdir) +## +## Important note: the "cleanup" test should always be last +## +TESTS = test/bad-input/test-header test/folder/test-create \ + test/folder/test-total test/inc/test-deb359167 test/inc/test-eom-align \ + test/manpages/test-manpages test/mhbuild/test-forw \ + test/mhshow/test-cte-binary test/mhshow/test-qp \ + test/mhshow/test-subpart test/new/test-basic test/pick/test-stderr \ + test/repl/test-if-str test/scan/test-scan \ + test/whatnow/test-attach-detach test/whatnow/test-cd \ + test/whatnow/test-ls test/cleanup + +check_SCRIPTS = test/common.sh ## ## Stuff that should be cleaned via "make clean" @@ -55,7 +59,7 @@ CLEANFILES = config/version.c sbr/sigmsg.h etc/mts.conf etc/sendfiles \ etc/mhn.defaults man/man.sed $(man_MANS) clean-local: @rm -rf RPM a.out.DSYM uip/a.out.DSYM - @$(testdir)/teardown-test + @rm -rf test/testdir ## ## Stuff that should be cleaned via "make maintainer-clean" @@ -184,9 +188,9 @@ EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \ man/rcvpack.man man/rcvstore.man man/rcvtty.man man/refile.man \ man/repl.man man/rmf.man man/rmm.man man/scan.man man/send.man \ man/sendfiles.man man/show.man man/slocal.man man/sortm.man \ -man/unseen.man man/whatnow.man man/whom.man test/common.sh.in \ -test/README test/runalltests test/runtest test/setup-test \ -test/teardown-test test/tests +man/unseen.man man/whatnow.man man/whom.man test/README $(TESTS) \ +test/inc/deb359167.mbox test/inc/fromline.txt \ +test/inc/msgheader.txt test/inc/filler.txt test/inc/md5sums ## ## These are all of the definitions for each of the programs listed above. @@ -500,10 +504,6 @@ man/man.sed: Makefile .man.$(manext8): $(SED) -f man/man.sed $< > $@ -test: all - @$(testdir)/runalltests -.PHONY: test - ## Don't include commit hashes in ChangeLog. ChangeLog: @[ -d .git ] && git --no-pager log --abbrev-commit | \ diff --git a/test/README b/test/README index c61647e..3d7d478 100644 --- a/test/README +++ b/test/README @@ -9,28 +9,26 @@ the result by one of: * for a test pass: exit with status 0 * where a test has been skipped (perhaps because it depends on an external program which can't be found): print "Test $0 SKIP (reason)" -and exit with status 120 +and exit with status 77 * for a test fail: exit with some status other than 0 or 120 -The Suite is arranged as such: +The Suite is a re-worked version of the original test suite; it now is +designed to work with Automake. T
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 96314ed680840a57b0fef7b7d8a4c93925596e86
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 96314ed680840a57b0fef7b7d8a4c93925596e86 (commit) via 3439af1e13339ebd1c189f8afaae93a6d9fd27a7 (commit) from 6106441685a38400d9aa94ccb7218218102f941c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=96314ed680840a57b0fef7b7d8a4c93925596e86 commit 96314ed680840a57b0fef7b7d8a4c93925596e86 Author: Ken Hornstein Date: Fri Feb 10 23:27:36 2012 -0500 Switch over to using the template files out of our inst directory. diff --git a/test/common.sh.in b/test/common.sh.in index adcb685..34767f4 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -89,16 +89,11 @@ EOF for f in MailAliases components digestcomps distcomps forwcomps mhl.body \ mhl.digest mhl.format mhl.forward mhl.headers mhl.reply \ - rcvdistcomps replcomps replgroupcomps scan.MMDDYY \ + mhn.defaults rcvdistcomps replcomps replgroupcomps scan.MMDDYY \ scan.MMDD scan.default scan.mailx scan.nomime scan.size \ scan.time scan.timely scan.unseen do -cp ${srcdir}/etc/${f} ${MH_TEST_DIR}/Mail || exit 1 - done - - for f in mhn.defaults mts.conf - do -cp ${MH_OBJ_DIR}/etc/${f} ${MH_TEST_DIR}/Mail || exit 1 +cp ${MH_INST_DIR}${sysconfdir}/${f} ${MH_TEST_DIR}/Mail || exit 1 done folder -create +inbox > /dev/null http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3439af1e13339ebd1c189f8afaae93a6d9fd27a7 commit 3439af1e13339ebd1c189f8afaae93a6d9fd27a7 Author: Ken Hornstein Date: Fri Feb 10 23:22:12 2012 -0500 Switch to using the "inst" version of mhl for tests. diff --git a/Makefile.am b/Makefile.am index e2aa952..84bf58f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,7 +37,7 @@ auxexecdir = @libdir@ TESTS_ENVIRONMENT = MH_TEST_DIR=`pwd`/test/testdir \ MH_TEST_COMMON=`pwd`/test/common.sh \ MH_OBJ_DIR=`pwd` mandir=$(mandir) bindir=$(bindir) \ - sysconfdir=$(sysconfdir) + sysconfdir=$(sysconfdir) auxexecdir=$(auxexecdir) ## ## Important note: the "cleanup" test should always be last ## diff --git a/test/common.sh.in b/test/common.sh.in index 4c7089c..adcb685 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -84,7 +84,7 @@ setup_test () mkdir $MH_TEST_DIR/Mail || exit 1 cat > $MH <https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 7b45ebd870d32add1d4185159ec856f9d9684b5c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 7b45ebd870d32add1d4185159ec856f9d9684b5c (commit) from 96314ed680840a57b0fef7b7d8a4c93925596e86 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=7b45ebd870d32add1d4185159ec856f9d9684b5c commit 7b45ebd870d32add1d4185159ec856f9d9684b5c Author: Ken Hornstein Date: Fri Feb 10 23:38:40 2012 -0500 Fix this so it works when valgrind is installed. diff --git a/test/inc/test-deb359167 b/test/inc/test-deb359167 index 26aea11..72c6b7f 100755 --- a/test/inc/test-deb359167 +++ b/test/inc/test-deb359167 @@ -12,9 +12,16 @@ require_prog valgrind TESTMBOX="$THISDIR/deb359167.mbox" -if [ "$(${MD5SUM} "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then +if [ "$(output_md5 "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then echo "Test mailbox has been corrupted" exit 1 fi +# +# valgrind refuses to run on a setuid/setgid program, so chmod inc so it +# isn't (just in case) +# + +chmod 755 ${MH_INST_DIR}${bindir}/inc + valgrind --error-exitcode=1 --quiet inc -silent -file "$TESTMBOX" --- Summary of changes: test/inc/test-deb359167 |9 - 1 files changed, 8 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 93d0dbc35865a7118d1dec28e19fda4bb31ba691
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 93d0dbc35865a7118d1dec28e19fda4bb31ba691 (commit) via 3325d1a5623f39b8f0cf8c342da88024397500f7 (commit) from 7b45ebd870d32add1d4185159ec856f9d9684b5c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=93d0dbc35865a7118d1dec28e19fda4bb31ba691 commit 93d0dbc35865a7118d1dec28e19fda4bb31ba691 Author: Paul Fox Date: Sat Feb 11 13:06:47 2012 -0500 correct the maximum number of sequences in the mark(1) man page also add a note explaining the somewhat low limit. diff --git a/man/mark.man b/man/mark.man index eff4bf0..130b4fd 100644 --- a/man/mark.man +++ b/man/mark.man @@ -153,7 +153,9 @@ be one of the (reserved) message names \*(lqnew\*(rq, \*(lqfirst\*(rq, .PP .IP \(bu 2 Only a certain number of sequences may be defined for a given folder. -This number is usually limited to 26 (10 on small systems). +This number is usually limited to 27 (11 on small systems). (The +internal implementation relies on bitmasks, with some bits set aside +for internal use.) .PP .IP \(bu 2 Message ranges with user\-defined sequence names are restricted to the http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3325d1a5623f39b8f0cf8c342da88024397500f7 commit 3325d1a5623f39b8f0cf8c342da88024397500f7 Author: Paul Fox Date: Sat Feb 11 12:41:30 2012 -0500 mhshow: suppress pause actions if stdout isn't a tty previously, "mhshow | cat" would both print a "Press return" prompt to, and attempt to read from, its piped output fd. diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index c60acb9..5abd67d 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -533,11 +533,11 @@ show_content_aux2 (CT ct, int serial, int alternate, char *cracked, char *buffer else list_switch (ct, -1, 1, 0, 0); - if (xpause && SOprintf ("Press to show content...")) - printf ("Press to show content..."); - - if (xpause) { + if (xpause && isatty (fileno (stdout))) { int intr; + + if (SOprintf ("Press to show content...")) + printf ("Press to show content..."); SIGNAL_HANDLER istat; istat = SIGNAL (SIGINT, intrser); --- Summary of changes: man/mark.man|4 +++- uip/mhshowsbr.c |8 2 files changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 78b9c394d4df10be72515b4b58204e43adc1026a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 78b9c394d4df10be72515b4b58204e43adc1026a (commit) from 93d0dbc35865a7118d1dec28e19fda4bb31ba691 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=78b9c394d4df10be72515b4b58204e43adc1026a commit 78b9c394d4df10be72515b4b58204e43adc1026a Author: Ken Hornstein Date: Sat Feb 11 23:28:10 2012 -0500 Another problem discovered by the test suite. With multiple sequence arguments on the command line you might end up with garbage in the sequence[] array (it needs the last argument to be a NULL. So do two things: make the first two arguments NULL, and as we add arguments to sequence[] make sure the list has a NULL on the end. diff --git a/uip/new.c b/uip/new.c index 752f028..38c8f0b 100644 --- a/uip/new.c +++ b/uip/new.c @@ -409,6 +409,7 @@ main(int argc, char **argv) struct node *folder; sequences[0] = NULL; +sequences[1] = NULL; #ifdef LOCALE setlocale(LC_ALL, ""); @@ -456,6 +457,7 @@ main(int argc, char **argv) /* have a sequence argument */ if (!seq_in_list(cp, sequences)) { sequences[i++] = cp; + sequences[i] = NULL; } } --- Summary of changes: uip/new.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 42340d0aa25e0d0ec9c53bc81a7c5bf14283fbd7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 42340d0aa25e0d0ec9c53bc81a7c5bf14283fbd7 (commit) from 1e0028887e9036b786dc7a844121b67a29dbbe32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=42340d0aa25e0d0ec9c53bc81a7c5bf14283fbd7 commit 42340d0aa25e0d0ec9c53bc81a7c5bf14283fbd7 Author: Ken Hornstein Date: Tue Feb 14 20:24:43 2012 -0500 Add two new format functions: %(myhost) and %(myname). diff --git a/man/mh-format.man b/man/mh-format.man index c50e02f..aa1c630 100644 --- a/man/mh-format.man +++ b/man/mh-format.man @@ -252,7 +252,9 @@ strlen integer length of \fIstr\fR width integer output buffer size in bytes charleft integer bytes left in output buffer timenowinteger seconds since the UNIX epoch -me string the user's mailbox +me string the user's mailbox (username) +myhost string the user's local hostname +myname string the user's name eq literal boolean \fInum\fR == \fIarg\fR ne literal boolean \fInum\fR != \fIarg\fR gt literal boolean \fInum\fR > \fIarg\fR @@ -302,6 +304,19 @@ putaddrliteral print \fIstr\fR address list with .fi .RE .PP +The (\fIme\fR\^) function returns the username of the current user. The +(\fImyhost\fR\^) function returns the +.B localname +entry in +.IR mts.conf , +or the local hostname if +.B localname +is not configured. The (\fImyname\fR\^) function will return the value of +the +.B SIGNATURE +environment variable if set, otherwise will return the passwd GECOS field for +the current user. +.PP The following functions require a date component as an argument: .PP .RS 5 diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index b4e8bcb..239243f 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -44,6 +44,7 @@ #include #include #include +#include #ifdef HAVE_SYS_TIME_H # include @@ -75,6 +76,8 @@ extern struct mailname fmt_mnull; #defineTF_NOW 6/* special - get current unix time*/ #defineTF_EXPR_SV 7/* like expr but save current str reg */ #defineTF_NOP 8/* like expr but no result*/ +#define TF_MYNAME 9/* special - get current name of user */ +#define TF_MYHOST 10 /* special - get "local" hostname */ /* ftable->flags */ /* NB that TFL_PUTS is also used to decide whether the test @@ -153,6 +156,8 @@ static struct ftable functable[] = { { "dat",TF_NUM, FT_LV_DAT, 0, TFL_PUTN }, { "strlen", TF_NONE, FT_LV_STRLEN, 0, TFL_PUTN }, { "me", TF_MYBOX, FT_LS_LIT, 0, TFL_PUTS }, + { "myname", TF_MYNAME,FT_LS_LIT, 0, TFL_PUTS }, + { "myhost", TF_MYHOST,FT_LS_LIT, 0, TFL_PUTS }, { "plus", TF_NUM, FT_LV_PLUS_L, 0, TFL_PUTN }, { "minus", TF_NUM, FT_LV_MINUS_L, 0, TFL_PUTN }, { "divide", TF_NUM, FT_LV_DIVIDE_L, 0, TFL_PUTN }, @@ -245,11 +250,6 @@ static unsigned char *usr_fstring; /* for CERROR */ #define CERROR(str) compile_error (str, cp) /* - * external prototypes - */ -extern char *getusername(void); - -/* * static prototypes */ static struct ftable *lookup(char *); @@ -593,6 +593,14 @@ do_func(char *sp) LS(t->f_type, getusername()); break; +case TF_MYNAME: + LS(t->f_type, getfullname()); + break; + +case TF_MYHOST: + LS(t->f_type, LocalName(0)); + break; + case TF_NOW: LV(t->f_type, time((time_t *) 0)); break; --- Summary of changes: man/mh-format.man | 17 - sbr/fmt_compile.c | 18 +- 2 files changed, 29 insertions(+), 6 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 23af631076209b31fb28feb90a779ff8dcc153a2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 23af631076209b31fb28feb90a779ff8dcc153a2 (commit) via 19bff15d9c875e211494e0cc24021888f67b1378 (commit) via 1bea35b19a2b952f4af4892c97541fa0715d91b9 (commit) via 4e0b71d26ea73fe5ae324cc9c5caa7f204760781 (commit) via 5aab34095ffbff27be09091e703e61ddf352ad87 (commit) via 681fb6f84e8094c2c857d4341d3e2fb97d377908 (commit) from 2793dbafc546ab90800df3591cb63f4747e3374d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=23af631076209b31fb28feb90a779ff8dcc153a2 commit 23af631076209b31fb28feb90a779ff8dcc153a2 Author: Ken Hornstein Date: Wed Feb 15 15:54:47 2012 -0500 Create test cases for the new format functions for local address writing. diff --git a/.gitignore b/.gitignore index b65e540..87e31cb 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ a.out.DSYM/ /uip/whatnow /uip/whom /uip/*.exe +/test/getfullname # Removed by mostlyclean: *.o diff --git a/Makefile.am b/Makefile.am index 84bf58f..5b473c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,10 @@ TESTS_ENVIRONMENT = MH_TEST_DIR=`pwd`/test/testdir \ ## Important note: the "cleanup" test should always be last ## TESTS = test/bad-input/test-header test/folder/test-create \ - test/folder/test-total test/inc/test-deb359167 test/inc/test-eom-align \ + test/folder/test-total test/format/test-localmbox \ + test/format/test-myname test/format/test-myhost \ + test/format/test-mymbox \ + test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhshow/test-cte-binary test/mhshow/test-qp \ test/mhshow/test-subpart test/new/test-basic test/pick/test-stderr \ @@ -51,6 +54,7 @@ TESTS = test/bad-input/test-header test/folder/test-create \ test/whatnow/test-ls test/cleanup check_SCRIPTS = test/common.sh +check_PROGRAMS = test/getfullname ## ## Stuff that should be cleaned via "make clean" @@ -341,6 +345,9 @@ uip_spost_SOURCES = uip/spost.c uip/aliasbr.c uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/mhoutsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c +test_getfullname_SOURCES = test/getfullname.c +test_getfullname_LDADD = + ## ## Our rebuild rules for files that aren't built via the normal mechanisms ## diff --git a/test/common.sh.in b/test/common.sh.in index 34767f4..d5a9d7e 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -64,6 +64,7 @@ setup_test () export MH_INST_DIR=${MH_TEST_DIR}/inst export MHMTSCONF=${MH_INST_DIR}${sysconfdir}/mts.conf export PATH=${MH_INST_DIR}${bindir}:${PATH} + export MH_LIB_DIR=${MH_INST_DIR}${auxexecdir} if [ -z "${srcdir}" ]; then echo "srcdir not set; aborting" @@ -84,7 +85,7 @@ setup_test () mkdir $MH_TEST_DIR/Mail || exit 1 cat > $MH <> ${MH} + +# We can use "ap" to get the output of format commands + +testoutput=$(${MH_LIB_DIR}/ap -format "%(profile Local-Mailbox)" ignore) + +if [ x"${testname}" != x"${testoutput}" ]; then + echo "Expected ${testname}, got ${testoutput}" + exit 1 +fi + +exit 0 diff --git a/test/format/test-myhost b/test/format/test-myhost new file mode 100755 index 000..d303a8f --- /dev/null +++ b/test/format/test-myhost @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Test that the %(myhost) function returns the local hostname and +# the localname entry out of the mts configuration file. +# + +if [ -z "${MH_TEST_COMMON}" ]; then + echo "MH_TEST_COMMON not set; try running via 'make check'" +fi + +. ${MH_TEST_COMMON} + +setup_test + +runtest() +{ + testoutput=$(${MH_LIB_DIR}/ap -format "%(myhost)" ignore) + + if [ x"$1" != x"${testoutput}" ]; then + echo "For $2, expected $1 but got ${testoutput}" + exit 1 + fi +} + +runtest "$(hostname)" "local hostname test" + +cp ${MHMTSCONF} ${MH_TEST_DIR}/Mail/mts.conf || exit 1 +export MHMTSCONF="${MH_TEST_DIR}/Mail/mts.conf" + +echo "localname: some.random.name" >> ${MHMTSCONF} + +runtest "some.random.name" "mts.conf localname test" + +exit 0 diff --git a/test/format/test-mymbox b/test/format/test-mymbox new file mode 100755 index 000..82f0879 --- /dev/null +++ b/test/format/test-mymbox @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Test that the %(
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 08baa09f9fd9cd29ca89f3f90264678eef9bda10
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 08baa09f9fd9cd29ca89f3f90264678eef9bda10 (commit) from 23af631076209b31fb28feb90a779ff8dcc153a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=08baa09f9fd9cd29ca89f3f90264678eef9bda10 commit 08baa09f9fd9cd29ca89f3f90264678eef9bda10 Author: Ken Hornstein Date: Wed Feb 15 21:45:13 2012 -0500 Fix typo in repl man page. diff --git a/man/repl.man b/man/repl.man index f67cee7..112cca9 100644 --- a/man/repl.man +++ b/man/repl.man @@ -306,7 +306,7 @@ the \*(lq>\*(rq character. You can also use an external format program to format the message body. The format program is specified by the .IR formatproc -profile entry, and is enabled by the \*(lqformat\(*rq flag. A message +profile entry, and is enabled by the \*(lqformat\*(rq flag. A message filter using an external format program would look like this: .PP .RS 5 --- Summary of changes: man/repl.man |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. dd0acb9f9e2206182c738c2fa5e1d9775b7fda48
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via dd0acb9f9e2206182c738c2fa5e1d9775b7fda48 (commit) from 08baa09f9fd9cd29ca89f3f90264678eef9bda10 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=dd0acb9f9e2206182c738c2fa5e1d9775b7fda48 commit dd0acb9f9e2206182c738c2fa5e1d9775b7fda48 Author: Ken Hornstein Date: Thu Feb 16 00:17:49 2012 -0500 Hopefully made the format documentation a little bit clearer. diff --git a/man/mh-format.man b/man/mh-format.man index aa1c630..57cf771 100644 --- a/man/mh-format.man +++ b/man/mh-format.man @@ -73,7 +73,15 @@ All component escapes have a string value. Normally, component values are compressed by converting any control characters (tab and newline included) to spaces, then eliding any leading or multiple spaces. However, commands may give different interpretations to some component escapes; be sure -to refer to each command's manual entry for complete details. +to refer to each command's manual entry for complete details. Some commands +(such as +.B ap +and +.BR mhl ) +use a special component +.RI `%{ text }' +to refer to the text being processed; see their respective man pages for +details and examples. .PP A .I function @@ -425,6 +433,80 @@ If you need to create an address list that includes previously-seen addresses you may use the (\fIconcataddr\fR\^) function, which is identical to (\fIformataddr\fR\^) in all other respects. Note that (\fIconcataddr\fR\^) will NOT add addresses to the duplicate-suppression cache. +.SS Other Hints and Tips +Sometimes to format function writers it is confusing as to why output is +duplicated. The general rule to remember is simple: If a function or +component escape is used where it starts with a %, then it will generate +text in the output file. Otherwise, it will not. +.PP +A good example is a simple attempt to generate a To: header based on +the From: and Reply-To: headers: +.PP +.RS 5 +.nf +%(formataddr %<{reply-to}%|%{from})%(putaddr To: ) +.fi +.RE +.PP +Unfortuantely if the Reply-to: header is NOT present, the output line that is +generated will be something like: +.PP +.RS 5 +.nf +My From User To: My From User +.fi +.RE +.PP +What went wrong? When performing the test for the +.B if +clause (%<), the component is not output because it is considered an +argument to the +.B if +statement (hence the rule about the lack of % applies). But the component +escape in our +.B else +statement (everything after the `%|') is NOT an argument to anything; the +syntax is that it is written with a %, and thus the value of that component +is output. This also has the side effect of setting the +.I str +register, which is later picked up by the (\fIformataddr\fR\^) function +and then output by (\fIputaddr\fR\^). This format string has another bug +as well; there should always be a valid width value in the +.I num +register when (\fIputaddr\fR\^) is called, otherwise bad formatting can take +place. +.PP +The solution is to use the (\fIvoid\fR\^) function; this will prevent the +function or component from outputting any text. With this in place (and +using (\fIwidth\fR\^) to set the +.I num +register for the width, a better implementation would look like: +.PP +.RS 3 +.nf +%(formataddr %<{reply-to}%|%(void{from})%(void(width))%(putaddr To: ) +.fi +.RE +.PP +It should be noted here that the side-effects of functions and component +escapes still are in force: as a result each component +test in the +.B if\-elseif\-else\-endif +clause sets the +.I str +register. +.PP +As an additional note, the (\fIformataddr\fR\^) and (\fIconcataddr\fR\^) +functions have some behavior when it comes to the +.I str +register. The starting point of the register is saved and is used to +build up entries in the address list. +.PP +You will find the +.B ap +and +.B fmtdump +utilities invaluable in debugging problems with format strings. .SS Examples With all this in mind, here's the default format string for --- Summary of changes: man/mh-format.man | 84 - 1 files changed, 83 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. aec3e4eb82ab61699f1539ad7b62f4c3ecdbf4ea
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via aec3e4eb82ab61699f1539ad7b62f4c3ecdbf4ea (commit) from dd0acb9f9e2206182c738c2fa5e1d9775b7fda48 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=aec3e4eb82ab61699f1539ad7b62f4c3ecdbf4ea commit aec3e4eb82ab61699f1539ad7b62f4c3ecdbf4ea Author: Ken Hornstein Date: Thu Feb 16 11:46:16 2012 -0500 Report an error when the width used by putaddr is less than the label width. diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 89023cb..f689300 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -822,6 +822,10 @@ fmt_scan (struct format *format, char *scanl, int width, int *dat) sp = fmt->f_text; indent = strlen (sp); wid -= indent; + if (wid <= 0) { + adios(NULL, "putaddr -- num register (%d) must be greater " + "than label width (%d)", value, indent); + } while( (c = *sp++) && cp < ep) *cp++ = c; while (len > wid) { --- Summary of changes: sbr/fmt_scan.c |4 1 files changed, 4 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 4877596410e850f2295f1015738bd8ca6e86ee0f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 4877596410e850f2295f1015738bd8ca6e86ee0f (commit) via 4f9a626afed661270364f0f7982fc3767f688e05 (commit) via 3521e294c63116319993193971e2f0d708ac0530 (commit) from 4eaf25e2a1d634b6f7bfa01a96e6e86768837e9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4877596410e850f2295f1015738bd8ca6e86ee0f commit 4877596410e850f2295f1015738bd8ca6e86ee0f Author: Ken Hornstein Date: Fri Feb 17 15:56:08 2012 -0500 Beginning support for mh-format support in comp(1). Includes changes to default component file. diff --git a/Makefile.am b/Makefile.am index 6417e11..dc63866 100644 --- a/Makefile.am +++ b/Makefile.am @@ -209,6 +209,7 @@ uip_burst_SOURCES = uip/burst.c uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c +uip_comp_LDADD = $(LDADD) $(ICONVLIB) uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c diff --git a/etc/components b/etc/components index 7f255ea..95be90c 100644 --- a/etc/components +++ b/etc/components @@ -1,3 +1,4 @@ +From: %(localmbox) To: cc: Fcc: +outbox diff --git a/man/comp.man b/man/comp.man index bfb78b3..643c056 100644 --- a/man/comp.man +++ b/man/comp.man @@ -96,6 +96,17 @@ The .I file switch says to use the named file as the message draft. .PP +Forms that are selected via the +.B \-form +switch are processed via the mh template system; see +.BR mh\-format (5) +for details. Drafts constructed from another mssage or with the +.B \-use +or +.B \-file +switchs will NOT be processed with +.BR mh\-format (5). +.PP If the draft already exists, .B comp will ask you as to the disposition diff --git a/uip/comp.c b/uip/comp.c index 5ebce6e..6882372 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -9,6 +9,7 @@ #include #include +#include #include static struct swit switches[] = { @@ -71,12 +72,14 @@ int main (int argc, char **argv) { int use = NOUSE, nedit = 0, nwhat = 0; -int i, in, isdf = 0, out; +int i, in, isdf = 0, out, dat[5], ncomps, format_len; +int outputlinelen = OUTPUTLINELEN; char *cp, *cwd, *maildir, *dfolder = NULL; char *ed = NULL, *file = NULL, *form = NULL; char *folder = NULL, *msg = NULL, buf[BUFSIZ]; char drft[BUFSIZ], **argp, **arguments; struct msgs *mp = NULL; +struct format *fmt; struct stat st; #ifdef LOCALE @@ -195,6 +198,8 @@ main (int argc, char **argv) if (form && (folder || msg)) adios (NULL, "can't mix forms and folders/msgs"); +cp = NULL; + if (folder || msg) { /* * Use a message as the "form" for the new message. @@ -226,8 +231,17 @@ main (int argc, char **argv) if ((in = open (form = getcpy (m_name (mp->lowsel)), O_RDONLY)) == NOTOK) adios (form, "unable to open message"); -} else - in = open_form(&form, components); +} else { + if (! form) + form = components; + +cp = new_fs(form, NULL, NULL); + format_len = strlen(cp); + ncomps = fmt_compile(cp, &fmt); + if (ncomps > 0) { + adios(NULL, "format components not supported when using comp"); + } +} try_it_again: strncpy (drft, m_draft (dfolder, file, use, &isdf), sizeof(drft)); @@ -284,8 +298,23 @@ try_it_again: if ((out = creat (drft, m_gmprot ())) == NOTOK) adios (drft, "unable to create"); -cpydata (in, out, form, drft); -close (in); +if (cp) { + char *scanl; + + i = format_len + 1024; + scanl = mh_xmalloc((size_t) i + 2); + dat[0] = 0; + dat[1] = 0; + dat[2] = 0; + dat[3] = outputlinelen; + dat[4] = 0; + fmt_scan(fmt, scanl, i, dat); + write(out, scanl, strlen(scanl)); + free(scanl); +} else { + cpydata (in, out, form, drft); + close (in); +} close (out); edit_it: http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4f9a626afed661270364f0f7982fc3767f688e05 commit 4f9a626afed661270364f0f7982fc3767f688e05 Author: Ken Hornstein Date: Fri Feb 17 15:10:06 2012 -0500 Sigh. Looks like we need a function after all; create a new function called %(localmbox). diff --git a/h/mts.h b/h/mts.h index a8d795f..2888c57 100644 --- a/h/mts.h +++ b/h/mts.h @@ -24,6 +24,7 @@ extern char *uucplfil; char *getusername(void); c
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 907d56122e31657df15e9bc79460210deedaefd9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 907d56122e31657df15e9bc79460210deedaefd9 (commit) via 6cd749f4e818af7d10dfd6b1de1bb37cb7915acd (commit) from c9dc470a7982250085c721e3f1436add8110ef63 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=907d56122e31657df15e9bc79460210deedaefd9 commit 907d56122e31657df15e9bc79460210deedaefd9 Author: Ken Hornstein Date: Sun Feb 19 19:59:06 2012 -0500 Add support for "to", "cc", "from", and "fcc" components via command-line switches. diff --git a/etc/components b/etc/components index 95be90c..26d54c2 100644 --- a/etc/components +++ b/etc/components @@ -1,6 +1,6 @@ -From: %(localmbox) -To: -cc: -Fcc: +outbox +%<{from}%|%(void(localmbox))%>%(void(width))%(putaddr From: ) +%<{to}%(void(width))%(putaddr To: )%|To:%> +%<{cc}%(void(width))%(putaddr cc: )%|cc:%> +Fcc: %<{fcc}%(putstr)%|+outbox%> Subject: diff --git a/man/comp.man b/man/comp.man index 643c056..251619b 100644 --- a/man/comp.man +++ b/man/comp.man @@ -23,6 +23,16 @@ comp \- compose a message .RB [ \-editor .IR editor ] .RB [ \-noedit ] +.RB [ \-width +.IR columns ] +.RB [ \-from +.IR address ] +.RB [ \-to +.IR address ] +.RB [ \-cc +.IR address ] +.RB [ \-fcc +.IR +folder ] .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] @@ -37,11 +47,18 @@ the draft (unless .B \-noedit is given, in which case the initial edit is suppressed). .PP -The default message form contains the following elements: +The default message template \*(lqcomponents\*(rq will direct +.B comp +to construct the messgage draft as follows: .PP .RS 5 .nf -%components% +From: {from switch} or or +To: {to switch} or blank +cc: {cc switch} or blank +Fcc: {fcc switch} or +outbox +Subject: + .fi .RE .PP @@ -107,6 +124,43 @@ or switchs will NOT be processed with .BR mh\-format (5). .PP +In addition to the standard +.BR mh\-format (5) +escapes, +.B comp +the following +.I component +escapes are either new or have an alternate meaning: +.PP +.RS 5 +.nf +.ta \w'Escape 'u +\w'Returns 'u +.I Escape Returns Description +fccstring Any folders specified with `\-fcc\ folder' +from string Any addresses specified with `\-from\ address' +to string Any addresses specified with `\-to\ address' +cc string Any addresses specified with `\-cc\ address' +.fi +.RE +.PP +By default the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields are empty. You may +add addresses to these fields with the +.B \-to +.I address +and +.B \-cc +.I address +switches. You may give these switches multiple times to add multiple +addresses. +.PP +By default the \*(lqFrom:\*(rq field has either the value of the +.B Local\-Mailbox +profile entry or a system default email address. This default can be +overridden by using the +.B \-from +.I address +switch. +.PP If the draft already exists, .B comp will ask you as to the disposition diff --git a/uip/comp.c b/uip/comp.c index a29bfcd..2eea08a 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -39,6 +39,16 @@ static struct swit switches[] = { { "version", 0 }, #defineHELPSW12 { "help", 0 }, +#define TOSW 13 +{ "to address", 0 }, +#define CCSW 14 +{ "cc address", 0 }, +#define FROMSW15 +{ "from address", 0 }, +#define FCCSW 16 +{ "fcc mailbox", 0 }, +#define WIDTHSW 17 +{ "width colums", 0 }, { NULL, 0 } }; @@ -67,6 +77,11 @@ static struct swit aqrul[] = { { NULL, 0 } }; +/* + * Add an item to a comma seperated list + */ + +static char *addlist(char *, char *); int main (int argc, char **argv) @@ -77,6 +92,7 @@ main (int argc, char **argv) char *cp, *cwd, *maildir, *dfolder = NULL; char *ed = NULL, *file = NULL, *form = NULL; char *folder = NULL, *msg = NULL, buf[BUFSIZ]; +char *to = NULL, *from = NULL, *cc = NULL, *fcc = NULL, *dp; char drft[BUFSIZ], **argp, **arguments; struct msgs *mp = NULL; struct format *fmt; @@ -167,6 +183,42 @@ main (int argc, char **argv) dfolder = NULL; isdf = NOTOK; continue; + + case TOSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + to
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 9e27fef315a1e9df848c357cc4c96b1c000bfcd7
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 9e27fef315a1e9df848c357cc4c96b1c000bfcd7 (commit) via ae773e71c0efe0a8a7bb2f243e784c576e72c9e4 (commit) from 5ea646bd6534ab3b4d228c1c20998fdfa69ecfcf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=9e27fef315a1e9df848c357cc4c96b1c000bfcd7 commit 9e27fef315a1e9df848c357cc4c96b1c000bfcd7 Author: Ken Hornstein Date: Mon Feb 20 00:31:14 2012 -0500 Put default From: headers in these component files, and document the components file now that we can have comments. diff --git a/etc/components b/etc/components index 26d54c2..64a0337 100644 --- a/etc/components +++ b/etc/components @@ -1,6 +1,25 @@ +%; +%; Our default components file. Used by `comp' +%; +%; +%; This line creates our From: header based on the following ordering: +%; +%; - Use a -from switch if it exists ({from}) +%; - Use our local mailbox identity; first from the Local-Mailbox profile +%; entry, otherwise gets the information from the local system +%; %<{from}%|%(void(localmbox))%>%(void(width))%(putaddr From: ) +%; +%; Here we include an address list if one or more "-to" arguments were +%; given, otherwise just output a blank header. We do the same for the +%; "cc" header as well. +%; %<{to}%(void(width))%(putaddr To: )%|To:%> %<{cc}%(void(width))%(putaddr cc: )%|cc:%> +%; +%; Slight difference here: if we're not given "-fcc" on the command line, +%; make the default mailbox +outbox +%; Fcc: %<{fcc}%(putstr)%|+outbox%> Subject: diff --git a/etc/replcomps b/etc/replcomps index 9166411..204f117 100644 --- a/etc/replcomps +++ b/etc/replcomps @@ -1,4 +1,9 @@ -%; $Header$ +%; +%; replcomps - our default component file for "repl" +%; +%; +%; First, output a "From" header. +%(void(localmbox))%(void(width))%(putaddr From: ) %; %; These next lines slurp in lots of addresses for To: and cc:. %; Use with repl -query or else you may get flooded with addresses! diff --git a/etc/replgroupcomps b/etc/replgroupcomps index 210a3e0..7b48e18 100644 --- a/etc/replgroupcomps +++ b/etc/replgroupcomps @@ -20,6 +20,7 @@ %; cc (and) %; personal address %; +%(void(localmbox))%(void(width))%(putaddr From: ) %(lit)%(formataddr{mail-followup-to})\ %<(nonnull)%(void(width))%(putaddr To: )\n\ %|\ http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ae773e71c0efe0a8a7bb2f243e784c576e72c9e4 commit ae773e71c0efe0a8a7bb2f243e784c576e72c9e4 Author: Ken Hornstein Date: Mon Feb 20 00:31:01 2012 -0500 Clean up documentation formatting diff --git a/man/comp.man b/man/comp.man index 251619b..aa0c184 100644 --- a/man/comp.man +++ b/man/comp.man @@ -135,7 +135,7 @@ escapes are either new or have an alternate meaning: .RS 5 .nf .ta \w'Escape 'u +\w'Returns 'u -.I Escape Returns Description +.I Escape Returns Description fccstring Any folders specified with `\-fcc\ folder' from string Any addresses specified with `\-from\ address' to string Any addresses specified with `\-to\ address' diff --git a/man/mh-format.man b/man/mh-format.man index 6b384d1..d8a83b2 100644 --- a/man/mh-format.man +++ b/man/mh-format.man @@ -261,9 +261,9 @@ width integer output buffer size in bytes charleft integer bytes left in output buffer timenowinteger seconds since the UNIX epoch me string the user's mailbox (username) -myhost string the user's local hostname -myname string the user's name -localmbox string the complete local mailbox +myhost string the user's local hostname +myname string the user's name +localmbox string the complete local mailbox eq literal boolean \fInum\fR == \fIarg\fR ne literal boolean \fInum\fR != \fIarg\fR gt literal boolean \fInum\fR > \fIarg\fR --- Summary of changes: etc/components | 19 +++ etc/replcomps |7 ++- etc/replgroupcomps |1 + man/comp.man |2 +- man/mh-format.man |6 +++--- 5 files changed, 30 insertions(+), 5 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 1dd8eb505ef646b8489a08edd60309ee97248143
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 1dd8eb505ef646b8489a08edd60309ee97248143 (commit) via 4515ad4efbd7016b1104205ef3d7302de82aba9c (commit) from b0b7ee58c482bf36063e6158f610dd337f3ca568 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=1dd8eb505ef646b8489a08edd60309ee97248143 commit 1dd8eb505ef646b8489a08edd60309ee97248143 Author: Ken Hornstein Date: Tue Feb 21 15:56:06 2012 -0500 Add support for a -subject switch to comp. diff --git a/etc/components b/etc/components index 64a0337..d4d4f7c 100644 --- a/etc/components +++ b/etc/components @@ -21,5 +21,5 @@ %; make the default mailbox +outbox %; Fcc: %<{fcc}%(putstr)%|+outbox%> -Subject: +Subject:%<{subject} %(putstr)%> diff --git a/man/comp.man b/man/comp.man index aa0c184..4a7152d 100644 --- a/man/comp.man +++ b/man/comp.man @@ -33,6 +33,8 @@ comp \- compose a message .IR address ] .RB [ \-fcc .IR +folder ] +.RB [ \-subject +.IR text ] .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] @@ -57,7 +59,7 @@ From: {from switch} or or To: {to switch} or blank cc: {cc switch} or blank Fcc: {fcc switch} or +outbox -Subject: +Subject: {subject switch} or blank .fi .RE @@ -140,6 +142,7 @@ fcc string Any folders specified with `\-fcc\ folder' from string Any addresses specified with `\-from\ address' to string Any addresses specified with `\-to\ address' cc string Any addresses specified with `\-cc\ address' +subjectstring Any text specified with `\-subject\ text' .fi .RE .PP @@ -161,6 +164,10 @@ overridden by using the .I address switch. .PP +Any text you give to the +.B \-subject +switch will be placed in the \*(lqSubject:\*(rq field in the draft. +.PP If the draft already exists, .B comp will ask you as to the disposition diff --git a/uip/comp.c b/uip/comp.c index 812f596..c8189d1 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -49,6 +49,8 @@ static struct swit switches[] = { { "fcc mailbox", 0 }, #define WIDTHSW 17 { "width colums", 0 }, +#define SUBJECTSW 18 +{ "subject text", 0 }, { NULL, 0 } }; @@ -93,6 +95,7 @@ main (int argc, char **argv) char *ed = NULL, *file = NULL, *form = NULL; char *folder = NULL, *msg = NULL, buf[BUFSIZ]; char *to = NULL, *from = NULL, *cc = NULL, *fcc = NULL, *dp; +char *subject = NULL; char drft[BUFSIZ], **argp, **arguments; struct msgs *mp = NULL; struct format *fmt; @@ -219,6 +222,12 @@ main (int argc, char **argv) if ((outputlinelen = atoi(cp)) < 10) adios (NULL, "impossible width %d", outputlinelen); continue; + + case SUBJECTSW: + if (!(cp = *argp++) || *cp == '-') + adios (NULL, "missing argument to %s", argp[-2]); + subject = cp; + continue; } } if (*cp == '+' || *cp == '@') { @@ -317,6 +326,11 @@ main (int argc, char **argv) if (cptr) cptr->c_text = fcc; } + if (subject) { + FINDCOMP(cptr, "subject"); + if (cptr) + cptr->c_text = subject; + } } try_it_again: http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4515ad4efbd7016b1104205ef3d7302de82aba9c commit 4515ad4efbd7016b1104205ef3d7302de82aba9c Author: Ken Hornstein Date: Tue Feb 21 12:58:50 2012 -0500 Switch from (me) to (localmbox) to make -cc me work correctly. diff --git a/etc/replcomps b/etc/replcomps index 204f117..68ca84b 100644 --- a/etc/replcomps +++ b/etc/replcomps @@ -22,7 +22,7 @@ %(formataddr{x-cc})\ %(formataddr{resent-cc})\ %(formataddr{prev-resent-cc})\ -%(formataddr(me))\ +%(formataddr(localmbox))\ %(void(width))%(putaddr cc: ) Fcc: %<{fcc}%{fcc}%|+outbox%> Subject: %<{subject}Re: %(void{subject})%(trim)%(putstr)%> diff --git a/etc/replgroupcomps b/etc/replgroupcomps index 7b48e18..8398f50 100644 --- a/etc/replgroupcomps +++ b/etc/replgroupcomps @@ -26,7 +26,7 @@ %|\ %(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\ %<(nonnull)%(void(width))%(putaddr To: )\n%>\ -%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ +%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(localmbox))\ %<(nonnull)%(void(width))%(putaddr cc: )\n%>%
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5 (commit) from fd250083492420769109b2d07790e8c695a2e2ed (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5 commit 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5 Author: Ken Hornstein Date: Thu Feb 23 12:03:09 2012 -0500 Create a test for the new mh-format processing available in comp(1). diff --git a/Makefile.am b/Makefile.am index e86320e..2d3342b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,8 @@ TESTS_ENVIRONMENT = MH_OBJ_DIR=@abs_builddir@ \ ## ## Important note: the "cleanup" test should always be last ## -TESTS = test/bad-input/test-header test/folder/test-create \ +TESTS = test/bad-input/test-header test/comp/test-comp-format \ + test/folder/test-create \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ test/format/test-mymbox \ diff --git a/test/comp/test-comp-format b/test/comp/test-comp-format new file mode 100755 index 000..1f1f8c5 --- /dev/null +++ b/test/comp/test-comp-format @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Tests to see if the -from, -to, -cc, -fcc, and -subject switches to +# "comp" work correctly. +# + +if test -z "${MH_OBJ_DIR}"; then +srcdir=`dirname "$0"`/../.. +MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "$MH_OBJ_DIR/test/common.sh" + +setup_test + +# +# Create a test template file (we create one here just in case the master +# one changes) +# + +form="${MH_TEST_DIR}/$$.components" +cat > $form < $expected <https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 2d1f77125ffb16daf661a40710bb0fb48343d1f9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 2d1f77125ffb16daf661a40710bb0fb48343d1f9 (commit) from 98e2ac4aa016aecbca7e9b8e8bcb8ecfa7bba1b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2d1f77125ffb16daf661a40710bb0fb48343d1f9 commit 2d1f77125ffb16daf661a40710bb0fb48343d1f9 Author: Ken Hornstein Date: Sun Feb 26 00:09:52 2012 -0500 Finally, some support for mh-format when using forw(1). Still needs some tests. diff --git a/Makefile.am b/Makefile.am index 2d3342b..a219981 100644 --- a/Makefile.am +++ b/Makefile.am @@ -145,6 +145,9 @@ dist_sysconf_DATA = etc/MailAliases etc/components etc/digestcomps \ ## sysconf_DATA = etc/mhn.defaults etc/mts.conf +## +## Documentation that gets installed in docdir +## dist_doc_DATA = COPYRIGHT VERSION docs/COMPLETION-BASH docs/COMPLETION-TCSH \ docs/COMPLETION-ZSH docs/DIFFERENCES docs/FAQ \ docs/MAIL.FILTERING docs/MAILING-LISTS docs/README-ATTACHMENTS \ @@ -223,7 +226,7 @@ uip_flist_SOURCES = uip/flist.c uip_folder_SOURCES = uip/folder.c uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ - uip/annosbr.c uip/distsbr.c + uip/annosbr.c uip/distsbr.c uip/forwsbr.c uip_forw_LDADD = $(LDADD) $(ICONVLIB) uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c \ @@ -547,6 +550,7 @@ rpm: dist cscope: echo "-I $(srcdir)/h -I $(srcdir)/sbr -I $(srcdir)/uip -I $(srcdir)/mts/smtp" > cscope.files find $(srcdir) \( -name \*.c -o -name \*.l \) -print | grep -v dtimep.c >> cscope.files +.PHONY: cscope ## ## Rules to upload the distribution to savannah diff --git a/etc/digestcomps b/etc/digestcomps index 7f5036d..fdb55f8 100644 --- a/etc/digestcomps +++ b/etc/digestcomps @@ -3,7 +3,7 @@ To: %{digest} Distribution: dist-%{digest}; Subject: %{digest} Digest V%(cur) #%(msg) Reply-To: %{digest} -%{digest} Digest %(weekday{date}), %2(mday{date}) %(month{date}) %(year{date}) +%{digest} Digest %(weekday{nmh-date}), %2(mday{nmh-date}) %(month{nmh-date}) %(year{nmh-date}) Volume %(cur) : Issue %(msg) Today's Topics: diff --git a/etc/forwcomps b/etc/forwcomps index 7f255ea..fdfb23b 100644 --- a/etc/forwcomps +++ b/etc/forwcomps @@ -1,5 +1,6 @@ -To: -cc: -Fcc: +outbox -Subject: +%<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr From: ) +%<{nmh-to}%(void(width))%(putaddr To: )%|To:%> +%<{nmh-cc}%(void(width))%(putaddr cc: )%|cc:%> +Fcc: %<{fcc}%(putstr)%|+outbox%> +Subject:%<{nmh-subject} %(trim)%(putlit)%?{subject} %(trim)%(putlit) (fwd)%> diff --git a/h/prototypes.h b/h/prototypes.h index 11db40d..ad9a87e 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -146,6 +146,8 @@ void annopreserve(int); int distout (char *, char *, char *); void replout (FILE *, char *, char *, struct msgs *, int, int, char *, char *, char *); +int build_form (char *, char *, int *, char *, char *, char *, char *, + char *, char *); int sendsbr (char **, int, char *, struct stat *, int, char *, int); int what_now (char *, int, int, char *, char *, int, struct msgs *, char *, int, char *); diff --git a/h/utils.h b/h/utils.h index b9660a5..8142b2c 100644 --- a/h/utils.h +++ b/h/utils.h @@ -7,6 +7,7 @@ void *mh_xmalloc(size_t); void *mh_xrealloc(void *, size_t); char *pwd(void); char *add(char *, char *); +char *addlist(char *, char *); int folder_exists(char *); void create_folder(char *, int, void (*)(int)); int num_digits(int); diff --git a/sbr/utils.c b/sbr/utils.c index 48969ab..cce7378 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -123,6 +123,19 @@ add (char *s2, char *s1) } /* + * addlist + * Append an item to a comma separated list + */ +char * +addlist (char *list, char *item) +{ +if (list) + list = add (", ", list); + +return add (item, list); +} + +/* * folder_exists * Check to see if a folder exists. */ diff --git a/uip/comp.c b/uip/comp.c index c8189d1..111a219 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -79,12 +79,6 @@ static struct swit aqrul[] = { { NULL, 0 } }; -/* - * Add an item to a comma seperated list - */ - -static char *addlist(char *, char *); - int main (int argc, char **argv) { @@ -416,16 +410,3 @@ edit_it: done (1); return 1; } - -/* - * Append an item to a comma separated list - */ - -static char * -addlist (char *list, char *item) -{ -if (list) - li
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. dd404b3a868b38cdc9c7271778e7ec6591fb04a8
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via dd404b3a868b38cdc9c7271778e7ec6591fb04a8 (commit) via 027327f82f3672985aa02fb84e558341ca8b9a1f (commit) via 80b2767e80252044eee232384b1f95dc6b61 (commit) via 93e6b630a5345efe78204664922694793d1ac322 (commit) via eebcc9039a6802fbd4bf2df240054dfba9d2c31b (commit) via 30c4f6dab4681a60d08b56d9c0c2368ba84a3409 (commit) from df31d2abe4d453eaef9a818a83bae42e80a1e67b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=dd404b3a868b38cdc9c7271778e7ec6591fb04a8 commit dd404b3a868b38cdc9c7271778e7ec6591fb04a8 Author: Ken Hornstein Date: Sun Feb 26 21:29:44 2012 -0500 Remove the forw-digest test until we have it working. diff --git a/Makefile.am b/Makefile.am index 8ab7a72..0889486 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,6 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ test/format/test-mymbox test/forw/test-forw-format \ - test/forw/test-forw-digest \ test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhpath/test-mhpath \ http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=027327f82f3672985aa02fb84e558341ca8b9a1f commit 027327f82f3672985aa02fb84e558341ca8b9a1f Author: Ken Hornstein Date: Sun Feb 26 21:29:01 2012 -0500 A test for forw -digest. It doesn't quite work yet. diff --git a/Makefile.am b/Makefile.am index 0889486..8ab7a72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ test/format/test-mymbox test/forw/test-forw-format \ + test/forw/test-forw-digest \ test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhpath/test-mhpath \ diff --git a/etc/digestcomps b/etc/digestcomps index fdb55f8..5b310d5 100644 --- a/etc/digestcomps +++ b/etc/digestcomps @@ -1,5 +1,5 @@ -From:%{digest}-Request -To: %{digest} Distribution: dist-%{digest}; +%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> +%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> Subject: %{digest} Digest V%(cur) #%(msg) Reply-To: %{digest} diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest new file mode 100755 index 000..9d62fc8 --- /dev/null +++ b/test/forw/test-forw-digest @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Tests to see if "forw -digest" works correctly. +# + +if test -z "${MH_OBJ_DIR}"; then +srcdir=`dirname "$0"`/../.. +MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "$MH_OBJ_DIR/test/common.sh" + +setup_test + +expected="${MH_TEST_DIR}/$$.expected" +actual="${MH_TEST_DIR}/Mail/draft" +from="Mr Test User " +to1="User One " +to2="User Two " +cc1="CC User One " +cc2="CC User Two " +cc3="CC User Three " +cc4="CC User Four " +fcc1="+nosuchmailbox" +fcc2="+nosuchmailbox2" + +cat > "$expected" <http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=80b2767e80252044eee232384b1f95dc6b61 commit 80b2767e80252044eee232384b1f95dc6b61 Author: Ken Hornstein Date: Sun Feb 26 21:14:04 2012 -0500 Fix up some of the pick tests: - Change sed invocation around to get rid of GNU sed extensions - Put explicit times in the pick tests (if you don't, it uses the current hour/minutes as the timestamp, which means it could work or not work depending on what time of day you run the tests). diff --git a/test/pick/test-pick b/test/pick/test-pick index 6ee4449..2396811 100755 --- a/test/pick/test-pick +++ b/test/pick/test-pick @@ -22,8 +22,10 @@ actual=$MH_TEST_DIR/$$.actual # Add an 11th message. sed \ -e 's/10/11/g' \ - -e 's/^To:\(.*\)/To:\1\nCc: /' \ - -e 's/^\(Date:.*\)2006\( 00:00:\)00/\12008\200\nDelivery-Date: \12009\241/' \ + -e 's/^To:\(.*\)/To:\1\ +Cc: /' \ + -e 's/^\(Date:.*\)2006\( 00:00:\)00/\12008\200\ +Delivery-Date: \12009\241/' \ $MH_TES
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb (commit) via 1f9cbd73830742dc7039f53b8672d8a5aaf75c11 (commit) via efa71a4135a711d8ab79809e635de4091ccf6013 (commit) from dd404b3a868b38cdc9c7271778e7ec6591fb04a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb commit 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb Author: Ken Hornstein Date: Mon Feb 27 13:45:37 2012 -0500 Got the forw -digest test working. diff --git a/Makefile.am b/Makefile.am index 0889486..aa775f7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,9 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format \ test/folder/test-create \ test/folder/test-total test/format/test-localmbox \ test/format/test-myname test/format/test-myhost \ - test/format/test-mymbox test/forw/test-forw-format \ + test/format/test-mymbox \ + test/forw/test-forw-digest \ + test/forw/test-forw-format \ test/inc/test-deb359167 test/inc/test-eom-align \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhpath/test-mhpath \ diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest index 9d62fc8..6792a78 100755 --- a/test/forw/test-forw-digest +++ b/test/forw/test-forw-digest @@ -24,27 +24,94 @@ cc4="CC User Four " fcc1="+nosuchmailbox" fcc2="+nosuchmailbox2" +digestdate=$(date "+%A, %d %b %G") + cat > "$expected" <> "$expected" +cat >> "$expected" <> "$expected" < "$expected" <> "$expected" +cat >> "$expected" <> "$expected" <http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=1f9cbd73830742dc7039f53b8672d8a5aaf75c11 commit 1f9cbd73830742dc7039f53b8672d8a5aaf75c11 Author: Ken Hornstein Date: Mon Feb 27 13:37:09 2012 -0500 Update digestcomps and forwcomps with comments and better formatting. diff --git a/etc/digestcomps b/etc/digestcomps index 5b310d5..19d97ac 100644 --- a/etc/digestcomps +++ b/etc/digestcomps @@ -1,6 +1,18 @@ -%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> -%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> -Subject: %{digest} Digest V%(cur) #%(msg) +%; +%; digestcomps - the component template file used when doing "forw -digest" +%; +%; What happens here is the following: +%; +%; - Try to make reasonable defaults when using -digest +%; - Allow users to override headers if they give them +%; +%; See forwcomps for more details on how this works +%; +%<{nmh-from}%(void(width))%(putaddr From: )%|From: %{digest}-Request%> +%<{nmh-to}%(void(width))%(putaddr To: )%|To: %{digest} Distribution: dist-%{digest};%> +%<{nmh-cc}%(void(width))%(putaddr cc: )\n%>\ +%<{fcc}Fcc: %(putstr)\n%>\ +Subject: %<{nmh-subject}%(putlit)%|%{digest} Digest V%(cur) #%(msg)%> Reply-To: %{digest} %{digest} Digest %(weekday{nmh-date}), %2(mday{nmh-date}) %(month{nmh-date}) %(year{nmh-date}) diff --git a/etc/forwcomps b/etc/forwcomps index fdfb23b..4d9f192 100644 --- a/etc/forwcomps +++ b/etc/forwcomps @@ -1,6 +1,32 @@ +%; +%; forwcomps - Our components file when we're using "forw" +%; +%; We want people to be able to use the components from forwarded +%; messages in this file, so we have to cheat a bit. We create a series +%; of pseudo-components with a "nmh" prefix to represent arguments given +%; on the command line. We don't do this for %{fcc} since there's already +%; precedence for this from "repl". +%; +%; If we're given multiple messages to forward, provide the components +%; from the first one. Can't really think of anything better to do there. +%; +%; Generate a "From:" header; if we don't give one, use %(localmbox) +%; %<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr From: ) +%; +%; Generate To: and cc: headers; if we're given ones, put something in there +%; otherwise leave them blank. +%; %<{nmh-to}%(void(width))%(putaddr To: )%|To:%> %<{nmh-cc}%(void(width))%(putaddr cc: )%|cc:%> +%; +%; If we're not given a -fcc switch, then default to +outbox +%; Fcc: %<{fcc}%(putstr)%|+outbox%> +%; +%; If we're not given a -subj
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 3cc586b1fdcef6cecc89386e885175577535e10f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 3cc586b1fdcef6cecc89386e885175577535e10f (commit) via c8eef132f214f1086f8385629a1d36aa1d24920f (commit) from 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3cc586b1fdcef6cecc89386e885175577535e10f commit 3cc586b1fdcef6cecc89386e885175577535e10f Author: Ken Hornstein Date: Mon Feb 27 14:13:02 2012 -0500 Document changes to forw(1). diff --git a/man/forw.man b/man/forw.man index 5b7dc6d..d4edc2f 100644 --- a/man/forw.man +++ b/man/forw.man @@ -26,6 +26,18 @@ forw \- forward messages .RB [ \-editor .IR editor ] .RB [ \-noedit ] +.RB [ \-width +.IR colums ] +.RB [ \-from +.IR address ] +.RB [ \-to +.IR address ] +.RB [ \-cc +.IR address ] +.RB [ \-fcc +.IR +folder ] +.RB [ \-subject +.IR text ] .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] @@ -62,11 +74,17 @@ as in and after editing is complete, the user is prompted before the message is sent. .PP -The default message form contains the following elements: +The default message template will direct +.B forw +to construct the draft as follows: .PP .RS 5 .nf -%forwcomps% +From: {from switch} or or +To: {to switch} or blank +Fcc: {fcc switch} or +outbox +Subject: {subject switch} or "{original subject} (fwd)" + .fi .RE .PP @@ -77,6 +95,30 @@ it will be used instead of this default form. You may also specify an alternate forms file with the switch .B \-form .IR formfile . +Forms are processed via the +.B nmh +template system; see +.BR mh\-format (5) +for details. Components from the first forwarded message are available +as standard component escapes in the forms file. +.PP +In addition to the standard +.BR mh\-format (5) +escapes, the following +.I component +escapes are also supported: +.PP +.RS 5 +.nf +.ta \w'nmh\-subject'u +\w'Returns 'u +.I Escape Returns Description +fccstring Any folders specified with `\-fcc\ folder' +nmh\-from string Addresses specified with `\-from\ address' +nmh\-tostring Addresses specified with `\-to\ address' +nmh\-ccstring Addresses specified with `\-cc\ address' +nmh\-subject string Any text specified with `\-subject\ text' +.fi +.RE .PP If the draft already exists, .B forw http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c8eef132f214f1086f8385629a1d36aa1d24920f commit c8eef132f214f1086f8385629a1d36aa1d24920f Author: Ken Hornstein Date: Mon Feb 27 14:12:34 2012 -0500 Clean up some typos in here. diff --git a/man/comp.man b/man/comp.man index 4a7152d..26bdaa0 100644 --- a/man/comp.man +++ b/man/comp.man @@ -51,7 +51,7 @@ is given, in which case the initial edit is suppressed). .PP The default message template \*(lqcomponents\*(rq will direct .B comp -to construct the messgage draft as follows: +to construct the message draft as follows: .PP .RS 5 .nf @@ -117,9 +117,11 @@ switch says to use the named file as the message draft. .PP Forms that are selected via the .B \-form -switch are processed via the mh template system; see +switch are processed via the +.B nmh +template system; see .BR mh\-format (5) -for details. Drafts constructed from another mssage or with the +for details. Drafts constructed from another message or with the .B \-use or .B \-file @@ -129,7 +131,6 @@ switchs will NOT be processed with In addition to the standard .BR mh\-format (5) escapes, -.B comp the following .I component escapes are either new or have an alternate meaning: --- Summary of changes: man/comp.man |9 + man/forw.man | 46 -- 2 files changed, 49 insertions(+), 6 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 3bede3fae77775088b8b66e7a26a5e2ee1f61fff
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 3bede3fae5088b8b66e7a26a5e2ee1f61fff (commit) from 3cc586b1fdcef6cecc89386e885175577535e10f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3bede3fae5088b8b66e7a26a5e2ee1f61fff commit 3bede3fae5088b8b66e7a26a5e2ee1f61fff Author: Ken Hornstein Date: Mon Feb 27 20:50:49 2012 -0500 Add support for -nosasl and -saslmaxssf switches. diff --git a/man/post.man b/man/post.man index 2bff3de..50b0298 100644 --- a/man/post.man +++ b/man/post.man @@ -21,6 +21,9 @@ post \- deliver a message .RB [ \-width .IR columns ] .RB [ \-sasl ] +.RB [ \-nosasl ] +.RB [ \-saslmaxssf +.IR ssf ] .RB [ \-saslmech .IR mechanism ] .RB [ \-user @@ -195,7 +198,9 @@ If .B nmh has been compiled with SASL support, the .B \-sasl -switch will enable +and +.B \-nosasl +switches will enable and disable the use of SASL authentication with the SMTP MTA. Depending on the SASL mechanism used, this may require an additional password prompt from the user (but the @@ -214,7 +219,11 @@ will attempt to negotiate a security layer for session encryption. Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)' when viewing the SMTP transaction with the .B \-snoop -switch. +switch. The +.B \-saslmaxssf +switch can be used to select the maximum value of the Security Strength Factor. +This is an integer value and the exact meaning of this value depends on the +underlying SASL mechanism. A value of 0 disables encryption. .PP If .B nmh diff --git a/man/send.man b/man/send.man index d9158c8..87a74eb 100644 --- a/man/send.man +++ b/man/send.man @@ -33,6 +33,9 @@ send \- send a message .RB [ \-port .IR port-name/number ] .RB [ \-sasl ] +.RB [ \-nosasl ] +.RB [ \-saslmaxssf +.IR ssf ] .RB [ \-saslmech .IR mechanism ] .RB [ \-user @@ -336,7 +339,9 @@ If .B nmh has been compiled with SASL support, the .B \-sasl -switch will enable +and +.B \-nosasl +switches will enable and disable the use of SASL authentication with the SMTP MTA. Depending on the SASL mechanism used, this may require an additional password prompt from the user (but the @@ -355,7 +360,11 @@ will attempt to negotiate a security layer for session encryption. Encrypted data is labelled with `(encrypted)' and `(decrypted)' when viewing the SMTP transaction with the .B \-snoop -switch. +switch. The +.B \-saslmaxssf +switch can be used to select the maximum value of the Security Strength Factor. +This is an integer value and the exact meaning of this value depends on the +underlying SASL mechanism. A value of 0 disables encryption. .PP If .B nmh diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index faca17a..620dabc 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -147,9 +147,9 @@ char *EHLOkeys[MAXEHLO + 1]; * static prototypes */ static int smtp_init (char *, char *, char *, int, int, int, int, int, int, - char *, char *, int); + int, char *, char *, int); static int sendmail_init (char *, char *, int, int, int, int, int, int, - char *, char *); + int, char *, char *); static int rclient (char *, char *); static int sm_ierror (char *fmt, ...); @@ -173,26 +173,28 @@ static int sm_fgets(char *, int, FILE *); * Function prototypes needed for SASL */ -static int sm_auth_sasl(char *, char *, char *); +static int sm_auth_sasl(char *, int, char *, char *); #endif /* CYRUS_SASL */ int sm_init (char *client, char *server, char *port, int watch, int verbose, - int debug, int onex, int queued, int sasl, char *saslmech, - char *user, int tls) + int debug, int onex, int queued, int sasl, int saslssf, +char *saslmech, char *user, int tls) { if (sm_mts == MTS_SMTP) return smtp_init (client, server, port, watch, verbose, - debug, onex, queued, sasl, saslmech, user, tls); + debug, onex, queued, sasl, saslssf, saslmech, + user, tls); else return sendmail_init (client, server, watch, verbose, - debug, onex, queued, sasl, saslmech, user); + debug, onex, queued, sasl, saslssf, saslmech, + user); } static int smtp_init (char *client, char *server, char *port, int watch, int verbose, int debug, int onex, int queued, - int sasl, char *saslmech, char *user, int tls) + int sas
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 7d2c0f47e69415ffb3425f46f0fd78a984e119e2
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 7d2c0f47e69415ffb3425f46f0fd78a984e119e2 (commit) from 314cc2b7c5640f2685a119a90bb92f1e41e6c618 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=7d2c0f47e69415ffb3425f46f0fd78a984e119e2 commit 7d2c0f47e69415ffb3425f46f0fd78a984e119e2 Author: Ken Hornstein Date: Mon Feb 27 22:05:41 2012 -0500 Fix bug #1466. It turns out that RFC 934 specifies that any line starting with a "-" but NOT followed by a space is a valid message delimiter. We only supported one type of message delimiter. Adapt the code so any valid delimiter is supported. diff --git a/uip/burst.c b/uip/burst.c index 89aeac2..2c741c7 100644 --- a/uip/burst.c +++ b/uip/burst.c @@ -29,8 +29,6 @@ static struct swit switches[] = { { NULL, 0 } }; -static char delim3[] = "---"; - struct smsg { long s_start; long s_stop; @@ -43,6 +41,16 @@ static int find_delim (int, struct smsg *); static void burst (struct msgs **, int, struct smsg *, int, int, int, char *); static void cpybrst (FILE *, FILE *, char *, char *, int); +/* + * A macro to check to see if we have reached a message delimiter + * (an encapsulation boundary, EB, in RFC 934 parlance). + * + * According to RFC 934, an EB is simply a line which starts with + * a "-" and is NOT followed by a space. So even a single "-" on a line + * by itself would be an EB. + */ + +#define CHECKDELIM(buffer) (buffer[0] == '-' && buffer[1] != ' ') int main (int argc, char **argv) @@ -200,15 +208,13 @@ main (int argc, char **argv) static int find_delim (int msgnum, struct smsg *smsgs) { -int ld3, wasdlm, msgp; +int wasdlm, msgp; long pos; char c, *msgnam; int cc; char buffer[BUFSIZ]; FILE *in; -ld3 = strlen (delim3); - if ((in = fopen (msgnam = m_name (msgnum), "r")) == NULL) adios (msgnam, "unable to read message"); @@ -221,7 +227,7 @@ find_delim (int msgnum, struct smsg *smsgs) smsgs[msgp].s_start = pos; for (c = 0; fgets (buffer, sizeof(buffer), in); c = buffer[0]) { - if (strncmp (buffer, delim3, ld3) == 0 + if (CHECKDELIM(buffer) && (msgp == 1 || c == '\n') && ((cc = peekc (in)) == '\n' || cc == EOF)) break; @@ -229,7 +235,7 @@ find_delim (int msgnum, struct smsg *smsgs) pos += (long) strlen (buffer); } - wasdlm = strncmp (buffer, delim3, ld3) == 0; + wasdlm = CHECKDELIM(buffer); if (smsgs[msgp].s_start != pos) smsgs[msgp++].s_stop = (c == '\n' && wasdlm) ? pos - 1 : pos; if (feof (in)) { --- Summary of changes: uip/burst.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. e22a2c8b3665531be1203a59de768c909f52c7c6
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via e22a2c8b3665531be1203a59de768c909f52c7c6 (commit) from 7d2c0f47e69415ffb3425f46f0fd78a984e119e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=e22a2c8b3665531be1203a59de768c909f52c7c6 commit e22a2c8b3665531be1203a59de768c909f52c7c6 Author: Ken Hornstein Date: Mon Feb 27 22:11:34 2012 -0500 Add the note about the burst(1) change to pending-release-notes. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index f01ebdc..8efb7b9 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -39,3 +39,4 @@ Things to add to the release notes for the next full release: for sending. The default component templates have all been adjusted to include appropriate From: headers based on either the -from switch or the local mailbox. +- burst(1) now supports any valid message delimiter according to RFC 934. --- Summary of changes: docs/pending-release-notes |1 + 1 files changed, 1 insertions(+), 0 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. a80e3521e108c8c625c40595453e235e43d84800
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via a80e3521e108c8c625c40595453e235e43d84800 (commit) via 4d87cf4cd1673a5464c37e56b94aa3ce4c0db4a7 (commit) via c8f2ee90aba3d5db2cbf170b3c2f7e4ea1d84aeb (commit) via 99d483daa9db000183219129893ee2fd21961aae (commit) via 7efaea5e53d58f4d8c5b5217ecc4974b62a62eea (commit) via f5c68314176516f689cabf693ed49792d900 (commit) via df6971a59e8d01dcfe605bbac949b7d4b3ab0a92 (commit) from 9b152e23db633c49c43313a2ef26ebc0951cc874 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a80e3521e108c8c625c40595453e235e43d84800 commit a80e3521e108c8c625c40595453e235e43d84800 Author: Ken Hornstein Date: Wed Feb 29 08:52:26 2012 -0500 Fix a segfault that happens when using the -file option. diff --git a/uip/dist.c b/uip/dist.c index 807eb78..20ae318 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -303,7 +303,7 @@ try_it_again: msgnam = file ? file : getcpy (m_name (mp->lowsel)); -dat[0] = mp->lowsel; +dat[0] = mp ? mp->lowsel : 0; dat[1] = 0; dat[2] = 0; dat[3] = outputlinelen; http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4d87cf4cd1673a5464c37e56b94aa3ce4c0db4a7 commit 4d87cf4cd1673a5464c37e56b94aa3ce4c0db4a7 Author: Ken Hornstein Date: Wed Feb 29 08:51:27 2012 -0500 Argh, I didn't mean to commit the distcomps I was using for testing! diff --git a/etc/distcomps b/etc/distcomps index 6aaeba5..18408e6 100644 --- a/etc/distcomps +++ b/etc/distcomps @@ -11,6 +11,6 @@ %; if you wish to use them. %; %<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr Resent-From: ) -%<{nmh-to}%(void(width))%(putaddr Resent-To: )%|Resent-To: %(msg) %{subject}%> +%<{nmh-to}%(void(width))%(putaddr Resent-To: )%|Resent-To:%> %<{nmh-cc}%(void(width))%(putaddr Resent-cc: )%|Resent-cc:%> %<{nmh-fcc}%(void(width))%(putaddr Resent-fcc: )%|Resent-fcc:%> http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c8f2ee90aba3d5db2cbf170b3c2f7e4ea1d84aeb commit c8f2ee90aba3d5db2cbf170b3c2f7e4ea1d84aeb Author: Ken Hornstein Date: Tue Feb 28 15:38:56 2012 -0500 dist(1) now processes drafts using mh-format! The last of the programs to do so! diff --git a/Makefile.am b/Makefile.am index aa775f7..2b2cc63 100644 --- a/Makefile.am +++ b/Makefile.am @@ -221,7 +221,8 @@ uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip_comp_LDADD = $(LDADD) $(ICONVLIB) uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ - uip/annosbr.c uip/distsbr.c + uip/annosbr.c uip/distsbr.c uip/forwsbr.c +uip_dist_LDADD = $(LDADD) $(ICONVLIB) uip_flist_SOURCES = uip/flist.c @@ -497,12 +498,6 @@ man/man.sed: Makefile @echo 's,%manext1%,$(manext1),g' >> $@ @echo 's,%manext5%,$(manext5),g' >> $@ @echo 's,%manext8%,$(manext8),g' >> $@ - @echo '/%components%/r $(top_srcdir)/etc/components' >> $@ - @echo ' s,%components%,,g' >> $@ - @echo '/%distcomps%/r $(top_srcdir)/etc/distcomps' >> $@ - @echo ' s,%distcomps%,,g' >> $@ - @echo '/%forwcomps%/r $(top_srcdir)/etc/forwcomps' >> $@ - @echo ' s,%forwcomps%,,g' >> $@ @echo '/%mhl_forward%/r $(top_srcdir)/etc/mhl.forward' >> $@ @echo ' s,%mhl_forward%,,g' >> $@ @echo '/%mhl_format%/r $(top_srcdir)/etc/mhl.format' >> $@ diff --git a/etc/distcomps b/etc/distcomps index d30819a..6aaeba5 100644 --- a/etc/distcomps +++ b/etc/distcomps @@ -1,3 +1,16 @@ -Resent-To: -Resent-cc: -Resent-fcc: +%; +%; distcomps - Our components file for "dist" +%; +%; This is modeled after the components file for forw, so check that +%; file for more explanation as to what is going on here. +%; +%; When using "dist" we have to use the special Resent- headers, since +%; we're keeping the original headers of the message intact. +%; +%; All of the header components from the original message are available +%; if you wish to use them. +%; +%<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr Resent-From: ) +%<{nmh-to}%(void(width))%(putaddr Resent-To: )%|Resent-To: %(msg) %{subject}%> +%<{nmh-cc}%(void(width))%(putaddr Resent-cc: )%|Resent-cc:%> +%<{nmh-fcc}%(void(width))%(putaddr Resent-fcc: )%|Resent-fcc:%>
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. ab719ef6625da100f92aa8c2d6f8ae6ea7bae2cb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via ab719ef6625da100f92aa8c2d6f8ae6ea7bae2cb (commit) via ecb53999e0a7905075d3407a2ac4357b181cc258 (commit) from f247cc1de541243bd1c1635e95c8772d45f9bc6e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ab719ef6625da100f92aa8c2d6f8ae6ea7bae2cb commit ab719ef6625da100f92aa8c2d6f8ae6ea7bae2cb Author: Ken Hornstein Date: Thu Mar 1 12:33:42 2012 -0500 %G isn't actually part of POSIX, so change to %Y. diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest index d227676..7106fe8 100755 --- a/test/forw/test-forw-digest +++ b/test/forw/test-forw-digest @@ -24,7 +24,7 @@ cc4="CC User Four " fcc1="+nosuchmailbox" fcc2="+nosuchmailbox2" -digestdate=$(date "+%A, %e %b %G") +digestdate=$(date "+%A, %e %b %Y") cat > "$expected" <http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ecb53999e0a7905075d3407a2ac4357b181cc258 commit ecb53999e0a7905075d3407a2ac4357b181cc258 Author: Ken Hornstein Date: Thu Mar 1 12:02:29 2012 -0500 Fixed a problem that caused the test to fail if you ran it on the first nine days of the month. diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest index 8bdc949..d227676 100755 --- a/test/forw/test-forw-digest +++ b/test/forw/test-forw-digest @@ -24,7 +24,7 @@ cc4="CC User Four " fcc1="+nosuchmailbox" fcc2="+nosuchmailbox2" -digestdate=$(date "+%A, %d %b %G") +digestdate=$(date "+%A, %e %b %G") cat > "$expected" <https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 8115c2f00dda36b1ee8db290743536a9b6e406cf
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 8115c2f00dda36b1ee8db290743536a9b6e406cf (commit) via 31fb848410e127fe28ca27fb59726ef108a57c9c (commit) via 23346694ffc1337359c76ea3b6b158f4dc3e0c6d (commit) via a1aa5032943899145617de8d28165556fb2ff2ae (commit) via 4692445bb90e907dfb96ca05364f4a5638192eba (commit) from 5cc5dbfe040a1c852f95b28da3f1788df9e1e94f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=8115c2f00dda36b1ee8db290743536a9b6e406cf commit 8115c2f00dda36b1ee8db290743536a9b6e406cf Author: Ken Hornstein Date: Mon Mar 5 13:55:04 2012 -0500 Finally got a reasonable burst test working. diff --git a/test/burst/test-burst b/test/burst/test-burst index 872844c..e654535 100755 --- a/test/burst/test-burst +++ b/test/burst/test-burst @@ -48,6 +48,100 @@ EOF burst 11 || exit -scan 11-last +run_test 'scan -width 80 11-last' \ +" 11 09/29 Test Burst Messag Test digest<<--- Message one From: Mister Bu + 12+ 09/28 Mister Burster Message one<> + 13 09/28 Mister Burster Message two<>" -exit 0 +# +# Create another test message that stresses the boundary checker a bit +# + +cat > "${MH_TEST_DIR}/Mail/inbox/14" < +To: Test Recipient +Date: Friday, 29 Sep 2006 00:00:00 +Subject: Test digest + +This is a preamble +--- Message one + +From: Mister Burster +To: Nobody 1 +Date: Thursday, 28 Sep 2006 00:01:00 +Subject: Message one + +- -This is message one + +--- Message two +From: Mister Burster +To: Nobody 2 +Date: Thursday, 28 Sep 2006 00:02:00 +Subject: Message two + +This is message two +- For real. +--- Message three + + + +From: Mister Burster +To: Nobody 3 +Date: Thursday, 28 Sep 2006 00:03:00 +Subject: Message three + +Will this one work? + + +-- Message three +End of all messages +EOF + +burst 14 || exit + +run_test 'scan -width 80 14-last' \ +" 14 09/29 Test Burst Messag Test digest<> + 16 09/28 Mister Burster Message two<> + 17 09/28 Mister Burster Message three<>" + +# +# Check to see if each message is what we expect +# + +run_test 'show -noheader -noshow 15' \ +"From: Mister Burster +To: Nobody 1 +Date: Thursday, 28 Sep 2006 00:01:00 +Subject: Message one + +-This is message one" + +run_test 'show -noheader -noshow 16' \ +"From: Mister Burster +To: Nobody 2 +Date: Thursday, 28 Sep 2006 00:02:00 +Subject: Message two + +This is message two +For real." + +# +# Backticks used by run_test can consume blank lines at the end of the +# command output, so use check for this one. +# + +expected="${MH_TEST_DIR}/$$.expected" +cat > "${expected}" < +To: Nobody 3 +Date: Thursday, 28 Sep 2006 00:03:00 +Subject: Message three + +Will this one work? + +EOF + +check "${expected}" `mhpath 17` + +exit $failed http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=31fb848410e127fe28ca27fb59726ef108a57c9c commit 31fb848410e127fe28ca27fb59726ef108a57c9c Author: Ken Hornstein Date: Mon Mar 5 13:24:41 2012 -0500 Update with recent fix. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 8efb7b9..111cb2f 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -40,3 +40,4 @@ Things to add to the release notes for the next full release: to include appropriate From: headers based on either the -from switch or the local mailbox. - burst(1) now supports any valid message delimiter according to RFC 934. +- A problem with the MD5 digest calculator on 64-bit systems has been fixed. http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=23346694ffc1337359c76ea3b6b158f4dc3e0c6d commit 23346694ffc1337359c76ea3b6b158f4dc3e0c6d Author: Ken Hornstein Date: Mon Mar 5 13:21:04 2012 -0500 Change this to use "uint32_t" for a 32-bit type, otherwise we can get wrong MD5 checksums on 64-bit systems. Score another one for the test suite! diff --git a/h/md5.h b/h/md5.h index e49ef4e..ff52413 100644 --- a/h/md5.h +++ b/h/md5.h @@ -14,6 +14,12 @@ #include /* + * We need this for uint32_t + */ + +#include + +/* * Use prototypes for nmh/mh */ #define PROTOTYPES 1 @@ -35,7 +41,7 @@ typedef unsigned char *POINTER; typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ -typedef unsigned long int UINT4; +typedef uint32_t UINT4; /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, th
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 15e3d453f414fc1b815ec4895960cad312e78ef9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 15e3d453f414fc1b815ec4895960cad312e78ef9 (commit) via a3558667d8318312591919ec7455ca4935378755 (commit) via 537e02c38f4bb27e746ef51706d26fe40141c5a6 (commit) via 40ae9d199d58c85469e3528fc53205143baf29d2 (commit) from 86e9b55e2984ce54ed9bc99ebfc603e05ab8c2e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=15e3d453f414fc1b815ec4895960cad312e78ef9 commit 15e3d453f414fc1b815ec4895960cad312e78ef9 Author: Ken Hornstein Date: Sun Mar 11 21:47:04 2012 -0400 Require From: header in all outgoing messages. Allow Sender: header (require if multiple addresses are in From:). Support new Envelope-From: header for overriding post's choice of SMTP envelope-from address. diff --git a/man/mh-mail.man b/man/mh-mail.man index 69e5fe4..87a0535 100644 --- a/man/mh-mail.man +++ b/man/mh-mail.man @@ -99,12 +99,11 @@ profile entry. It contains the address of the author or authors (may be more than one if a \*(lqSender:\*(rq field is present). For a standard reply (using -.BR repl , +.BR repl ), the reply address is constructed by checking the following headers (in this order): \*(lqMail-Reply\-To:\*(rq, \*(lqReply\-To:\*(rq, \*(lqFrom:\*(rq, \*(lqSender:\*(rq. -A -.BR From : +A \*(lqFrom:\*(rq header MUST exist when the message is sent to .BR post, otherwise the message will be rejected. @@ -145,10 +144,11 @@ constructed by checking the following headers (in this order): .PP .BR Sender : .RS 5 -Added by +Required by .B post -in the event that the message already has a -\*(lqFrom:\*(rq line. This line contains the address of the actual +in the event that the message has multiple addresses on the +\*(lqFrom:\*(rq line. It is otherwise optional. This line should +contain the address of the actual sender. .RE .PP @@ -162,14 +162,24 @@ Contains addresses of primary recipients. Contains addresses of secondary recipients. .RE .PP -Bcc: +.BR Bcc : .RS 5 Still more recipients. However, the \*(lqBcc:\*(rq line is not copied onto the message as delivered, so these recipients are not listed. .B nmh uses an encapsulation method for blind copies, see -.BR send . +.BR send (1). +.RE +.PP +.BR Dcc : +.RS 5 +Still more recipients. However, the \*(lqDcc:\*(rq line is not +copied onto the messages as delivered. Recipients on the \*(lqDcc:\*(rq +line receive the same messsage as recipients on the \*(lqTo:\*(rq and +\*(lqcc:\*(rq lines. See +.BR send (1) +for more details. .RE .PP .BR Fcc : diff --git a/man/send.man b/man/send.man index faf4d08..f4fea40 100644 --- a/man/send.man +++ b/man/send.man @@ -278,16 +278,7 @@ switch, then will use the MIME rules for encapsulation. .PP -Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq, -and \*(lqDate:\ now\*(rq will be appended to the headers in the message. -If the environment variable -.B $SIGNATURE -is set, then its value -is used as your personal name when constructing the \*(lqFrom:\*(rq -line of the message. If this environment variable is not set, then -.B send -will consult the profile entry \*(lqSignature\*(rq for -this information. +Prior to sending the message, the \*(lqDate:\ now\*(rq field will be appended to the headers in the message. If .B \-msgid is specified, then a \*(lqMessage\-ID:\*(rq field will also @@ -299,9 +290,19 @@ is re\-distributing a message (when invoked by .BR dist ), then \*(lqResent\-\*(rq will be prepended to each of these fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq. -If the message already contains a \*(lqFrom:\*(rq field, then a -\*(lqSender: user@local\*(rq field will be added as well. (An already -existing \*(lqSender:\*(rq field is an error!) +.PP +A \*(lqFrom:\*(rq field is required for all outgoing messages. Multiple +addresses are permitted in the \*(lqFrom:\*(rq field, but a \*(lqSender:\*(rq +field is required in this case. Otherwise a \*(lqSender:\*(rq field +is optional. +.PP +When using SMTP for mail submission, the envelope\-from used for SMTP +transaction is derived from the \*(lqFrom:\*(rq field. If multiple +addresses are in the \*(lqFrom:\*(rq field, the address in the +\*(lqSender\*(rq field is used instead. This behavior can be overridden +by using the \*(lqEnvelope\-From:\*(rq field. When \*(lqEnvelope\-From\*(rq +appears in the message, its address will be used as the SMTP envelope\-from +address and the field will be removed from the message. .PP By using the .B \-format diff --git a/uip/post.c b/uip/post.
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. dfa7b4ffa462d4f24016ab4729928dee5ec389bb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via dfa7b4ffa462d4f24016ab4729928dee5ec389bb (commit) from 15e3d453f414fc1b815ec4895960cad312e78ef9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=dfa7b4ffa462d4f24016ab4729928dee5ec389bb commit dfa7b4ffa462d4f24016ab4729928dee5ec389bb Author: Ken Hornstein Date: Mon Mar 12 22:52:21 2012 -0400 New changes: Sender: cannot be blank, Sender: always overrides From: for SMTP envelope, and Envelope-From: will cause a Sender: header to be output if multiple From: addresses are used. diff --git a/man/send.man b/man/send.man index f4fea40..2cd840b 100644 --- a/man/send.man +++ b/man/send.man @@ -296,13 +296,20 @@ addresses are permitted in the \*(lqFrom:\*(rq field, but a \*(lqSender:\*(rq field is required in this case. Otherwise a \*(lqSender:\*(rq field is optional. .PP -When using SMTP for mail submission, the envelope\-from used for SMTP -transaction is derived from the \*(lqFrom:\*(rq field. If multiple -addresses are in the \*(lqFrom:\*(rq field, the address in the -\*(lqSender\*(rq field is used instead. This behavior can be overridden -by using the \*(lqEnvelope\-From:\*(rq field. When \*(lqEnvelope\-From\*(rq -appears in the message, its address will be used as the SMTP envelope\-from -address and the field will be removed from the message. +If a message with multiple \*(lqFrom:\*(rq +addresses does +.B NOT +include a \*(lqSender:\*(rq field but does include an \*(lqEnvelope\-From:\*(rq +field, the \*(lqEnvelope\-From:\*(rq field will be used to construct +a \*(lqSender:\*(rq field. +.PP +When using SMTP for mail submission, the envelope\-from used for the SMTP +transaction is derived from the \*(lqEnvelope\-From:\*(rq field. +If no \*(lqEnvelope\-From:\*(rq field is present, the \*(lqSender:\*(rq +field is used. If neither the \*(lqEnvelope\-From:\*(rq nor the +\*(lqSender:\*(rq field is present, the \*(lqFrom:\*(rq field is used. +When \*(lqEnvelope\-From:\*(rq appears in a message +it will be removed from the final outgoing message. .PP By using the .B \-format diff --git a/uip/post.c b/uip/post.c index 79a53aa..c9b4c05 100644 --- a/uip/post.c +++ b/uip/post.c @@ -43,8 +43,6 @@ #define FCCS 10 /* max number of fccs allowed */ -#defineuptolow(c) ((isalpha(c) && isupper (c)) ? tolower (c) : c) - /* In the following array of structures, the numeric second field of the structures (minchars) is apparently used like this: @@ -158,7 +156,7 @@ struct headers { #defineHNIL 0x0100/* okay for this header not to have addrs */ #defineHIGN 0x0200/* ignore this header */ #defineHDCC 0x0400/* another undocumented feature */ -#define HONE 0x0800 /* Only one address allowed */ +#define HONE 0x0800 /* Only (zero or) one address allowed */ #define HEFM 0x1000 /* Envelope-From: header */ /* @@ -622,14 +620,13 @@ main (int argc, char **argv) * address for SMTP. * * - If we were given an Envelope-From header, use that. - * - If we were given multiple addresses in the From: header, use - * the Sender: address + * - If we were given a Sender: address, use that. * - Otherwise, use the address on the From: line */ if (msgflags & MEFM) { envelope = efrom; -} else if (fromcount > 1) { +} else if (seensender) { envelope = sender; } else { envelope = from; @@ -739,6 +736,14 @@ putfmt (char *name, char *str, FILE *out) if (hdr->flags & HNIL) fprintf (out, "%s: %s", name, str); else { + /* +* Sender (or Resent-Sender) can have only one address +*/ + if ((msgstate == RESENT) ? (hdr->set & MRSN) + : (hdr->set & MSND)) { + advise (NULL, "%s: field requires one address", name); + badmsg++; + } #ifdef notdef advise (NULL, "%s: field requires at least one address", name); badmsg++; @@ -885,18 +890,20 @@ static void start_headers (void) { unsigned char *cp; -char myhost[BUFSIZ], sigbuf[BUFSIZ]; +char sigbuf[BUFSIZ]; struct mailname *mp; myuid = getuid (); mygid = getgid (); time (&tclock); -strncpy (from, getlocaladdr(), sizeof(from)); -strncpy
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 8eeb81b97870153a57c9dff79540c70d89ef87a4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 8eeb81b97870153a57c9dff79540c70d89ef87a4 (commit) via 21f60122877f22b2545a31aebfb9b78118a50ecd (commit) from dfa7b4ffa462d4f24016ab4729928dee5ec389bb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=8eeb81b97870153a57c9dff79540c70d89ef87a4 commit 8eeb81b97870153a57c9dff79540c70d89ef87a4 Author: Ken Hornstein Date: Tue Mar 13 15:25:41 2012 -0400 Modify getfullname so it performs the same processing that mts.c:getuserinfo() does. diff --git a/test/getfullname.c b/test/getfullname.c index f0c8a2d..3dc221e 100644 --- a/test/getfullname.c +++ b/test/getfullname.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -16,12 +17,13 @@ int main(int argc, char *argv[]) { + struct passwd *pwd; + char name[BUFSIZ], *p; + if (argc > 1) { fprintf (stderr, "usage: %s\n", argv[0]); } - struct passwd *pwd; - pwd = getpwuid(getuid()); if (! pwd) { @@ -30,7 +32,36 @@ main(int argc, char *argv[]) exit(1); } - printf("%s\n", pwd->pw_gecos); + /* +* Perform the same processing that getuserinfo() does. +*/ + + strncpy(name, pwd->pw_gecos, sizeof(name)); + + name[sizeof(name) - 1] = '\0'; + + /* +* Stop at the first comma +*/ + + if ((p = strchr(name, ','))) + *p = '\0'; + + /* +* Quote the entire string if it has a "." in it +*/ + + if (strchr(name, '.')) { + char tmp[BUFSIZ]; + + snprintf(tmp, sizeof(tmp), "\"%s\"", name); + strncpy(name, tmp, sizeof(name)); + + name[sizeof(name) - 2] = '"'; + name[sizeof(name) - 1] = '\0'; + } + + printf("%s\n", name); exit(0); } http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=21f60122877f22b2545a31aebfb9b78118a50ecd commit 21f60122877f22b2545a31aebfb9b78118a50ecd Author: Ken Hornstein Date: Tue Mar 13 15:15:42 2012 -0400 Create proper prototypes for formataddr() and concataddr(). diff --git a/h/fmt_scan.h b/h/fmt_scan.h index 9872e09..394b01e 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -91,3 +91,5 @@ struct format { struct format *fmt_scan (struct format *, char *, int, int *); char *new_fs (char *, char *, char *); int fmt_compile (char *, struct format **); +char *formataddr(char *, char *); +char *concataddr(char *, char *); diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index f689300..29b87d0 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -25,9 +25,6 @@ # include #endif -extern char *formataddr ();/* hook for custom address formatting */ -extern char *concataddr ();/* address formatting but allowing duplicates */ - #ifdef LBL struct msgs *fmt_current_folder; /* current folder (set by main program) */ #endif --- Summary of changes: h/fmt_scan.h |2 ++ sbr/fmt_scan.c |3 --- test/getfullname.c | 37 ++--- 3 files changed, 36 insertions(+), 6 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. d6b1aed6b65b10cd5db73a5b2080c4bdefefff39
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via d6b1aed6b65b10cd5db73a5b2080c4bdefefff39 (commit) via f319ad1eba15fbb0f387a0b5246bd0b8f4b36dcf (commit) from 86c5a525f242b0a0464d1fa9a5a53029401d093a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=d6b1aed6b65b10cd5db73a5b2080c4bdefefff39 commit d6b1aed6b65b10cd5db73a5b2080c4bdefefff39 Author: Ken Hornstein Date: Wed Mar 14 15:51:22 2012 -0400 A new test program, fakesmtp, to help us test post. diff --git a/.gitignore b/.gitignore index d1dd750..9031616 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ a.out.DSYM/ /uip/whatnow /uip/whom /uip/*.exe +/test/fakesmtp /test/getfullname /test/getfqdn diff --git a/Makefile.am b/Makefile.am index 9ca7740..e402ca1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,7 +65,7 @@ TESTS = test/bad-input/test-header \ test/cleanup ## The "cleanup" test should always be last. check_SCRIPTS = test/common.sh -check_PROGRAMS = test/getfullname test/getfqdn +check_PROGRAMS = test/getfullname test/getfqdn test/fakesmtp ## ## Stuff that should be cleaned via "make clean" @@ -366,6 +366,9 @@ test_getfullname_LDADD = test_getfqdn_SOURCES = test/getfqdn.c test_getfqdn_LDADD = +test_fakesmtp_SOURCES = test/fakesmtp.c +test_fakesmtp_LDADD = + ## ## Our rebuild rules for files that aren't built via the normal mechanisms ## diff --git a/test/fakesmtp.c b/test/fakesmtp.c new file mode 100644 index 000..19df2e9 --- /dev/null +++ b/test/fakesmtp.c @@ -0,0 +1,310 @@ +/* + * fakesmtp - A fake SMTP server used by the nmh test suite + * + * This code is Copyright (c) 2012, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PIDFILE "/tmp/fakesmtp.pid" + +#define LINESIZE 1024 + +static void killpidfile(void); +static void handleterm(int); +static void putsmtp(int, char *); +static int getsmtp(int, char *); + +int +main(int argc, char *argv[]) +{ + struct addrinfo hints, *res; + int rc, l, conn, on, datamode; + FILE *f, *pid; + fd_set readfd; + struct stat st; + struct timeval tv; + + if (argc != 3) { + fprintf(stderr, "Usage: %s output-filename port\n", argv[0]); + exit(1); + } + + if (!(f = fopen(argv[1], "w"))) { + fprintf(stderr, "Unable to open output file \"%s\": %s\n", + argv[1], strerror(errno)); + exit(1); + } + + memset(&hints, 0, sizeof(hints)); + + hints.ai_family = PF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = AI_PASSIVE; + + rc = getaddrinfo("127.0.0.1", argv[2], &hints, &res); + + if (rc) { + fprintf(stderr, "Unable to resolve localhost/%s: %s\n", + argv[2], gai_strerror(rc)); + exit(1); + } + + l = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + + if (l == -1) { + fprintf(stderr, "Unable to create listening socket: %s\n", + strerror(errno)); + exit(1); + } + + on = 1; + + if (setsockopt(l, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { + fprintf(stderr, "Unable to set SO_REUSEADDR: %s\n", + strerror(errno)); + exit(1); + } + + if (bind(l, res->ai_addr, res->ai_addrlen) == -1) { + fprintf(stderr, "Unable to bind socket: %s\n", strerror(errno)); + exit(1); + } + + if (listen(l, 1) == -1) { + fprintf(stderr, "Unable to listen on socket: %s\n", + strerror(errno)); + exit(1); + } + + /* +* Now that our socket & files are set up, do the following things: +* +* - Check for a PID file. If there is one, kill the old version. +* - Wait 30 seconds for a connection. If there isn't one, then +* exit. +*/ + + if (stat(PIDFILE, &st) == 0) { + long oldpid; + + if (!(pid = fopen(PIDFILE, "r"))) { +
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. b2fb9dfa039340fb4776e36cb381d02fffacd608
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via b2fb9dfa039340fb4776e36cb381d02fffacd608 (commit) via 6a0b804e4d6562952662dd618e9feca755c10fff (commit) from d6b1aed6b65b10cd5db73a5b2080c4bdefefff39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b2fb9dfa039340fb4776e36cb381d02fffacd608 commit b2fb9dfa039340fb4776e36cb381d02fffacd608 Author: Ken Hornstein Date: Wed Mar 14 21:15:54 2012 -0400 New test suite for "post"; uses fakesmtp to trap the SMTP protocol. diff --git a/Makefile.am b/Makefile.am index e402ca1..8abe7ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,6 +57,9 @@ TESTS = test/bad-input/test-header \ test/mhshow/test-subpart test/mhstore/test-mhstore \ test/new/test-basic \ test/pick/test-pick test/pick/test-stderr \ + test/post/test-post-basic test/post/test-post-multiple \ + test/post/test-post-dcc test/post/test-post-fcc \ + test/post/test-post-multifrom test/post/test-post-envelope \ test/refile/test-refile \ test/repl/test-if-str test/scan/test-scan \ test/sequences/test-flist test/sequences/test-mark \ @@ -207,7 +210,8 @@ EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \ man/sendfiles.man man/show.man man/slocal.man man/sortm.man \ man/unseen.man man/whatnow.man man/whom.man test/README $(TESTS) \ test/inc/deb359167.mbox test/inc/fromline.txt \ -test/inc/msgheader.txt test/inc/filler.txt test/inc/md5sums +test/inc/msgheader.txt test/inc/filler.txt test/inc/md5sums \ +test/post/test-post-common.sh ## ## These are all of the definitions for each of the programs listed above. diff --git a/test/common.sh.in b/test/common.sh.in index e596fb1..1162566 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -137,6 +137,7 @@ Path: ${MH_TEST_DIR}/Mail mhlproc: ${MH_LIB_DIR}/mhl showproc: ${MH_LIB_DIR}/mhl postproc: ${MH_LIB_DIR}/post +fileproc: ${MH_INST_DIR}${bindir}/refile EOF for f in MailAliases components digestcomps distcomps forwcomps mhl.body \ diff --git a/test/post/test-post-basic b/test/post/test-post-basic new file mode 100755 index 000..a2e4fac --- /dev/null +++ b/test/post/test-post-basic @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Test the basic behavior of post +# + +set -e + +if test -z "${MH_OBJ_DIR}"; then +srcdir=`dirname "$0"`/../.. +MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "${srcdir}/test/post/test-post-common.sh" + +# +# Basic test - Simple message, single user, single recipient. Note that +# we test dot-stuffing here as well. +# + +cat > "${MH_TEST_DIR}/Mail/draft" < +To: Somebody Else +Subject: Test + +This is a test +. +EOF + +cat > "${testname}.expected" < +RCPT TO: +DATA +From: Mr Nobody +To: Somebody Else +Subject: Test +Date: + +This is a test +.. +. +QUIT +EOF + +test_post "${testname}.actual" "${testname}.expected" + +# +# Make sure a draft without a From: is rejected +# + +cat > "${MH_TEST_DIR}/Mail/draft" < +Subject: Blank Test + +This is a blank test +EOF + +run_test "send -draft -server 127.0.0.1 -port $localport" \ + "post: message has no From: header +post: See default components files for examples +post: re-format message and try again +send: message not delivered to anyone" + +exit ${failed:-0} diff --git a/test/post/test-post-common.sh b/test/post/test-post-common.sh new file mode 100755 index 000..7698b81 --- /dev/null +++ b/test/post/test-post-common.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Common routines for the post tests +# + +set -e + +. "${MH_OBJ_DIR}/test/common.sh" + +setup_test + +localport=65412 +testname="${MH_TEST_DIR}/$$" + +# +# Set this for the EHLO command +# + +echo "clientname: nosuchhost.example.com" >> ${MHMTSCONF} + +# +# One "post" test run. Ok, yeah, we're using "send", but that's just +# because it's easier. +# + +test_post () +{ "${MH_OBJ_DIR}/test/fakesmtp" "$1" $localport & +pid="$!" + +send -draft -server 127.0.0.1 -port $localport || exit 1 + +wait $! + +# +# It's hard to calculate the exact Date: header post is going to +# use, so we'll just use sed to remove the actual date so we can easily +# compare it against our "correct" output. +# + +
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. f311d0371d3585ad4f97a69de9669dd49197686a
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via f311d0371d3585ad4f97a69de9669dd49197686a (commit) via fc6817f4dcebc81838636ab6dd01f945b80bac2a (commit) via 01ccb3f07cef6989517ff99252ca00b0e1c1c07c (commit) from 12c2591c4b575e04907125bab5bcc5561d45efb5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=f311d0371d3585ad4f97a69de9669dd49197686a commit f311d0371d3585ad4f97a69de9669dd49197686a Author: Ken Hornstein Date: Thu Mar 15 13:55:15 2012 -0400 Clean up prototypes. diff --git a/h/msh.h b/h/msh.h index fb80f23..433be00 100644 --- a/h/msh.h +++ b/h/msh.h @@ -53,7 +53,7 @@ extern int modified; /* command modified folder */ extern struct msgs *mp;/* used a lot */ extern struct Msg *Msgs; /* Msgs[0] not used*/ -FILE *msh_ready (); +FILE *msh_ready (int, int); /* * COMMAND diff --git a/uip/msh.c b/uip/msh.c index f6d1a36..7b5575e 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -155,7 +155,6 @@ int told_to_quit; /* SIGQUIT detected */ */ void fsetup (char *); void setup (char *); -FILE *msh_ready (int, int); void readids (int); int readid (int); void display_info (int); @@ -174,7 +173,6 @@ static int read_map (char *, long); static int read_file (long, int); static void m_gMsgs (int); -FILE *msh_ready (int, int); static int check_folder (int); static void scanrange (int, int); static void scanstring (char *); diff --git a/uip/picksbr.c b/uip/picksbr.c index 85bc4bc..26401f4 100644 --- a/uip/picksbr.c +++ b/uip/picksbr.c @@ -175,23 +175,23 @@ static struct nexus *head; /* * prototypes for date routines */ -static struct tws *tws_parse(); -static struct tws *tws_special(); +static struct tws *tws_parse(char *, int); +static struct tws *tws_special(char *); /* * static prototypes */ -static void PRaction(); -static int gcompile(); -static int advance(); -static int cclass(); -static int tcompile(); - -static struct nexus *parse(); -static struct nexus *nexp1(); -static struct nexus *nexp2(); -static struct nexus *nexp3(); -static struct nexus *newnexus(); +static void PRaction(struct nexus *, int); +static int gcompile(struct nexus *, char *); +static int advance(char *, char *); +static int cclass(unsigned char *, int, int); +static int tcompile(char *, struct tws *, int); + +static struct nexus *parse(void); +static struct nexus *nexp1(void); +static struct nexus *nexp2(void); +static struct nexus *nexp3(void); +static struct nexus *newnexus(int (*)()); static int ORaction(); static int ANDaction(); http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=fc6817f4dcebc81838636ab6dd01f945b80bac2a commit fc6817f4dcebc81838636ab6dd01f945b80bac2a Author: Ken Hornstein Date: Thu Mar 15 13:04:38 2012 -0400 Fix some warnings. diff --git a/test/fakesmtp.c b/test/fakesmtp.c index 19df2e9..700bc45 100644 --- a/test/fakesmtp.c +++ b/test/fakesmtp.c @@ -240,7 +240,7 @@ static int getsmtp(int socket, char *data) { int cc; - static int bytesinbuf = 0; + static unsigned int bytesinbuf = 0; static char buffer[LINESIZE * 2], *p; for (;;) { @@ -294,6 +294,8 @@ getsmtp(int socket, char *data) static void handleterm(int signal) { + (void) signal; + killpidfile(); fflush(NULL); _exit(1); http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=01ccb3f07cef6989517ff99252ca00b0e1c1c07c commit 01ccb3f07cef6989517ff99252ca00b0e1c1c07c Author: Ken Hornstein Date: Thu Mar 15 11:55:34 2012 -0400 I guess the -i option to sed works differently on Linux and MacOS X; deal with it. diff --git a/test/post/test-post-common.sh b/test/post/test-post-common.sh index 7698b81..c35a5a2 100755 --- a/test/post/test-post-common.sh +++ b/test/post/test-post-common.sh @@ -37,7 +37,9 @@ test_post () # compare it against our "correct" output. # -sed -i "" -e 's/^Date:.*/Date:/' "$1" +sed -i.bak -e 's/^Date:.*/Date:/' "$1" + +rm -f "${1}.bak" check "$1" "$2" } diff --git a/test/post/test-post-fcc b/test/post/test-post-fcc index b8a9419..5ade972 100755 --- a/test/post/test-post-fcc +++ b/test/post/test-post-fcc @@ -54,8 +54,10 @@ EOF msgname=$(mhpath +inbox 11) -sed -i "" -e 's/^Date:.*/Date:/' ${msgname} +sed -i.bak -e 's/^Date:.*/Date:/' "${msgname}" -check "${testname}.msg.expected" ${msgname} +rm -f "${msgname}.bak" + +che
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. ccd3685b42cb198b11d2d4daabb58849d239df40
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via ccd3685b42cb198b11d2d4daabb58849d239df40 (commit) from f311d0371d3585ad4f97a69de9669dd49197686a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=ccd3685b42cb198b11d2d4daabb58849d239df40 commit ccd3685b42cb198b11d2d4daabb58849d239df40 Author: Ken Hornstein Date: Thu Mar 15 15:54:02 2012 -0400 Remove all masquerade support (draft_from is now the default, and the other two can be accomplished via the components file). diff --git a/INSTALL b/INSTALL index 1da728e..e946242 100644 --- a/INSTALL +++ b/INSTALL @@ -96,9 +96,7 @@ need an ANSI C compiler such as gcc. rather than hardcoding pophost in `mts.conf'. Check the `mh-tailor' man page for a list of all the available options - for this file ("masquerade" may be of particular interest, though its - default value allows the most flexibility. See the discussion of the - --enable-masquerade configure option below). + for this file. 7) Edit the file `mhn.defaults' (installed in the nmh `etc' directory). This file contains the default profile entries for the nmh command @@ -196,19 +194,6 @@ Options for configure --enable-debug Enable debugging support. ---enable-masquerade[='draft_from mmailid username_extension'] - By default, all three masquerade options are enabled. - - If this option is disabled, the mts.conf file will contain the - line "masquerade: " (with no value), which may be manually edited - later. You may find it convenient to specify a value at - configure-time, however, so that each time nmh is reinstalled, - the right value will be there. - - See the mh-tailor(5) man page for full documentation of "masquerade:". - - This option will likely be removed in a future version of nmh. - --enable-pop Enable client-side support for pop. diff --git a/Makefile.am b/Makefile.am index 8abe7ed..eea18db 100644 --- a/Makefile.am +++ b/Makefile.am @@ -387,7 +387,6 @@ etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile $(SED) -e 's,%mts%,$(MTS),' \ -e 's,%mailspool%,$(mailspool),' \ -e 's,%etcdir%,$(sysconfdir),' \ - -e 's,%masquerade%,$(masquerade),' \ -e 's,%smtpservers%,$(smtpservers),' \ < $(srcdir)/etc/mts.conf.in > $@ diff --git a/configure.ac b/configure.ac index aeed66c..fd9b98e 100644 --- a/configure.ac +++ b/configure.ac @@ -30,16 +30,6 @@ AC_ARG_ENABLE([debug], dnl The old redundant --enable-nmh-debug is deprecated and undocumented. AS_IF([test x"$enable_nmh_debug" = x"yes"], [enable_debug=yes]) -dnl Allow users to send email from addresses other than their default? -AC_ARG_ENABLE(masquerade, - AS_HELP_STRING([--enable-masquerade='draft_from mmailid username_extension'], -[enable up to 3 types of address masquerading]), - [AS_IF([test x"$enable_masquerade" = x"yes"], -[masquerade="draft_from mmailid username_extension"], -[masquerade="$enable_masquerade"])], - [masquerade="draft_from mmailid username_extension"]) -AC_SUBST(masquerade)dnl - dnl Do you want to disable use of locale functions AH_TEMPLATE([LOCALE], [Undefine if you don't want locale features. By default this is defined.]) @@ -758,7 +748,6 @@ file locking type : ${LOCKTYPE} default smtp servers : ${smtpservers} default editor : ${editorpath} default pager : ${pagerpath} -email address masquerading : ${masquerade} SASL support : ${sasl_support} TLS support: ${tls_support} ])])dnl diff --git a/etc/mts.conf.in b/etc/mts.conf.in index c3c946d..1ba5f8f 100644 --- a/etc/mts.conf.in +++ b/etc/mts.conf.in @@ -19,10 +19,6 @@ hostable: %etcdir%/hosts # query the system for this value (gethostname, etc...). #localname: foo.bar.com -# The following directive allows email address masquerading. The string -# "draft_from mmailid username_extension" will allow all three types. -masquerade: %masquerade% - # Default location of mail drops. If this option is # set, but empty, the user's home directory is used. mmdfldir: %mailspool% diff --git a/man/mh-tailor.man b/man/mh-tailor.man index a8d400a..3963e4b 100644 --- a/man/mh-tailor.man +++ b/man/mh-tailor.man @@ -164,79 +164,6 @@ The beginning-of-message delimiter
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 4ad9321b5799aae68df21f77e7e788d897c3f015
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 4ad9321b5799aae68df21f77e7e788d897c3f015 (commit) via 0270817c5e0c47f23b890351d69ac18f09254175 (commit) via 4582f97fd2ce5bdb3ac54fbb099c80965e379a9e (commit) from ccd3685b42cb198b11d2d4daabb58849d239df40 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4ad9321b5799aae68df21f77e7e788d897c3f015 commit 4ad9321b5799aae68df21f77e7e788d897c3f015 Author: Ken Hornstein Date: Thu Mar 15 23:09:41 2012 -0400 Add some more default MIME content suffixes. diff --git a/etc/mhn.defaults.sh b/etc/mhn.defaults.sh index 0db5d3a..0111dbd 100755 --- a/etc/mhn.defaults.sh +++ b/etc/mhn.defaults.sh @@ -124,7 +124,40 @@ if [ ! -z "$PGM" ]; then echo "mhshow-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP fi -echo "mhshow-suffix-text/html: .html" >> $TMP +cat <> ${TMP} +mhshow-suffix-text/html: .html +mhshow-suffix-text/xml: .xml +mhshow-suffix-application/pdf: .pdf +mhshow-suffix-application/postscript: .ps +mhshow-suffix-application/msword: .doc +mhshow-suffix-application/msword: .docx +mhshow-suffix-application/vnd.ms-excel: xls +mhshow-suffix-application/vnd.ms-excel: xlc +mhshow-suffix-application/vnd.ms-excel: xll +mhshow-suffix-application/vnd.ms-excel: xlm +mhshow-suffix-application/vnd.ms-excel: xlw +mhshow-suffix-application/vnd.ms-excel: xla +mhshow-suffix-application/vnd.ms-excel: xlt +mhshow-suffix-application/vnd.ms-excel: xld +mhshow-suffix-application/vnd.ms-powerpoint: ppz +mhshow-suffix-application/vnd.ms-powerpoint: ppt +mhshow-suffix-application/vnd.ms-powerpoint: pps +mhshow-suffix-application/vnd.ms-powerpoint: pot +mhshow-suffix-audio/mpeg: .mp3 +mhshow-suffix-image/gif: .gif +mhshow-suffix-image/jpeg: .jpeg +mhshow-suffix-image/jpeg: .jpg +mhshow-suffix-image/png: .png +mhshow-suffix-image/tiff: .tif +mhshow-suffix-image/tiff: .tiff +mhshow-suffix-video/mpeg: .mpeg +mhshow-suffix-video/mpeg: .mpg +mhshow-suffix-video/mpeg: .mpg +mhshow-suffix-video/quicktime: .qt +mhshow-suffix-video/quicktime: .mov +mhshow-suffix-video/quicktime: .moov +mhshow-suffix-video/quicktime: .qtvr +EOF # I'd like to check if netscape is available and use it preferentially to lynx, # but only once I've added a new %-escape that makes more permanent temp files, http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=0270817c5e0c47f23b890351d69ac18f09254175 commit 0270817c5e0c47f23b890351d69ac18f09254175 Author: Ken Hornstein Date: Thu Mar 15 23:00:06 2012 -0400 Call readconfig() on mhn.defaults so we get default entries in for use with attach. diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 04d6ea9..91eaddf 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -192,6 +192,7 @@ attach(char *attachment_header_field_name, char *draft_file_name, inthas_body; /* draft has a message body */ intlength; /* length of attachment header field name */ char *p; /* miscellaneous string pointer */ +FILE *fp;/* pointer for mhn.defaults */ /* * Open up the draft file. @@ -301,6 +302,11 @@ attach(char *attachment_header_field_name, char *draft_file_name, * that specify attachments. Add a mhbuild MIME composition file for each. */ +if ((fp = fopen (p = etcpath ("mhn.defaults"), "r"))) { + readconfig ((struct node **) NULL, fp, p, 0); + fclose(fp); +} + rewind(draft_file); while (get_line() != EOF && *field != '\0' && *field != '-') { http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4582f97fd2ce5bdb3ac54fbb099c80965e379a9e commit 4582f97fd2ce5bdb3ac54fbb099c80965e379a9e Author: Ken Hornstein Date: Thu Mar 15 22:23:20 2012 -0400 A test for the group addressing functionality handled by "post". diff --git a/Makefile.am b/Makefile.am index eea18db..a6ddbfe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,6 +60,7 @@ TESTS = test/bad-input/test-header \ test/post/test-post-basic test/post/test-post-multiple \ test/post/test-post-dcc test/post/test-post-fcc \ test/post/test-post-multifrom test/post/test-post-envelope \ + test/post/test-post-group \ test/refile/test-refile \ test/repl/test-if-str test/scan/test-scan \ test/sequences/test-flist test/sequences/test-mark \ diff --git a/test/post/tes
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. bf75a860b37b8e08adb3afae9baca01c1af2f08c
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via bf75a860b37b8e08adb3afae9baca01c1af2f08c (commit) from 4ad9321b5799aae68df21f77e7e788d897c3f015 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=bf75a860b37b8e08adb3afae9baca01c1af2f08c commit bf75a860b37b8e08adb3afae9baca01c1af2f08c Author: Ken Hornstein Date: Thu Mar 15 23:14:48 2012 -0400 Whoops, forgot to put "." before some of the suffixes. diff --git a/etc/mhn.defaults.sh b/etc/mhn.defaults.sh index 0111dbd..ac5d291 100755 --- a/etc/mhn.defaults.sh +++ b/etc/mhn.defaults.sh @@ -131,18 +131,18 @@ mhshow-suffix-application/pdf: .pdf mhshow-suffix-application/postscript: .ps mhshow-suffix-application/msword: .doc mhshow-suffix-application/msword: .docx -mhshow-suffix-application/vnd.ms-excel: xls -mhshow-suffix-application/vnd.ms-excel: xlc -mhshow-suffix-application/vnd.ms-excel: xll -mhshow-suffix-application/vnd.ms-excel: xlm -mhshow-suffix-application/vnd.ms-excel: xlw -mhshow-suffix-application/vnd.ms-excel: xla -mhshow-suffix-application/vnd.ms-excel: xlt -mhshow-suffix-application/vnd.ms-excel: xld -mhshow-suffix-application/vnd.ms-powerpoint: ppz -mhshow-suffix-application/vnd.ms-powerpoint: ppt -mhshow-suffix-application/vnd.ms-powerpoint: pps -mhshow-suffix-application/vnd.ms-powerpoint: pot +mhshow-suffix-application/vnd.ms-excel: .xls +mhshow-suffix-application/vnd.ms-excel: .xlc +mhshow-suffix-application/vnd.ms-excel: .xll +mhshow-suffix-application/vnd.ms-excel: .xlm +mhshow-suffix-application/vnd.ms-excel: .xlw +mhshow-suffix-application/vnd.ms-excel: .xla +mhshow-suffix-application/vnd.ms-excel: .xlt +mhshow-suffix-application/vnd.ms-excel: .xld +mhshow-suffix-application/vnd.ms-powerpoint: .ppz +mhshow-suffix-application/vnd.ms-powerpoint: .ppt +mhshow-suffix-application/vnd.ms-powerpoint: .pps +mhshow-suffix-application/vnd.ms-powerpoint: .pot mhshow-suffix-audio/mpeg: .mp3 mhshow-suffix-image/gif: .gif mhshow-suffix-image/jpeg: .jpeg --- Summary of changes: etc/mhn.defaults.sh | 24 1 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 2b1cd09eae8aa7516f8d47a6ee80e92cba714224
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 2b1cd09eae8aa7516f8d47a6ee80e92cba714224 (commit) from bf75a860b37b8e08adb3afae9baca01c1af2f08c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=2b1cd09eae8aa7516f8d47a6ee80e92cba714224 commit 2b1cd09eae8aa7516f8d47a6ee80e92cba714224 Author: Ken Hornstein Date: Fri Mar 16 00:21:35 2012 -0400 Update post(8) regarding the New World Order. diff --git a/man/post.man b/man/post.man index 460bd81..5084ec4 100644 --- a/man/post.man +++ b/man/post.man @@ -55,8 +55,8 @@ with acting as a relatively simple preprocessor. Thus, it is .B post -which parses the various header fields, appends -\*(lqFrom:\*(rq and \*(lqDate:\*(rq lines, and interacts with the mail transport system. +which parses the various header fields, appends a +\*(lqDate:\*(rq line, and interacts with the mail transport system. .B Post will not normally be called directly by the user. .PP @@ -122,72 +122,38 @@ delivery). .PP Under normal circumstances, .B post -constructs the \*(lqFrom:\*(rq line of the -message from the user's login name, the full name from the GECOS field of the -passwd file, and the fully\-qualified name of the local machine (or the -value of -\*(lqlocalname\*(rq in -.IR mts.conf , -if set). An example is \*(lqFrom: Dan Harkless -\*(rq. There are four ways to override these values, -however. Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent +uses the \*(lqFrom:\*(rq line in the message draft as the identity of +the the originating mailbox. A \*(lqFrom:\*(rq line is required in +all message draft. By default the message composition utilities such +as +.B comp +and +.B repl +will automatically place a \*(lqFrom:\*(rq line in the message draft. +There are two ways to override this behavior, however. +Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent with .BR dist . .PP -The first way is GECOS\-based username masquerading. If the \*(lqmasquerade:\*(rq line -in -.I mts.conf -contains \*(lqmmailid\*(rq, this processing is activated. If a user's GECOS -field in the passwd file is of the form \*(lqFull Name \*(rq then \*(lqfakename\*(rq -will be used in place of the real username. For instance, a GECOS field of \*(lqDan -Harkless \*(rq would result in \*(lqFrom: Dan Harkless -\*(rq. Naturally if you were doing something like -this you'd want to set up an MTA alias (e.g. in /etc/aliases) from, for -instance, \*(lqDan.Harkless\*(rq to \*(lqdan\*(rq. -.PP -The second way to override default construction of \*(lqFrom:\*(rq is to set the -.B $SIGNATURE -environment variable. This variable overrides the full name -from the GECOS field, even if GECOS\-based masquerading is being done. This -processing is always active, and does not need to be enabled from -.IR mts.conf . -.PP -The third way is controlled by the \*(lquser_extension\*(rq value of \*(lqmasquerade:\*(rq line -of -.IR mts.conf . -When that's turned on, setting the -.B $USERNAME_EXTENSION -environment variable will result in its value being appended the user's login -name. For instance, if I set -.B $USERNAME_EXTENSION -to \*(lq+www\*(rq, my \*(lqFrom:\*(rq -line will contain \*(lqDan Harkless \*(rq (or -\*(lqDan.Harkless+www\*(rq if I'm using mmailid masquerading as well). Recent versions -of -.B sendmail -automatically deliver all mail sent to -.IR user + string -to -.IR user . -.B qmail -has a similar feature which uses '\-' as the delimiter by -default, but can use other characters as well. +The first way is to supply a \*(lqSender:\*(rq line. The value of this +field will be used as the originating mailbox identity when submitting the +message to the mail transport system. If multiple addresses are +given in the \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq line is +.BR required . +If an \*(lqEnvelope-From:\*(rq line is supplied when multiple addresses +are given in the \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq header will +be generated using the value of the \*(lqEnvelope-From:\*(rq line, +.B if +the \*(lqEnvelope-From:\*(rq line is not blank. .PP -The fourth method of address masquerading is to specify a \*(lqFrom:\*(rq line manually -in the message draft. It will be used as provided (after alias substitution), -but normally, to discourage email forgery, the user's -.B real -address will be -used in the SMTP envelope \*(lqFrom:\*(rq and in a \*(lqSender:\*(rq header. However, if the -\*(lqmasquerade:\*(rq line of -.I mts.conf -contains \*(lqd
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 46d843745041d6e852be2ae57de9261ae4e5f399
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 46d843745041d6e852be2ae57de9261ae4e5f399 (commit) from 2b1cd09eae8aa7516f8d47a6ee80e92cba714224 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=46d843745041d6e852be2ae57de9261ae4e5f399 commit 46d843745041d6e852be2ae57de9261ae4e5f399 Author: Ken Hornstein Date: Fri Mar 16 11:32:35 2012 -0400 Create new switches -atfile and -noatfile to control the creation of the @ file when repl'ing or dist'ing a message. diff --git a/man/dist.man b/man/dist.man index 63292c0..4955d63 100644 --- a/man/dist.man +++ b/man/dist.man @@ -35,6 +35,8 @@ dist \- redistribute a message to additional addresses .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] +.RB [ \-atfile ] +.RB [ \-noatfile ] .RB [ \-version ] .RB [ \-help ] .ad @@ -164,6 +166,12 @@ stored in the environment variable and the pathname of the folder containing the message is stored in the environment variable .BR $mhfolder . +The creation of the \*(lq@\*(rq file and associated environment variables +can be controlled via the +.B \-atfile +and +.B \-noatfile +options. .PP The .B \-draftfolder @@ -226,6 +234,7 @@ comp(1), forw(1), repl(1), send(1), whatnow(1) .RB ` \-noannotate ' .RB ` \-nodraftfolder ' .RB ` \-inplace ' +.RB ` \-atfile ' .fi .SH CONTEXT diff --git a/man/repl.man b/man/repl.man index 4c04887..261ee60 100644 --- a/man/repl.man +++ b/man/repl.man @@ -39,6 +39,8 @@ all/to/cc/me] .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] +.RB [ \-atfile ] +.RB [ \-noatfile ] .RB [ \-build ] .RB [ \-file .IR msgfile ] @@ -220,6 +222,12 @@ stored in the environment variable and the pathname of the folder containing the message is stored in the environment variable .BR $mhfolder . +The creation of the \*(lq@\*(rq file and associated environment variables +can be controlled via the +.B \-atfile +and +.B \-noatfile +options. .PP Although .B repl @@ -510,6 +518,7 @@ mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5) .RB ` \-inplace ' .RB ` \-nomime ' .RB ` \-noquery ' +.RB ` \-atfile ' .RB ` "\-width\ 72" ' .fi diff --git a/uip/dist.c b/uip/dist.c index 20ae318..169eacd 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -52,6 +52,10 @@ static struct swit switches[] = { { "fcc mailbox", 0 }, #define WIDTHSW 19 { "width columns", 0 }, +#define ATFILESW 20 +{ "atfile", 0 }, +#define NOATFILESW 21 +{ "noatfile", 0 }, { NULL, 0 } }; @@ -85,7 +89,7 @@ main (int argc, char **argv) int anot = 0, inplace = 1, nedit = 0; int nwhat = 0, i, in, isdf = 0, out; int outputlinelen = OUTPUTLINELEN; -int dat[5]; +int dat[5], atfile = 1; char *cp, *cwd, *maildir, *msgnam, *dfolder = NULL; char *dmsg = NULL, *ed = NULL, *file = NULL, *folder = NULL; char *form = NULL, *msg = NULL, buf[BUFSIZ], drft[BUFSIZ]; @@ -213,6 +217,13 @@ main (int argc, char **argv) if ((outputlinelen = atoi(cp)) < 10) adios (NULL, "impossible width %d", outputlinelen); continue; + + case ATFILESW: + atfile++; + continue; + case NOATFILESW: + atfile = 0; + continue; } } if (*cp == '+' || *cp == '@') { @@ -333,7 +344,7 @@ try_it_again: if (nwhat) done (0); -what_now (ed, nedit, NOUSE, drft, msgnam, 1, mp, +what_now (ed, nedit, NOUSE, drft, atfile ? msgnam : NULL, 1, mp, anot ? "Resent" : NULL, inplace, cwd); done (1); return 1; diff --git a/uip/repl.c b/uip/repl.c index ab8042f..97178b1 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -70,6 +70,10 @@ static struct swit switches[] = { { "file file", 4 },/* interface from msh */ #defineBILDSW28 { "build", 5 },/* interface from mhe */ +#define ATFILESW 29 +{ "atfile", 0 }, +#define NOATFILESW30 +{ "noatfile", 0 }, { NULL, 0 } }; @@ -134,6 +138,7 @@ main (int argc, char **argv) inti, isdf = 0; int anot = 0, inplace = 1; int nedit = 0, nwhat = 0; +int atfile = 1; char *cp, *cwd, *dp, *maildir, *file = NULL; char *folder = NULL, *msg = NULL, *dfolder = NULL; char *dm
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. a66c30d557c09799db7cd166ba5fa2a97dbafbb3
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via a66c30d557c09799db7cd166ba5fa2a97dbafbb3 (commit) via 5e000509849ff401de669b282057511d4d933b7b (commit) from 46d843745041d6e852be2ae57de9261ae4e5f399 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=a66c30d557c09799db7cd166ba5fa2a97dbafbb3 commit a66c30d557c09799db7cd166ba5fa2a97dbafbb3 Author: Ken Hornstein Date: Fri Mar 16 13:02:43 2012 -0400 Make -attach Nmh-Attachment & -attachformat 1 the default. diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 00fc444..041cd28 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -48,3 +48,5 @@ Things to add to the release notes for the next full release: [Bug #35303]. - post(8) can now explicitly control the SMTP envelope address either via the Sender: header or the new Envelope-From: header. +- The -attach option is now the default (using Nmh-Attachment) and + -attachformat 1 is now the default. diff --git a/h/mh.h b/h/mh.h index adb3303..1d55618 100644 --- a/h/mh.h +++ b/h/mh.h @@ -266,6 +266,8 @@ extern char *msg_delim; /* .. */ #define LINK "@" /* Name of link to file to which you are */ /* replying. */ +#define NMH_ATTACH_HEADER "Nmh-Attachment" /* Default header for -attach */ + /* * miscellaneous macros */ diff --git a/man/send.man b/man/send.man index 2cd840b..0f08c5d 100644 --- a/man/send.man +++ b/man/send.man @@ -51,6 +51,7 @@ send \- send a message .RB [ \-help ] .RB [ \-attach .IR header-field-name ] +.RB [ \-noattach ] .RB [ \-attachformat .IR 0 " | " 1 " | " 2 ] .ad @@ -78,15 +79,15 @@ are actually performed by .BR post . .PP -If a -.I header-field-name -is supplied using the -.B -attach -option, the draft is scanned for a header whose field name matches the -supplied -.IR header-field-name . +By default the draft is scanned for a header named +.IR Nmh-Attachment . The draft is converted to a MIME message if one or more matches are found. -This conversion occurs before all other processing. +This conversion occurs before all other processing. The header name +can be changed with the +.B \-attach +option. This behavior can be disabled completely with the +.B \-noattach +option. .PP The first part of the MIME message is the draft body if that body contains any non-blank characters. @@ -115,12 +116,12 @@ command on the file. The .B -attachformat option specifies the MIME header field formats: a value of -.B 0, -the default, +.B 0 includes the .I x-unix-mode attribute as noted above. A value of -.B 1 +.BR 1 , +the default, suppresses that, puts the file name in the \*(lqContent-Description\*(rq header, and adds a \*(lqContent-Disposition\*(rq header. A value of @@ -440,7 +441,8 @@ comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8) .RB ` \-noverbose ' .RB ` \-nowatch ' .RB ` "\-width\ 72" ' -.RB ` "\-attachformat\ 0" ' +.RB ` "\-attach\ Nmh-Attachment" ' +.RB ` "\-attachformat\ 1" ' .fi .SH CONTEXT diff --git a/man/whatnow.man b/man/whatnow.man index 749e548..1b4c2f2 100644 --- a/man/whatnow.man +++ b/man/whatnow.man @@ -23,6 +23,7 @@ whatnow \- prompting front-end for sending messages .RB [ \-help ] .RB [ \-attach .IR header-field-name ] +.RB [ \-noattach ] .ad .SH DESCRIPTION .B Whatnow @@ -230,6 +231,7 @@ send(1), whom(1) .SH DEFAULTS .nf .RB ` \-prompt "' defaults to \*(lqWhat\ Now?\ \*(rq" +.RB ` \-attach "' defaults to \*(lqNmh-Attachment\*(rq" .fi .SH CONTEXT diff --git a/uip/send.c b/uip/send.c index 9df71d7..5034121 100644 --- a/uip/send.c +++ b/uip/send.c @@ -112,13 +112,15 @@ static struct swit switches[] = { { "user username", SASLminc(-4) }, #define ATTACHSW 42 { "attach", 6 }, -#define ATTACHFORMATSW43 +#define NOATTACHSW43 +{ "noattach", 0 }, +#define ATTACHFORMATSW44 { "attachformat", 7 }, -#define PORTSW 44 +#define PORTSW 45 { "port server-port-name/number" , 4 }, -#define TLSSW45 +#define TLSSW46 { "tls", TLSminc(-3) }, -#define NTLSSW46 +#define NTLSSW47 { "notls", TLSminc(-5) }, { NULL, 0 } }; @@ -157,8 +159,8 @@ main (int argc, char **argv) char *msgs[MAXARGS], *vec[
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. b4e9a392c63e07e09de31df596674c074eed2457
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via b4e9a392c63e07e09de31df596674c074eed2457 (commit) from a66c30d557c09799db7cd166ba5fa2a97dbafbb3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=b4e9a392c63e07e09de31df596674c074eed2457 commit b4e9a392c63e07e09de31df596674c074eed2457 Author: Ken Hornstein Date: Fri Mar 16 13:21:38 2012 -0400 Improve the documentation for "send" a bit in terms of how it maps file suffixes to MIME types. diff --git a/man/send.man b/man/send.man index 0f08c5d..843bd7d 100644 --- a/man/send.man +++ b/man/send.man @@ -96,14 +96,17 @@ The body of each header field whose name matches the is interpreted as a file name, and each file named is included as a separate part in the MIME message. .PP -For file names with dot suffixes, the context is scanned for a +For file names with dot suffixes, the profile is scanned for a .I mhshow-suffix- entry for that suffix. -The content-type for the part is taken from that context entry if a match is -found. +The content-type for the part is taken from that profile entry if a match is +found. If a match is not found in the user profile, the mhn.defaults +profile is scanned next. If no match is found or the file does not have a dot suffix, the content-type is text/plain if the file contains only ASCII characters or application/octet-stream -if it contains characters outside of the ASCII range. +if it contains characters outside of the ASCII range. See +.BR mhshow (1) +for more details and example syntax. .PP Each part contains a name attribute that is the last component of the path name. A --- Summary of changes: man/send.man | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 740e258c5622dfe9a98a474647d8ddc164109b2f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 740e258c5622dfe9a98a474647d8ddc164109b2f (commit) via 400875ce6f5a30b6a0493c8cae912c36a4a0595d (commit) from 38927b66e5517a1fc730ea2b416ad4ad03c427a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=740e258c5622dfe9a98a474647d8ddc164109b2f commit 740e258c5622dfe9a98a474647d8ddc164109b2f Author: Ken Hornstein Date: Sun Mar 18 21:29:39 2012 -0400 Fix a bug where a message header ending right on the stdio boundary would cause the body output in scan to be truncated. Also include a test for the aforementioned bug. diff --git a/Makefile.am b/Makefile.am index c781eb2..0727fea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,6 +50,7 @@ TESTS = test/bad-input/test-header \ test/forw/test-forw-digest \ test/forw/test-forw-format \ test/inc/test-deb359167 test/inc/test-eom-align \ + test/inc/test-inc-scanout \ test/manpages/test-manpages test/mhbuild/test-forw \ test/mhlist/test-mhlist test/mhparam/test-mhparam \ test/mhpath/test-mhpath \ diff --git a/test/inc/test-inc-scanout b/test/inc/test-inc-scanout new file mode 100755 index 000..75be7dc --- /dev/null +++ b/test/inc/test-inc-scanout @@ -0,0 +1,195 @@ +#!/bin/sh +# +# Check to see if the scan output is correct if we have a message +# right on the stdio buffer boundary +# + +set -e + +if test -z "${MH_OBJ_DIR}"; then +srcdir=`dirname "$0"`/../.. +MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR +fi + +. "$MH_OBJ_DIR/test/common.sh" + +setup_test + +cat > "${MH_TEST_DIR}/test.mbox" < +To: Another Nobody +Date: Thu, 1 Mar 2012 01:02:03 -0500 +Subject: Who is on first? + +Abbott: Every dollar of it. And why not, the man's entitled to it. +Costello: Who is? +Abbott: Yes. +Costello: So who gets it? +Abbott: Why shouldn't he? Sometimes his wife comes down and collects it. +Costello: Who's wife? +Abbott: Yes. After all, the man earns it. +Costello: Who does? +Abbott: Absolutely. +Costello: Well, all I'm trying to find out is what's the guy's name on first base? +Abbott: Oh, no, no. What is on second base. +Costello: I'm not asking you who's on second. +Abbott: Who's on first! +EOF + +cat > "${MH_TEST_DIR}/test.mbox.2" < +To: Another Nobody +Date: Thu, 1 Mar 2012 01:02:03 -0500 +Subject: Who is on first? + +Abbott: Every dollar of it. And why not, the man's entitled to it. +Costello: Who is? +Abbott: Yes. +Costello: So who gets it? +Abbott: Why shouldn't he? Sometimes his wife comes down and collects it. +Costello: Who's wife? +Abbott: Yes. After all, the man earns it. +Costello: Who does? +Abbott: Absolutely. +Costello: Well, all I'm trying to find out is what's the guy's name on first base? +Abbott: Oh, no, no. What is on second base. +Costello: I'm not asking you who's on second. +Abbott: Who's on first! +EOF + +run_test "inc -file ${MH_TEST_DIR}/test.mbox -width 120 -truncate" \ + "Incorporating new mail into inbox... + + 11+ 03/01 Mr Nobody Who is on first?<http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=400875ce6f5a30b6a0493c8cae912c36a4a0595d commit 400875ce6f5a30b6a0493c8cae912c36a4a0595d Author: Ken Hornstein Date: Sat Mar 17 23:42:26 2012 -0400 Fix typo in man page diff --git a/man/mhl.man b/man/mhl.man index cc5254d..5c0af06 100644 --- a/man/mhl.man +++ b/man/mhl.man @@ -325,7 +325,7 @@ the filter program specified by the .IR formatproc profile entry. This filter program is expected to read data on standard input and output data on standard output. Currently the \*(lqformat\*(rq -flag is only supported for the \(*lqbody\*(rq component. The component +flag is only supported for the \*(lqbody\*(rq component. The component name will be prefixed to the output .IR after the filter has been run. The expected use of this is to filter a message --- Summary of changes: Makefile.am |1 + man/mhl.man |2 +- test/inc/test-inc-scanout | 195 + uip/scansbr.c |9 ++ 4 files changed, 206 insertions(+), 1 deletions(-) create mode 100755 test/inc/test-inc-scanout hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 4079495fc819851b2506fc0017ffcfce61f2305f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 4079495fc819851b2506fc0017ffcfce61f2305f (commit) from f5d8200783f132f760b2ecda6358cdc0180f677b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=4079495fc819851b2506fc0017ffcfce61f2305f commit 4079495fc819851b2506fc0017ffcfce61f2305f Author: Ken Hornstein Date: Mon Mar 19 21:37:14 2012 -0400 Just for sanity's sake, double check the "inc" results also with "scan". diff --git a/test/inc/test-inc-scanout b/test/inc/test-inc-scanout index 75be7dc..419147c 100755 --- a/test/inc/test-inc-scanout +++ b/test/inc/test-inc-scanout @@ -189,7 +189,10 @@ run_test "inc -file ${MH_TEST_DIR}/test.mbox -width 120 -truncate" \ 11+ 03/01 Mr Nobody Who is on first?<https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. dd16d13e6e96a0ed6e7d7a23d6e45fd628420ae4
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via dd16d13e6e96a0ed6e7d7a23d6e45fd628420ae4 (commit) from 4079495fc819851b2506fc0017ffcfce61f2305f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=dd16d13e6e96a0ed6e7d7a23d6e45fd628420ae4 commit dd16d13e6e96a0ed6e7d7a23d6e45fd628420ae4 Author: Ken Hornstein Date: Tue Mar 20 19:15:18 2012 -0400 Basic work to add arguments to formatproc calls. diff --git a/h/fmt_scan.h b/h/fmt_scan.h index 394b01e..dbe955f 100644 --- a/h/fmt_scan.h +++ b/h/fmt_scan.h @@ -93,3 +93,4 @@ char *new_fs (char *, char *, char *); int fmt_compile (char *, struct format **); char *formataddr(char *, char *); char *concataddr(char *, char *); +extern char *format_string; diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index 0b739cf..ee495f1 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -246,7 +246,7 @@ static struct ftable functable[] = { #define PUTLIT(str)do { NEW(FT_LIT,0,0); fp->f_text = (str); } while (0) #define PUTC(c)do { NEW(FT_CHAR,0,0); fp->f_char = (c); } while (0) -static char *format_string; +char *format_string; static unsigned char *usr_fstring; /* for CERROR */ #define CERROR(str) compile_error (str, cp) diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index e961b9b..ae1fb5d 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -91,6 +91,10 @@ static struct swit mhlswitches[] = { { "issue number", -5 }, #define NBODYSW 22 { "nobody", -6 }, +#define FMTPROCSW 23 +{ "fmtproc program", 0 }, +#define NFMTPROCSW24 +{ "nofmtproc", 0 }, { NULL, 0 } }; @@ -117,6 +121,16 @@ static struct swit mhlswitches[] = { #defineLBITS "\020\01NOCOMPONENT\02UPPERCASE\03CENTER\04CLEARTEXT\05EXTRA\06HDROUTPUT\07CLEARSCR\010LEFTADJUST\011COMPRESS\012ADDRFMT\013BELL\014DATEFMT\015FORMAT\016INIT\017FACEFMT\020FACEDFLT\021SPLIT\022NONEWLINE\023NOWRAP\024FMTFILTER" #defineGFLAGS (NOCOMPONENT | UPPERCASE | CENTER | LEFTADJUST | COMPRESS | SPLIT | NOWRAP) +/* + * A list of format arguments + */ + +struct arglist { +struct format *a_fmt; +char *a_nfs; +struct arglist *a_next; +}; + struct mcomp { char *c_name; /* component name */ char *c_text; /* component text */ @@ -130,6 +144,9 @@ struct mcomp { int c_cwidth; /* width of component */ int c_length; /* length in lines */ long c_flags; +struct arglist *c_f_args; /* Argument list for filter*/ +struct arglist *c_f_tail; /* Pointer to tail of list */ +int c_nargs; /* Number of arguments */ struct mcomp *c_next; }; @@ -253,6 +270,7 @@ static char delim4[] = "\n--\n\n"; static FILE *(*mhl_action) () = (FILE *(*) ()) 0; +static struct comp *mhlcomp[128]; /* * Redefine a couple of functions. @@ -289,6 +307,11 @@ static void mhladios (char *, char *, ...); static void mhldone (int); static void m_popen (char *); static void filterbody (struct mcomp *, char *, int, int, FILE *); +static int compileargs (struct mcomp *, char *); +static int checkcomp (char *, char *); +static void addcomp (int, char *, char *); +static void freecomps (void); +static void freecomptext (void); int @@ -375,6 +398,14 @@ mhl (int argc, char **argv) nomore++; continue; + case FMTPROCSW: + if (!(formatproc = *argp++) || *formatproc == '-') + adios (NULL, "missing argument to %s", argp[-2]); + continue; + case NFMTPROCSW: + formatproc = NULL; + continue; + case LENSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); @@ -448,6 +479,9 @@ mhl (int argc, char **argv) ontty = NOTTY; } +for (i = 0; i < sizeof(mhlcomp)/sizeof(mhlcomp[0]); i++) + mhlcomp[i] = NULL; + mhl_format (form ? form : mhlformat, length, width); if (vecp == 0) { @@ -457,6 +491,8 @@ mhl (int argc, char **argv) process (folder, files[i], i + 1, vecp); } +freecomps(); + if (forwall) { if (digest) { printf ("%s", delim4); @@ -715,6 +751,20 @@ evalvar (struct mcomp *c1) ret
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 5f531c1fc79b88bb0d1dd5ec15f03342b0a3ffd5
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 5f531c1fc79b88bb0d1dd5ec15f03342b0a3ffd5 (commit) via 878f39953d1d908e8c151e33ea14172ea10b7c4b (commit) from dd16d13e6e96a0ed6e7d7a23d6e45fd628420ae4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=5f531c1fc79b88bb0d1dd5ec15f03342b0a3ffd5 commit 5f531c1fc79b88bb0d1dd5ec15f03342b0a3ffd5 Author: Ken Hornstein Date: Tue Mar 20 20:22:19 2012 -0400 Document formatarg. diff --git a/man/mhl.man b/man/mhl.man index 5c0af06..0f2c670 100644 --- a/man/mhl.man +++ b/man/mhl.man @@ -21,6 +21,9 @@ mhl \- produce formatted listings of nmh messages .RB [ \-moreproc .IR program ] .RB [ \-nomoreproc ] +.RB [ \-fmtproc +.IR program ] +.RB [ \-nofmtproc ] .RI [ files .IR \&... ] .RB [ \-version ] @@ -254,6 +257,7 @@ format flagRun component through formatproc filter (body only) noformat flagDo not run component through formatproc filter (default) +formatarg string Argument to format filter .fi .RE .PP @@ -337,6 +341,23 @@ is as follows: .RS 5 body:component=">",overflowtext=">",overflowoffset=0,format,nowrap .RE +.PP +The +.B \-fmtproc +and +.B \-nofmtproc +switches can be used to override the +.I formatproc +profile entry. +.PP +The +.I formatarg +option specifies a string that is used as an argument to the format filter. +This string is processed by +.BR mh\-format (5) +and all of the message components are available for use. Multiple +.I formatarg +options can be used to build up multiple arguments to the format filter. .SH FILES .fc ^ ~ .nf @@ -376,3 +397,6 @@ front\-end. .PP The \*(lqnonewline\*(rq option interacts badly with \*(lqcompress\*(rq and \*(lqsplit\*(rq. +.PP +The \*(lqformat\*(rq option really should work on something other than the body +component. http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=878f39953d1d908e8c151e33ea14172ea10b7c4b commit 878f39953d1d908e8c151e33ea14172ea10b7c4b Author: Ken Hornstein Date: Tue Mar 20 19:52:29 2012 -0400 Use _exit() instead of exit() so our writer process doesn't flush out the stdio buffers on exit. diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index ae1fb5d..0798746 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -2119,7 +2119,11 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp) */ close(fdinput[1]); - exit(0); + /* +* Make sure we call _exit(), otherwise we may flush out the stdio +* buffers that we have duplicated from the parent. +*/ + _exit(0); break; case -1: adios(NULL, "Unable to fork for filter writer process"); --- Summary of changes: man/mhl.man | 24 uip/mhlsbr.c |6 +- 2 files changed, 29 insertions(+), 1 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. bd4fca3a8a15b35a04bdc333503c901d677c12eb
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via bd4fca3a8a15b35a04bdc333503c901d677c12eb (commit) from 5f531c1fc79b88bb0d1dd5ec15f03342b0a3ffd5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=bd4fca3a8a15b35a04bdc333503c901d677c12eb commit bd4fca3a8a15b35a04bdc333503c901d677c12eb Author: Ken Hornstein Date: Tue Mar 20 21:36:37 2012 -0400 It turns out that as part of POSIXification we got rid of checks for wcwidth and mbtowc (because they're part of POSIX) but we didn't turn on MULTIBYTE_SUPPORT because configure was testing to see if those functions were supported ... and because the tests never ran, it always came back as not being supported. Time to bite the bullet and turn MULTIBYTE_SUPPORT on by default. diff --git a/configure.ac b/configure.ac index fd9b98e..7957fdd 100644 --- a/configure.ac +++ b/configure.ac @@ -415,13 +415,6 @@ dnl CHECK FUNCTIONS dnl --- AC_CHECK_FUNCS([writev lstat nl_langinfo]) -dnl Check for multibyte character set support -if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = "xyes" \ --a "x$ac_cv_func_wcwidth" = "xyes" -a "x$ac_cv_func_mbtowc" = "xyes"; then - AC_DEFINE(MULTIBYTE_SUPPORT, 1, -[Define to enable support for multibyte character sets.]) -fi - dnl --- dnl CHECK FOR LIBRARIES dnl --- diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 29b87d0..0f5aeb0 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -20,10 +20,8 @@ # include #endif #include -#ifdef MULTIBYTE_SUPPORT -# include -# include -#endif +#include +#include #ifdef LBL struct msgs *fmt_current_folder; /* current folder (set by main program) */ @@ -122,11 +120,9 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { int remaining; /* remaining output width available */ int c, ljust; int end; /* number of input bytes remaining in str */ -#ifdef MULTIBYTE_SUPPORT int char_len; /* bytes in current character */ int w; wchar_t wide_char; -#endif char *sp; /* current position in source string */ char *cp = *dest; /* current position in destination string */ char *ep = cp + n; /* end of destination buffer */ @@ -142,7 +138,6 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { mbtowc(NULL, NULL, 0); /* reset shift state */ end = strlen(str); while (*sp && remaining > 0 && end > 0) { -#ifdef MULTIBYTE_SUPPORT char_len = mbtowc(&wide_char, sp, end); if (char_len <= 0 || (cp + char_len > ep)) break; @@ -151,14 +146,6 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { if (iswcntrl(wide_char) || iswspace(wide_char)) { sp += char_len; -#else - end--; -/* isnctrl(), etc., take an int argument. Cygwin's ctype.h - intentionally warns if they are passed a char. */ -int c = *sp; - if (iscntrl(c) || isspace(c)) { - sp++; -#endif if (!prevCtrl) { *cp++ = ' '; remaining--; @@ -169,7 +156,6 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { } prevCtrl = 0; -#ifdef MULTIBYTE_SUPPORT w = wcwidth(wide_char); if (w >= 0 && remaining >= w) { strncpy(cp, sp, char_len); @@ -177,10 +163,6 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { remaining -= w; } sp += char_len; -#else - *cp++ = *sp++; - remaining--; -#endif } } diff --git a/uip/scansbr.c b/uip/scansbr.c index 1f2785a..7eef85f 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -58,11 +58,7 @@ char *scanl = 0; /* text of most recent scanline*/ */ static int mh_fputs(char *, FILE *); -#ifdef MULTIBYTE_SUPPORT #define SCAN_CHARWIDTH MB_CUR_MAX -#else -#define SCAN_CHARWIDTH 1 -#endif int scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, --- Summary of changes: configure.ac |7 --- sbr/fmt_scan.c | 22 ++ uip/scansbr.c |4 3 files cha
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 24ba06b111dbadb912fa97f74ec8595f71b04393
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 24ba06b111dbadb912fa97f74ec8595f71b04393 (commit) from c2a2ca7d8d72c5a8bdadcd6f2c4dcf3c314a1066 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=24ba06b111dbadb912fa97f74ec8595f71b04393 commit 24ba06b111dbadb912fa97f74ec8595f71b04393 Author: Ken Hornstein Date: Wed Mar 21 12:22:16 2012 -0400 Revert previous change to get rid of MULTIBYTE_SUPPORT ifdef. It turns out this breaks the Plan 9 build. But include a check for the multibyte functions so we get MULTIBYTE_SUPPORT on systems that have it. This reverts commit bd4fca3a8a15b35a04bdc333503c901d677c12eb. diff --git a/configure.ac b/configure.ac index 7957fdd..0b512b3 100644 --- a/configure.ac +++ b/configure.ac @@ -413,7 +413,14 @@ AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM,1, dnl --- dnl CHECK FUNCTIONS dnl --- -AC_CHECK_FUNCS([writev lstat nl_langinfo]) +AC_CHECK_FUNCS([wcwidth mbtowc writev lstat nl_langinfo]) + +dnl Check for multibyte character set support +if test "x$ac_cv_header_wchar_h" = "xyes" -a "x$ac_cv_header_wctype_h" = "xyes" \ +-a "x$ac_cv_func_wcwidth" = "xyes" -a "x$ac_cv_func_mbtowc" = "xyes"; then + AC_DEFINE(MULTIBYTE_SUPPORT, 1, +[Define to enable support for multibyte character sets.]) +fi dnl --- dnl CHECK FOR LIBRARIES diff --git a/sbr/fmt_scan.c b/sbr/fmt_scan.c index 0f5aeb0..29b87d0 100644 --- a/sbr/fmt_scan.c +++ b/sbr/fmt_scan.c @@ -20,8 +20,10 @@ # include #endif #include -#include -#include +#ifdef MULTIBYTE_SUPPORT +# include +# include +#endif #ifdef LBL struct msgs *fmt_current_folder; /* current folder (set by main program) */ @@ -120,9 +122,11 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { int remaining; /* remaining output width available */ int c, ljust; int end; /* number of input bytes remaining in str */ +#ifdef MULTIBYTE_SUPPORT int char_len; /* bytes in current character */ int w; wchar_t wide_char; +#endif char *sp; /* current position in source string */ char *cp = *dest; /* current position in destination string */ char *ep = cp + n; /* end of destination buffer */ @@ -138,6 +142,7 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { mbtowc(NULL, NULL, 0); /* reset shift state */ end = strlen(str); while (*sp && remaining > 0 && end > 0) { +#ifdef MULTIBYTE_SUPPORT char_len = mbtowc(&wide_char, sp, end); if (char_len <= 0 || (cp + char_len > ep)) break; @@ -146,6 +151,14 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { if (iswcntrl(wide_char) || iswspace(wide_char)) { sp += char_len; +#else + end--; +/* isnctrl(), etc., take an int argument. Cygwin's ctype.h + intentionally warns if they are passed a char. */ +int c = *sp; + if (iscntrl(c) || isspace(c)) { + sp++; +#endif if (!prevCtrl) { *cp++ = ' '; remaining--; @@ -156,6 +169,7 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { } prevCtrl = 0; +#ifdef MULTIBYTE_SUPPORT w = wcwidth(wide_char); if (w >= 0 && remaining >= w) { strncpy(cp, sp, char_len); @@ -163,6 +177,10 @@ cptrimmed(char **dest, char *str, unsigned int wid, char fill, size_t n) { remaining -= w; } sp += char_len; +#else + *cp++ = *sp++; + remaining--; +#endif } } diff --git a/uip/scansbr.c b/uip/scansbr.c index 7eef85f..1f2785a 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -58,7 +58,11 @@ char *scanl = 0; /* text of most recent scanline*/ */ static int mh_fputs(char *, FILE *); +#ifdef MULTIBYTE_SUPPORT #define SCAN_CHARWIDTH MB_CUR_MAX +#else +#define SCAN_CHARWIDTH 1 +#endif int scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, --- Summary of changes: configure.ac |9 - sbr/fmt_scan.c | 22 -- uip/scansbr.c |4 3 files chang
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 3a85e0bc9c72935ca9d154b3aa3093c31ed1836e
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via 3a85e0bc9c72935ca9d154b3aa3093c31ed1836e (commit) from 24ba06b111dbadb912fa97f74ec8595f71b04393 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=3a85e0bc9c72935ca9d154b3aa3093c31ed1836e commit 3a85e0bc9c72935ca9d154b3aa3093c31ed1836e Author: Ken Hornstein Date: Wed Mar 21 15:27:15 2012 -0400 Support for readline command history, editing, and completion at the WhatNow? prompt. Based on work by Steve Rader. diff --git a/Makefile.am b/Makefile.am index 0727fea..14d1dd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -230,11 +230,11 @@ uip_burst_SOURCES = uip/burst.c uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c -uip_comp_LDADD = $(LDADD) $(ICONVLIB) +uip_comp_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB) uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c uip/forwsbr.c -uip_dist_LDADD = $(LDADD) $(ICONVLIB) +uip_dist_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB) uip_flist_SOURCES = uip/flist.c @@ -242,7 +242,7 @@ uip_folder_SOURCES = uip/folder.c uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c uip/forwsbr.c -uip_forw_LDADD = $(LDADD) $(ICONVLIB) +uip_forw_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB) uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c \ uip/popsbr.c @@ -302,7 +302,7 @@ uip_refile_SOURCES = uip/refile.c uip_repl_SOURCES = uip/repl.c uip/replsbr.c uip/whatnowproc.c \ uip/whatnowsbr.c uip/sendsbr.c uip/annosbr.c uip/distsbr.c -uip_repl_LDADD = $(LDADD) $(ICONVLIB) +uip_repl_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB) uip_rmf_SOURCES = uip/rmf.c @@ -320,6 +320,7 @@ uip_sortm_SOURCES = uip/sortm.c uip_whatnow_SOURCES = uip/whatnow.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c +uip_whatnow_LDADD = $(LDADD) $(READLINELIB) uip_whom_SOURCES = uip/whom.c uip/distsbr.c @@ -476,7 +477,8 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/brkstring.c \ sbr/snprintb.c sbr/ssequal.c sbr/strcasecmp.c \ sbr/strindex.c sbr/trimcpy.c sbr/uprf.c sbr/vfgets.c \ sbr/fmt_def.c sbr/m_msgdef.c sbr/mf.c sbr/utils.c \ - sbr/m_mktemp.c config/config.c config/version.c + sbr/m_mktemp.c sbr/getansreadline.c config/config.c \ + config/version.c sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(sysconfdir)"' \ -DMAILSPOOL='"$(mailspool)"' \ diff --git a/configure.ac b/configure.ac index 0b512b3..480c8be 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,8 @@ AS_IF([test x"$with_mts" = x"smtp"], [MTS="smtp"], [MTS="smtp"]) AC_SUBST([MTS])dnl +NMH_READLINE + dnl What should be the default pager? AC_ARG_WITH([pager], AS_HELP_STRING([--with-pager=PAGER],[specify the default pager])) diff --git a/docs/pending-release-notes b/docs/pending-release-notes index a867299..fa8147c 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -57,3 +57,5 @@ Things to add to the release notes for the next full release: obsolete/deprecated: -noatfile will become the default in the next nmh release. If there are no requests to maintain -atfile, it will be removed in the future. +- Added support for readline editing and command/filename completion at + the WhatNow? prompt diff --git a/h/prototypes.h b/h/prototypes.h index 935c593..38357a8 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -57,6 +57,9 @@ struct msgs *folder_read (char *); struct msgs *folder_realloc (struct msgs *, int, int); int gans (char *, struct swit *); char **getans (char *, struct swit *); +#ifdef READLINE_SUPPORT +char **getans_via_readline (char *, struct swit *); +#endif /* READLINE_SUPPORT */ int getanswer (char *); char **getarguments (char *, int, char **, int); char *get_charset(void); diff --git a/m4/readline.m4 b/m4/readline.m4 new file mode 100644 index 000..7a2710d --- /dev/null +++ b/m4/readline.m4 @@ -0,0 +1,25 @@ +dnl +dnl Our readline heuristic. If we haven't been asked about readline, then +dnl try to compile with it. If we've been asked for it, then we fail +dnl if we cannot u
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. c915e11a95bdfb6157eecc81c5df82de65c86796
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The nmh Mail Handling System". The branch, master has been updated via c915e11a95bdfb6157eecc81c5df82de65c86796 (commit) from f423b06bf5ab4a966b17857f027a46e74447f438 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c915e11a95bdfb6157eecc81c5df82de65c86796 commit c915e11a95bdfb6157eecc81c5df82de65c86796 Author: Ken Hornstein Date: Thu Mar 22 23:34:08 2012 -0400 If the number of messages in a folder is zero, then don't try to clear out the sequence list; this can cause you to run off the beginning of the malloc'd buffer. This can happen when you use "comp" with a draft folder, the draft folder is empty, and you have a previous sequence set in your .mh_profile. As far as I can tell this has been a problem for nearly forever, but I only ran into it recently when adding the readline support. Go figure. diff --git a/sbr/seq_add.c b/sbr/seq_add.c index 0bdcfdf..d5109b0 100644 --- a/sbr/seq_add.c +++ b/sbr/seq_add.c @@ -67,7 +67,7 @@ seq_addsel (struct msgs *mp, char *cp, int public, int zero) * If sequence is new, or zero flag is set, then first * clear the bit for this sequence from all messages. */ -if (new_seq || zero) { +if ((new_seq || zero) && mp->nummsg > 0) { for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++) clear_sequence (mp, i, msgnum); } @@ -159,7 +159,7 @@ seq_addmsg (struct msgs *mp, char *cp, int msgnum, int public, int zero) * If sequence is new, or zero flag is set, then first * clear the bit for this sequence from all messages. */ -if (new_seq || zero) { +if ((new_seq || zero) && mp->nummsg > 0) { for (j = mp->lowmsg; j <= mp->hghmsg; j++) clear_sequence (mp, i, j); } --- Summary of changes: sbr/seq_add.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The nmh Mail Handling System ___ Nmh-commits mailing list Nmh-commits@nongnu.org https://lists.nongnu.org/mailman/listinfo/nmh-commits