From MAILER-DAEMON Mon Jul 04 13:57:39 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QdnOs-0007HH-TC
	for mharc-commit-mailutils@gnu.org; Mon, 04 Jul 2011 13:57:39 -0400
Received: from eggs.gnu.org ([140.186.70.92]:54045)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdnOp-0007Gg-QF
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 13:57:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdnOo-0000Aj-FM
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 13:57:35 -0400
Received: from colonialone.fsf.org ([140.186.70.51]:42533)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdnOo-0000Af-6A
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 13:57:34 -0400
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by colonialone.fsf.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdnOo-0006KM-3a
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 17:57:34 +0000
Received: from gray by vcs-noshell.in.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdnOn-0003l8-Pl
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 17:57:34 +0000
Date: Mon, 04 Jul 2011 17:57:33 +0000
Message-Id: <E1QdnOn-0003l8-Pl@vcs-noshell.in.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-370-gd09b1d7
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3bf7604700d714f19863ca00c757baa1ade016b9
X-Git-Newrev: d09b1d73ac69c42280c48e58f1912ce242ca6edc
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.51
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Jul 2011 17:57:37 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=d09b1d73ac69c42280c48e58f1912ce242ca6edc

The branch, master has been updated
       via  d09b1d73ac69c42280c48e58f1912ce242ca6edc (commit)
      from  3bf7604700d714f19863ca00c757baa1ade016b9 (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 -----------------------------------------------------------------
commit d09b1d73ac69c42280c48e58f1912ce242ca6edc
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Mon Jul 4 20:56:13 2011 +0300

    Minor fix.
    
    * libmailutils/diag/wd.c (mu_wd): Revamp the loop to ensure the proposed
    way of connecting with gdb works in case of a non-zero timeout.

-----------------------------------------------------------------------

Summary of changes:
 libmailutils/diag/wd.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libmailutils/diag/wd.c b/libmailutils/diag/wd.c
index 0ccfd06..198cacf 100644
--- a/libmailutils/diag/wd.c
+++ b/libmailutils/diag/wd.c
@@ -49,10 +49,9 @@ mu_wd (unsigned to)
   if (to)
     {
       _count_down = to;
-      while (_count_down)
+      while (_count_down--);
 	{
 	  sleep (1);
-	  _count_down--;
 	}
     }
   else


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Mon Jul 04 19:31:08 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Qdsbc-0007Hu-1E
	for mharc-commit-mailutils@gnu.org; Mon, 04 Jul 2011 19:31:08 -0400
Received: from eggs.gnu.org ([140.186.70.92]:33425)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdsbY-0007HR-JH
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 19:31:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdsbW-0008F5-Gs
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 19:31:04 -0400
Received: from colonialone.fsf.org ([140.186.70.51]:44495)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdsbW-0008F1-6a
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 19:31:02 -0400
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by colonialone.fsf.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdsbV-0000ey-T5
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 23:31:02 +0000
Received: from gray by vcs-noshell.in.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QdsbU-0004wV-Nf
	for commit-mailutils@gnu.org; Mon, 04 Jul 2011 23:31:01 +0000
Date: Mon, 04 Jul 2011 23:31:01 +0000
Message-Id: <E1QdsbU-0004wV-Nf@vcs-noshell.in.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-372-g5e1d982
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d09b1d73ac69c42280c48e58f1912ce242ca6edc
X-Git-Newrev: 5e1d982ec31de34b7bf7ca6b84172966ebf9d917
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.51
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Jul 2011 23:31:06 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=5e1d982ec31de34b7bf7ca6b84172966ebf9d917

The branch, master has been updated
       via  5e1d982ec31de34b7bf7ca6b84172966ebf9d917 (commit)
       via  1b5098c98df757ad24841bcc8b5350a64c07a25a (commit)
      from  d09b1d73ac69c42280c48e58f1912ce242ca6edc (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 -----------------------------------------------------------------
commit 5e1d982ec31de34b7bf7ca6b84172966ebf9d917
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Jul 5 02:13:53 2011 +0300

    Allow caller to set up custom in,out,err,progname,tag before calling mu_app_init.
    
    * include/mailutils/stdstream.h (MU_STDSTREAM_RESET_STRIN)
    (MU_STDSTREAM_RESET_STROUT,MU_STDSTREAM_RESET_STRERR)
    (MU_STDSTREAM_RESET_NONE,MU_STDSTREAM_RESET_ALL): New flags.
    (mu_stdstream_setup): Change signature. All uses updated.
    * libmailutils/stdstream/basestr.c (mu_stdstream_setup):
    Use the flags argument to decide whether to close existing
    streams.
    Make sure stdstream_flushall enters the onexit queue only once.
    * libmu_argp/muinit.c (mu_app_init): Don't override variables
    that may be set by the caller (program_name, tag, streams).

commit 1b5098c98df757ad24841bcc8b5350a64c07a25a
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Jul 5 02:12:30 2011 +0300

    Fixes.
    
    * libmailutils/diag/errors: Fix typo.
    * libproto/imap/connect.c: Add missing includes.
    * mh/tests/mhn.at: Add extra argument quoting.

-----------------------------------------------------------------------

Summary of changes:
 include/mailutils/stdstream.h    |   12 +++++++-
 libmailutils/diag/diag.c         |    2 +-
 libmailutils/diag/errors         |    2 +-
 libmailutils/stdstream/basestr.c |   61 +++++++++++++++++++++++++-------------
 libmailutils/tests/debugspec.c   |    2 +-
 libmu_argp/muinit.c              |    8 +++--
 libproto/imap/connect.c          |    2 +
 mail/mail.c                      |    2 +-
 mail/mailvar.c                   |    2 +-
 mh/mh_init.c                     |   12 +-------
 mh/tests/mhn.at                  |    4 +-
 testsuite/smtpsend.c             |    2 +-
 12 files changed, 67 insertions(+), 44 deletions(-)

diff --git a/include/mailutils/stdstream.h b/include/mailutils/stdstream.h
index d560d9c..ecb8fde 100644
--- a/include/mailutils/stdstream.h
+++ b/include/mailutils/stdstream.h
@@ -33,7 +33,17 @@ extern const char *mu_program_name;
 #define MU_STRERR_SYSLOG  1
 /* #define MU_STRERR_FILE    2 */
 
-void mu_stdstream_setup (void);
+#define MU_STDSTREAM_RESET_STRIN  0x01
+#define MU_STDSTREAM_RESET_STROUT 0x02
+#define MU_STDSTREAM_RESET_STRERR 0x04
+
+#define MU_STDSTREAM_RESET_NONE 0  
+#define MU_STDSTREAM_RESET_ALL \
+  (MU_STDSTREAM_RESET_STRIN | \
+   MU_STDSTREAM_RESET_STROUT | \
+   MU_STDSTREAM_RESET_STRERR)
+  
+void mu_stdstream_setup (int reset_flags);
 int mu_stdstream_strerr_create (mu_stream_t *str, int type, int facility,
 				int priority, const char *tag,
 				const char *fname);
diff --git a/libmailutils/diag/diag.c b/libmailutils/diag/diag.c
index f8cd53f..5ce4c4f 100644
--- a/libmailutils/diag/diag.c
+++ b/libmailutils/diag/diag.c
@@ -60,7 +60,7 @@ void
 mu_diag_init ()
 {
   if (!mu_strerr)
-    mu_stdstream_setup ();
+    mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
 }
 
 void
diff --git a/libmailutils/diag/errors b/libmailutils/diag/errors
index 03f71b7..10bad5c 100644
--- a/libmailutils/diag/errors
+++ b/libmailutils/diag/errors
@@ -53,7 +53,7 @@ MU_ERR_MAILER_NO_RCPT_TO    _("No receipt addresses found")
 MU_ERR_MAILER_BAD_URL       _("Malformed or unsupported mailer URL")
 MU_ERR_SMTP_RCPT_FAILED     _("SMTP rcpt to command failed")
 MU_ERR_TCP_NO_HOST          _("Tcp connections need a host")
-MU_ERR_TCP_NO_PORT          _("Tcp connections need a postive port")
+MU_ERR_TCP_NO_PORT          _("Tcp connections need a positive port")
 
 MU_ERR_BAD_2047_INPUT       _("Input string is not RFC 2047 encoded")
 MU_ERR_BAD_2047_ENCODING    _("Not a valid RFC 2047 encoding")
diff --git a/libmailutils/stdstream/basestr.c b/libmailutils/stdstream/basestr.c
index 39767d3..74247f0 100644
--- a/libmailutils/stdstream/basestr.c
+++ b/libmailutils/stdstream/basestr.c
@@ -41,17 +41,22 @@ stdstream_flushall (void *data MU_ARG_UNUSED)
   mu_stream_flush (mu_strerr);
 }
 
+static int stdstream_flushall_setup = 0;
+
 void
-mu_stdstream_setup ()
+mu_stdstream_setup (int flags)
 {
   int rc;
   int fd;
   int yes = 1;
   
   /* If the streams are already open, close them */
-  mu_stream_destroy (&mu_strin);
-  mu_stream_destroy (&mu_strout);
-  mu_stream_destroy (&mu_strerr);
+  if (flags & MU_STDSTREAM_RESET_STRIN)
+    mu_stream_destroy (&mu_strin);
+  if (flags & MU_STDSTREAM_RESET_STROUT)
+    mu_stream_destroy (&mu_strout);
+  if (flags & MU_STDSTREAM_RESET_STRERR)
+    mu_stream_destroy (&mu_strerr);
   
   /* Ensure that first 3 descriptors are open in proper mode */
   fd = open ("/dev/null", O_RDWR);
@@ -84,28 +89,42 @@ mu_stdstream_setup ()
     }
 
   /* Create the corresponding streams */
-  rc = mu_stdio_stream_create (&mu_strin, MU_STDIN_FD, 0);
-  if (rc)
+  if (!mu_strin)
     {
-      fprintf (stderr, "mu_stdio_stream_create(%d): %s\n",
-	       MU_STDIN_FD, mu_strerror (rc));
-      abort ();
+      rc = mu_stdio_stream_create (&mu_strin, MU_STDIN_FD, 0);
+      if (rc)
+	{
+	  fprintf (stderr, "mu_stdio_stream_create(%d): %s\n",
+		   MU_STDIN_FD, mu_strerror (rc));
+	  abort ();
+	}
+      mu_stream_ioctl (mu_strin, MU_IOCTL_FD, MU_IOCTL_FD_SET_BORROW, &yes);
     }
-  mu_stream_ioctl (mu_strin, MU_IOCTL_FD, MU_IOCTL_FD_SET_BORROW, &yes);
-  
-  rc = mu_stdio_stream_create (&mu_strout, MU_STDOUT_FD, 0);
-  if (rc)
+
+  if (!mu_strout)
+    {
+      rc = mu_stdio_stream_create (&mu_strout, MU_STDOUT_FD, 0);
+      if (rc)
+	{
+	  fprintf (stderr, "mu_stdio_stream_create(%d): %s\n",
+		   MU_STDOUT_FD, mu_strerror (rc));
+	  abort ();
+	}
+      mu_stream_ioctl (mu_strout, MU_IOCTL_FD, MU_IOCTL_FD_SET_BORROW, &yes);
+    }
+
+  if (!mu_strerr)
     {
-      fprintf (stderr, "mu_stdio_stream_create(%d): %s\n",
-	       MU_STDOUT_FD, mu_strerror (rc));
-      abort ();
+      if (mu_stdstream_strerr_create (&mu_strerr, MU_STRERR_STDERR, 0, 0,
+				      mu_program_name, NULL))
+	abort ();
     }
-  mu_stream_ioctl (mu_strout, MU_IOCTL_FD, MU_IOCTL_FD_SET_BORROW, &yes);
 
-  if (mu_stdstream_strerr_create (&mu_strerr, MU_STRERR_STDERR, 0, 0,
-				  mu_program_name, NULL))
-    abort ();
-  mu_onexit (stdstream_flushall, NULL);
+  if (!stdstream_flushall_setup)
+    {
+      mu_onexit (stdstream_flushall, NULL);
+      stdstream_flushall_setup = 1;
+    }
 }
 
 int
diff --git a/libmailutils/tests/debugspec.c b/libmailutils/tests/debugspec.c
index 9dcf25f..41230ee 100644
--- a/libmailutils/tests/debugspec.c
+++ b/libmailutils/tests/debugspec.c
@@ -33,7 +33,7 @@ main (int argc, char **argv)
   char *arg;
   
   mu_set_program_name (argv[0]);
-  mu_stdstream_setup ();
+  mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
 
   if (argc == 1)
     {
diff --git a/libmu_argp/muinit.c b/libmu_argp/muinit.c
index 4f73948..ccdd34c 100644
--- a/libmu_argp/muinit.c
+++ b/libmu_argp/muinit.c
@@ -107,9 +107,11 @@ mu_app_init (struct argp *myargp, const char **capa,
   char **excapa;
   struct mu_cfg_tree *parse_tree = NULL;
   
-  mu_set_program_name (argv[0]);
-  mu_log_tag = (char*)mu_program_name;
-  mu_stdstream_setup ();
+  if (!mu_program_name)
+    mu_set_program_name (argv[0]);
+  if (!mu_log_tag)
+    mu_log_tag = (char*)mu_program_name;
+  mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
   
   mu_libargp_init ();
   if (capa)
diff --git a/libproto/imap/connect.c b/libproto/imap/connect.c
index ba77ba6..6585e8c 100644
--- a/libproto/imap/connect.c
+++ b/libproto/imap/connect.c
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <sys/select.h>
+#include <sys/time.h>
 #include <mailutils/errno.h>
 #include <mailutils/wordsplit.h>
 #include <mailutils/sys/imap.h>
diff --git a/mail/mail.c b/mail/mail.c
index c7ecab7..33fac2c 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -323,7 +323,7 @@ main (int argc, char **argv)
   struct arguments args;
   int i, rc;
   
-  mu_stdstream_setup ();
+  mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
   set_cursor (1);
 
   /* Native Language Support */
diff --git a/mail/mailvar.c b/mail/mailvar.c
index 3ed78eb..0413fbd 100644
--- a/mail/mailvar.c
+++ b/mail/mailvar.c
@@ -164,7 +164,7 @@ struct mailvar_symbol mailvar_tab[] =
     { { "metamail", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
       N_("interpret the content of message parts; if set to a string "
-	 "specifies the name of the externam metamail command") },
+	 "specifies the name of the external metamail command") },
     { { "metoo", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
       N_("do not remove sender addresses from the recipient list") },
diff --git a/mh/mh_init.c b/mh/mh_init.c
index e03ff4a..7d44c90 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -40,20 +40,10 @@ char mh_list_format[] =
   "%<(zero)%17(decode(friendly{from}))%>"
   "  %(decode{subject})%<{body}<<%{body}>>%>";
 
-/* Make sure stdin is open.  If not, connect it to /dev/null. */
-static void
-mh_ensure_stdin ()
-{
-  int fd = open ("/dev/null", O_RDONLY);
-  if (fd != 0)
-    close (fd);
-}
-
 void
 mh_init ()
 {
-  mh_ensure_stdin ();
-  mu_stdstream_setup ();
+  mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
   
   /* Register all mailbox and mailer formats */
   mu_register_all_formats ();
diff --git a/mh/tests/mhn.at b/mh/tests/mhn.at
index 7316b1c..3d0e4e0 100644
--- a/mh/tests/mhn.at
+++ b/mh/tests/mhn.at
@@ -251,7 +251,7 @@ mhn +inbox -store -part 2.2.1 4 | remove_curdir || exit $?
 [storing message 4 part 2.2.1 to folder inbox as message 5
 ])
 
-MH_CHECK([mhn-store-: pipe],[mhn11 mhn-store-pipe],[
+MH_CHECK([mhn-store-: pipe],[mhn11 mhn-store-pipe],[[
 mkdir Mail/inbox
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
 chmod +w Mail/inbox/4
@@ -259,7 +259,7 @@ chmod +w Mail/inbox/4
 echo "Current-Folder: inbox" > Mail/context
 echo "mhn-store-text: | $abs_top_srcdir/mh/tests/mhed -" >> $MH
 mhn +inbox -store -part 1 4 | sed "s|$abs_top_srcdir/mh/tests/||;s|(cd \(.*\)\;|(cd home\;|;s|  *$||" || exit $?
-],
+]],
 [0],
 [-- Editor invocation: -
 -- Input file:
diff --git a/testsuite/smtpsend.c b/testsuite/smtpsend.c
index b4f3754..2b0d91a 100644
--- a/testsuite/smtpsend.c
+++ b/testsuite/smtpsend.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
   struct mu_sockaddr_hints hints;
   
   mu_set_program_name (argv[0]);
-  mu_stdstream_setup ();
+  mu_stdstream_setup (MU_STDSTREAM_RESET_NONE);
 #ifdef WITH_TLS
   mu_init_tls_libs ();
 #endif  


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Thu Jul 07 04:52:47 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QekKE-00035i-AR
	for mharc-commit-mailutils@gnu.org; Thu, 07 Jul 2011 04:52:46 -0400
Received: from eggs.gnu.org ([140.186.70.92]:44930)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QekKB-00034z-A4
	for commit-mailutils@gnu.org; Thu, 07 Jul 2011 04:52:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QekK9-0004Ls-Qw
	for commit-mailutils@gnu.org; Thu, 07 Jul 2011 04:52:43 -0400
Received: from colonialone.fsf.org ([140.186.70.51]:41679)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QekK9-0004Ll-PN
	for commit-mailutils@gnu.org; Thu, 07 Jul 2011 04:52:41 -0400
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by colonialone.fsf.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QekK9-0002sN-B4
	for commit-mailutils@gnu.org; Thu, 07 Jul 2011 08:52:41 +0000
Received: from gray by vcs-noshell.in.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QekK7-0001zU-J2
	for commit-mailutils@gnu.org; Thu, 07 Jul 2011 08:52:41 +0000
Date: Thu, 07 Jul 2011 08:52:40 +0000
Message-Id: <E1QekK7-0001zU-J2@vcs-noshell.in.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-373-ga9667ed
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5e1d982ec31de34b7bf7ca6b84172966ebf9d917
X-Git-Newrev: a9667edc912dc6d51031d09f9f5ded223851318a
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.51
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jul 2011 08:52:44 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=a9667edc912dc6d51031d09f9f5ded223851318a

The branch, master has been updated
       via  a9667edc912dc6d51031d09f9f5ded223851318a (commit)
      from  5e1d982ec31de34b7bf7ca6b84172966ebf9d917 (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 -----------------------------------------------------------------
commit a9667edc912dc6d51031d09f9f5ded223851318a
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jul 7 11:43:26 2011 +0300

    Bugfix.
    
    * libmailutils/string/vasnprintf.c (mu_vasnprintf): Operate on
    a fresh copy of va_alist in each new iteration.
    * libproto/imap/folder.c: Likewise.
    * libproto/nntp/nntp_sendline.c: Likewise.

-----------------------------------------------------------------------

Summary of changes:
 libmailutils/string/vasnprintf.c |    8 +++++++-
 libproto/imap/folder.c           |    5 ++++-
 libproto/nntp/nntp_sendline.c    |    5 ++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/libmailutils/string/vasnprintf.c b/libmailutils/string/vasnprintf.c
index abc0ef3..c7c762f 100644
--- a/libmailutils/string/vasnprintf.c
+++ b/libmailutils/string/vasnprintf.c
@@ -46,7 +46,13 @@ mu_vasnprintf (char **pbuf, size_t *psize, const char *fmt, va_list ap)
   
   for (;;)
     {
-      ssize_t n = vsnprintf (buf, buflen, fmt, ap);
+      ssize_t n;
+      va_list aq;
+
+      va_copy(aq, ap);
+      n = vsnprintf (buf, buflen, fmt, aq);
+      va_end(aq);
+
       if (n < 0 || n >= buflen || !memchr (buf, '\0', n + 1))
 	{
 	  char *newbuf;
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c
index f5286ef..828f2a2 100644
--- a/libproto/imap/folder.c
+++ b/libproto/imap/folder.c
@@ -2150,7 +2150,10 @@ imap_writeline (f_imap_t f_imap, const char *format, ...)
   va_start(ap, format);
   do
     {
-      len = vsnprintf (f_imap->buffer, f_imap->buflen, format, ap);
+      va_list aq;
+      va_copy(aq, ap);
+      len = vsnprintf (f_imap->buffer, f_imap->buflen, format, aq);
+      va_end(aq);
       if (len < 0 || len >= (int)f_imap->buflen
           || !memchr (f_imap->buffer, '\0', len + 1))
         {
diff --git a/libproto/nntp/nntp_sendline.c b/libproto/nntp/nntp_sendline.c
index 15061e1..3962caa 100644
--- a/libproto/nntp/nntp_sendline.c
+++ b/libproto/nntp/nntp_sendline.c
@@ -88,7 +88,10 @@ mu_nntp_writeline (mu_nntp_t nntp, const char *format, ...)
      let's try to cope.  */
   do
     {
-      len = vsnprintf (nntp->io.buf, nntp->io.len - 1, format, ap);
+      va_list aq;
+      va_copy(aq, ap);
+      len = vsnprintf (nntp->io.buf, nntp->io.len - 1, format, aq);
+      va_end(aq);
       if (len < 0 || len >= (int)nntp->io.len
 	  || !memchr (nntp->io.buf, '\0', len + 1))
 	{


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Thu Jul 14 04:01:27 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QhGrO-0006w4-DF
	for mharc-commit-mailutils@gnu.org; Thu, 14 Jul 2011 04:01:26 -0400
Received: from eggs.gnu.org ([140.186.70.92]:37973)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhGrG-0006um-VQ
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 04:01:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhGrB-0002p9-8O
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 04:01:18 -0400
Received: from colonialone.fsf.org ([140.186.70.51]:50238)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhGrA-0002ow-SY
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 04:01:12 -0400
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by colonialone.fsf.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhGr9-0004OB-Lt
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 08:01:12 +0000
Received: from gray by vcs-noshell.in.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhGqz-0001MR-Hq
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 08:01:11 +0000
Date: Thu, 14 Jul 2011 08:01:02 +0000
Message-Id: <E1QhGqz-0001MR-Hq@vcs-noshell.in.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-374-gd0769b4
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a9667edc912dc6d51031d09f9f5ded223851318a
X-Git-Newrev: d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.51
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Jul 2011 08:01:24 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b

The branch, master has been updated
       via  d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b (commit)
      from  a9667edc912dc6d51031d09f9f5ded223851318a (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 -----------------------------------------------------------------
commit d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jul 14 10:48:40 2011 +0300

    Implement optional mailbox-independent locking for pop3d and imap4d.
    
    * lib/manlock.c: New file.
    * lib/Makefile.am (libmuaux_a_SOURCES): Add manlock.c.
    * lib/muaux.h (manlock_mandatory_locking)
    (manlock_lock_dir): New externs.
    (manlock_open_mailbox, manlock_lock)
    (manlock_touchlock, manlock_unlock): New protos.
    
    * libmailutils/base/amd.c (amd_cleanup): Remove unbalanced
    call to mu_locker_unlock.
    * libmailutils/base/locker.c (mu_locker_create): Bugfixes.
    
    * imap4d/imap4d.c (imap4d_cfg_param): Add mandatory-locking
    construct.
    (main): Call manlock_cfg_init.
    * imap4d/select.c (imap4d_select0): Use mandatory locking if
    the mailbox is to be opened r/w.
    
    * imap4d/rename.c (imap4d_rename): Note FIXME!
    
    * imap4d/bye.c: Call manlock_unlock after closing the mailbox.
    * imap4d/close.c: Likewise.
    * imap4d/sync.c (imap4d_sync): Call manlock_touchlock.
    
    * pop3d/lock.c: Remove.
    * pop3d/Makefile.am (pop3d_SOURCES): Remove lock.c
    * pop3d/extra.c (pop3d_abquit): Unlock mailbox.
    * pop3d/pop3d.c (pop3d_cfg_param): Add mandatory-locking
    construct.
    (main): Call manlock_cfg_init.
    (pop3d_mainloop): Call manlock_touchlock.
    * pop3d/pop3d.h (pop3d_lock)
    (pop3d_touchlock, pop3d_unlock): Remove.
    * pop3d/quit.c (pop3d_quit): Unlock the mailbox.
    * pop3d/user.c (pop3d_begin_session): Use manlock_open_mailbox.

-----------------------------------------------------------------------

Summary of changes:
 imap4d/bye.c               |    1 +
 imap4d/close.c             |    1 +
 imap4d/imap4d.c            |    2 +
 imap4d/rename.c            |    3 +-
 imap4d/select.c            |   30 +++++-
 imap4d/sync.c              |    1 +
 lib/Makefile.am            |    1 +
 lib/manlock.c              |  248 ++++++++++++++++++++++++++++++++++++++++++++
 lib/muaux.h                |   11 ++
 libmailutils/base/amd.c    |    1 -
 libmailutils/base/locker.c |   22 ++--
 pop3d/Makefile.am          |    1 -
 pop3d/extra.c              |    2 +-
 pop3d/lock.c               |   57 ----------
 pop3d/pop3d.c              |    4 +-
 pop3d/pop3d.h              |    3 -
 pop3d/quit.c               |    2 +-
 pop3d/user.c               |   29 ++----
 18 files changed, 319 insertions(+), 100 deletions(-)
 create mode 100644 lib/manlock.c
 delete mode 100644 pop3d/lock.c

diff --git a/imap4d/bye.c b/imap4d/bye.c
index 9b66a13..86b335c 100644
--- a/imap4d/bye.c
+++ b/imap4d/bye.c
@@ -60,6 +60,7 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
 	  imap4d_enter_critical ();
 	  mu_mailbox_flush (mbox, 0);
 	  mu_mailbox_close (mbox);
+	  manlock_unlock (mbox);
 	  mu_mailbox_destroy (&mbox);
 	  imap4d_leave_critical ();
 	}
diff --git a/imap4d/close.c b/imap4d/close.c
index 0bc3ff1..352de98 100644
--- a/imap4d/close.c
+++ b/imap4d/close.c
@@ -50,6 +50,7 @@ imap4d_close0 (struct imap4d_command *command, imap4d_tokbuf_t tok,
       mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_close", NULL, status);
       msg = "closing mailbox failed";
     }
+  manlock_unlock (mbox);
   mu_mailbox_destroy (&mbox);
 
   if (msg)
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 3c56ef1..035690a 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -284,6 +284,7 @@ static struct mu_cfg_param imap4d_cfg_param[] = {
     N_("Use only encrypted ident responses.") },
   { "id-fields", MU_CFG_LIST_OF(mu_cfg_string), &imap4d_id_list, 0, NULL,
     N_("List of fields to return in response to ID command.") },
+  { "mandatory-locking", mu_cfg_section },
   { ".server", mu_cfg_section, NULL, 0, NULL,
     N_("Server configuration.") },
   { "transcript", mu_cfg_bool, &imap4d_transcript, 0, NULL,
@@ -556,6 +557,7 @@ main (int argc, char **argv)
   mu_gocs_register ("gsasl", mu_gsasl_module_init);
 #endif
   mu_tcpwrapper_cfg_init ();
+  manlock_cfg_init ();
   mu_acl_cfg_init ();
   mu_m_server_cfg_init ();
   
diff --git a/imap4d/rename.c b/imap4d/rename.c
index 30efa94..24fa65e 100644
--- a/imap4d/rename.c
+++ b/imap4d/rename.c
@@ -131,7 +131,8 @@ imap4d_rename (struct imap4d_command *command, imap4d_tokbuf_t tok)
      exist.  */
   if (stat (newname, &newst) == 0)
     {
-      if (!S_ISDIR(newst.st_mode))
+      /* FIXME: What if it's a maildir?!? */
+      if (!S_ISDIR (newst.st_mode))
 	{
 	  free (newname);
 	  return io_completion_response (command, RESP_NO,
diff --git a/imap4d/select.c b/imap4d/select.c
index c961e09..4a928c4 100644
--- a/imap4d/select.c
+++ b/imap4d/select.c
@@ -30,7 +30,7 @@ imap4d_select (struct imap4d_command *command, imap4d_tokbuf_t tok)
 			 MU_STREAM_RDWR);
 }
 
-/* This code is share with EXAMINE.  */
+/* This code is shared with EXAMINE.  */
 int
 imap4d_select0 (struct imap4d_command *command, const char *mboxname,
 		int flags)
@@ -49,6 +49,7 @@ imap4d_select0 (struct imap4d_command *command, const char *mboxname,
       imap4d_enter_critical ();
       mu_mailbox_sync (mbox);
       mu_mailbox_close (mbox);
+      manlock_unlock (mbox);
       imap4d_leave_critical ();
       mu_mailbox_destroy (&mbox);
       /* Destroy the old uid table.  */
@@ -62,8 +63,31 @@ imap4d_select0 (struct imap4d_command *command, const char *mboxname,
   if (!mailbox_name)
     return io_completion_response (command, RESP_NO, "Couldn't open mailbox");
 
-  if ((status = mu_mailbox_create_default (&mbox, mailbox_name)) == 0
-      && (status = mu_mailbox_open (mbox, flags)) == 0)
+  if (flags & MU_STREAM_RDWR)
+    {
+      status = manlock_open_mailbox (&mbox, mailbox_name, 1, flags);
+    }
+  else
+    {
+      status = mu_mailbox_create_default (&mbox, mailbox_name);
+      if (status)
+	mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_create_default",
+			 mailbox_name,
+			 status);
+      else
+	{
+	  status = mu_mailbox_open (mbox, flags);
+	  if (status)
+	    {
+	      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_open",
+			       mailbox_name,
+			       status);
+	      mu_mailbox_destroy (&mbox);
+	    }
+	}
+    }
+  
+  if (status == 0)
     {
       select_flags = flags;
       state = STATE_SEL;
diff --git a/imap4d/sync.c b/imap4d/sync.c
index aac7ae1..4033ec0 100644
--- a/imap4d/sync.c
+++ b/imap4d/sync.c
@@ -187,6 +187,7 @@ imap4d_set_observer (mu_mailbox_t mbox)
 int
 imap4d_sync (void)
 {
+  manlock_touchlock (mbox);
   /* If mbox --> NULL, it means to free all the resources.
      It may be because of close or before select/examine a new mailbox.
      If it was a close we do not send any notification.  */
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 90a0e26..c53879f 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -23,6 +23,7 @@ libmuaux_a_SOURCES += \
  argp_base.c\
  daemon.c\
  mailcap.c\
+ manlock.c\
  mu_dbm.c\
  signal.c\
  strexit.c\
diff --git a/lib/manlock.c b/lib/manlock.c
new file mode 100644
index 0000000..33ecc3f
--- /dev/null
+++ b/lib/manlock.c
@@ -0,0 +1,248 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+   Copyright (C) 1999-2011 Free Software Foundation, Inc.
+
+   GNU Mailutils is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   GNU Mailutils is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <mailutils/types.h>
+#include <mailutils/errno.h>
+#include <mailutils/diag.h>
+#include <mailutils/locker.h>
+#include <mailutils/mailbox.h>
+#include <mailutils/util.h>
+#include <mailutils/url.h>
+#include <mailutils/stream.h>
+#include <mailutils/registrar.h>
+#include <mailutils/nls.h>
+#include <mailutils/cfg.h>
+#include "muaux.h"
+
+/* This file implements mandatory locking for pop3d and imap4d.  Mandatory
+   locking applies to all mailbox formats.  It is enabled by the following
+   configuration clause:
+
+   mandatory-locking {
+     enable yes;
+   }
+
+   If the underlying mailbox mechanism does not provide a locker (as is
+   the case, e.g., for maildir or MH mailboxes), a new locker object is
+   created and attached to the mailbox.  This new locker complies with
+   the "logging" configuration settings.  The name of the corresponding
+   lock file is created based on the mailbox URL.  It is created in
+   a "lock directory", which is configured by `lock-directory' clause in
+   the `mandatory-locking' block.  
+   For example, a lock file for "/var/spool/mail/g/r/gray" would
+   be "/var/lock/subsys/mail/%2Fvar%2Fspool%2Fmail%2Fg%2Fr%2Fgray.lock".
+*/
+
+int manlock_mandatory_locking;
+char *manlock_lock_dir = "/var/lock/subsys/mail";
+
+static char *
+make_locker_file_name (const char *urlstr)
+{
+  char *fname;
+  char *buf;
+  size_t size;
+  const char *p;
+  char *q;
+  static const char escapable_chars[] = "/%";
+  static const char xchr[] = "0123456789ABCDEF";
+	  
+  for (p = urlstr, size = 0; *p; p++, size++)
+    {
+      if (strchr (escapable_chars, *p))
+	size += 2;
+    }
+  
+  buf = malloc (size + 1);
+  if (!buf)
+    {
+      mu_diag_funcall (MU_DIAG_ERROR, "malloc", NULL, errno);
+      return NULL;
+    }
+	  
+  for (p = urlstr, q = buf; *p; p++)
+    {
+      if (strchr (escapable_chars, *p))
+	{
+	  unsigned char c = *p;
+	  *q++ = '%';
+	  *q++ = xchr[c >> 4];
+	  *q++ = xchr[c & 0xf];
+	}
+      else
+	*q++ = *p;
+    }
+  *q = 0;
+  
+  fname = mu_make_file_name_suf (manlock_lock_dir, buf, NULL);
+  if (!fname)
+    mu_diag_funcall (MU_DIAG_ERROR, "mu_make_file_name_suf", buf, errno);
+  free (buf);
+  return fname;
+}
+
+static int
+mailbox_open_and_lock (mu_mailbox_t mbox, int flags)
+{
+  mu_url_t url;
+  int status;
+  const char *urlstr;
+  mu_locker_t lock;
+  
+  mu_mailbox_get_url (mbox, &url);
+  urlstr = mu_url_to_string (url);
+  
+  status = mu_mailbox_get_locker (mbox, &lock);
+  if (status)
+    {
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_get_locker", urlstr, status);
+      return MU_ERR_FAILURE;
+    }
+
+  if (!lock && manlock_mandatory_locking && manlock_lock_dir)
+    {
+      char *fname = NULL;
+      int res;
+
+      if (mu_registrar_test_local_url (url, &res) == 0 && res)
+	{
+	  const char *path;
+	  status = mu_url_sget_path (url, &path);
+	  if (status == 0)
+	    fname = make_locker_file_name (path);
+	}
+      if (!fname)
+	fname = make_locker_file_name (urlstr);
+
+      if (!fname)
+	return MU_ERR_FAILURE;
+	  
+      status = mu_locker_create (&lock, fname, 0);
+      if (status)
+	{
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_locker_create", fname, status);
+	  free (fname);
+	  return MU_ERR_FAILURE;
+	}
+      mu_mailbox_set_locker (mbox, lock);
+    }
+
+  if ((status = mu_mailbox_open (mbox, flags)) != 0)
+    {
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_open", urlstr, status);
+      return MU_ERR_FAILURE;
+    }
+  return manlock_lock (mbox);
+}
+
+int
+manlock_open_mailbox (mu_mailbox_t *pmbox, const char *mailbox_name, int def,
+		      int flags)
+{
+  mu_mailbox_t mbox;
+  int status;
+
+  status = (def ? mu_mailbox_create_default : mu_mailbox_create)
+               (&mbox, mailbox_name);
+  if (status)
+    {
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_create", mailbox_name,
+		       status);
+      return 1;
+    }
+
+  status = mailbox_open_and_lock (mbox, flags);
+  
+  if (status == 0)
+    *pmbox = mbox;
+  else
+    mu_mailbox_destroy (&mbox);
+  
+  return status;
+}
+
+
+struct mu_cfg_param manlock_param[] = {
+  { "enable", mu_cfg_bool, &manlock_mandatory_locking, 0, NULL,
+    N_("Enable mandatory locking.") },
+  { "lock-directory", mu_cfg_string, &manlock_lock_dir, 0, NULL,
+    N_("Set directory for mandatory lock files.") },
+  { NULL }
+};
+
+void
+manlock_cfg_init ()
+{
+  struct mu_cfg_section *section;
+  mu_create_canned_section ("mandatory-locking", &section);
+  mu_cfg_section_add_params (section, manlock_param);
+}
+
+
+
+  
+
+int
+manlock_lock (mu_mailbox_t mbox)
+{
+  mu_url_t url = NULL;
+  mu_locker_t lock = NULL;
+  const char *name;
+  int status;
+
+  if (!manlock_mandatory_locking)
+    return 0;
+  mu_mailbox_get_url (mbox, &url);
+  name = mu_url_to_string (url);
+  mu_mailbox_get_locker (mbox, &lock);  
+  mu_locker_mod_flags (lock, MU_LOCKER_PID, mu_locker_set_bit);
+  if ((status = mu_locker_lock (lock)))
+    {
+      mu_diag_output (MU_DIAG_NOTICE, _("locking mailbox `%s' failed: %s"),
+	      name ? name : "?", mu_strerror(status));
+      return status;
+    }
+  return 0;
+}
+
+int
+manlock_touchlock (mu_mailbox_t mbox)
+{
+  if (manlock_mandatory_locking)
+    {
+      mu_locker_t lock = NULL;
+      mu_mailbox_get_locker (mbox, &lock);
+      mu_locker_touchlock (lock);
+    }
+  return 0;
+}
+
+int
+manlock_unlock (mu_mailbox_t mbox)
+{
+  if (manlock_mandatory_locking)
+    {
+      mu_locker_t lock = NULL;
+      mu_mailbox_get_locker (mbox, &lock);
+      mu_locker_unlock (lock);
+    }
+  return 0;
+}
diff --git a/lib/muaux.h b/lib/muaux.h
index 0520b2a..817c372 100644
--- a/lib/muaux.h
+++ b/lib/muaux.h
@@ -18,3 +18,14 @@ int mu_switch_to_privs (uid_t uid, gid_t gid, mu_list_t retain_groups);
 void mu_set_signals (RETSIGTYPE (*handler) (int signo), int *sigv, int sigc);
 const char *mu_strexit (int code);
 
+extern int manlock_mandatory_locking;
+extern char *manlock_lock_dir;
+
+int manlock_open_mailbox (mu_mailbox_t *pmbox, const char *mailbox_name,
+			  int def, int flags);
+int manlock_lock (mu_mailbox_t mbox);
+int manlock_touchlock (mu_mailbox_t mbox);
+int manlock_unlock (mu_mailbox_t mbox);
+
+void manlock_cfg_init (void);
+
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c
index 335ccd2..f73f740 100644
--- a/libmailutils/base/amd.c
+++ b/libmailutils/base/amd.c
@@ -1361,7 +1361,6 @@ amd_cleanup (void *arg)
 {
   mu_mailbox_t mailbox = arg;
   mu_monitor_unlock (mailbox->monitor);
-  mu_locker_unlock (mailbox->locker);
 }
 
 int
diff --git a/libmailutils/base/locker.c b/libmailutils/base/locker.c
index 85792c1..6e90327 100644
--- a/libmailutils/base/locker.c
+++ b/libmailutils/base/locker.c
@@ -453,26 +453,28 @@ mu_locker_create (mu_locker_t *plocker, const char *fname, int flags)
 	  /* Try the directory part.  If it unrolls successfully (i.e.
 	     all its components exist), tuck the filename part back in
 	     the resulting path and use it as the lock filename. */
-	  char *p, *tmp = strdup (fname);
+	  char *p, *new_name, *tmp = strdup (fname);
 	  if (!tmp)
 	    return ENOMEM;
-	  p = strchr (tmp, '/');
+	  p = strrchr (tmp, '/');
 	  if (!p)
 	    filename = tmp;
 	  else
 	    {
+	      *p = 0;
 	      err = mu_unroll_symlink (tmp, &filename);
-	      free (tmp);
 	      if (err)
-		return err;
-	      tmp = realloc (filename, strlen (filename) + strlen (p) + 1);
-	      if (!tmp)
 		{
-		  free (filename);
-		  return ENOMEM;
+		  free (tmp);
+		  return err;
 		}
-	      strcat (tmp, p);
-	      filename = tmp;
+
+	      new_name = mu_make_file_name_suf (filename, p + 1, NULL);
+	      free (tmp);
+	      free (filename);
+	      if (!new_name)
+		return ENOMEM;
+	      filename = new_name;
 	    }
 	}
       else
diff --git a/pop3d/Makefile.am b/pop3d/Makefile.am
index 555f045..7aeae8c 100644
--- a/pop3d/Makefile.am
+++ b/pop3d/Makefile.am
@@ -32,7 +32,6 @@ pop3d_SOURCES =\
  expire.c\
  extra.c\
  list.c\
- lock.c\
  logindelay.c\
  noop.c\
  pop3d.c\
diff --git a/pop3d/extra.c b/pop3d/extra.c
index c8427c9..c2d1c42 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -49,9 +49,9 @@ pop3d_abquit (int reason)
   /* Unlock spool */
   if (state != AUTHORIZATION)
     {
-      pop3d_unlock ();
       mu_mailbox_flush (mbox, 0);
       mu_mailbox_close (mbox);
+      manlock_unlock (mbox);
       mu_mailbox_destroy (&mbox);
     }
 
diff --git a/pop3d/lock.c b/pop3d/lock.c
deleted file mode 100644
index 3b9eda7..0000000
--- a/pop3d/lock.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007, 2008, 2009, 2010,
-   2011 Free Software Foundation, Inc.
-
-   GNU Mailutils is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   GNU Mailutils is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
-
-#include "pop3d.h"
-
-int
-pop3d_lock ()
-{
-  mu_url_t url = NULL;
-  mu_locker_t lock = NULL;
-  const char *name;
-  int status;
-
-  mu_mailbox_get_url (mbox, &url);
-  name = mu_url_to_string (url);
-  mu_mailbox_get_locker (mbox, &lock);
-  mu_locker_mod_flags (lock, MU_LOCKER_PID, mu_locker_set_bit);
-  if ((status = mu_locker_lock (lock)))
-    {
-      mu_diag_output (MU_DIAG_NOTICE, _("locking mailbox `%s' failed: %s"),
-	      name ? name : "?", mu_strerror(status));
-      return ERR_MBOX_LOCK;
-    }
-  return 0;
-}
-
-int
-pop3d_touchlock ()
-{
-  mu_locker_t lock = NULL;
-  mu_mailbox_get_locker (mbox, &lock);
-  mu_locker_touchlock (lock);
-  return 0;
-}
-
-int
-pop3d_unlock ()
-{
-  mu_locker_t lock = NULL;
-  mu_mailbox_get_locker (mbox, &lock);
-  mu_locker_unlock (lock);
-  return 0;
-}
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 566219e..043e2f1 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -118,6 +118,7 @@ static struct mu_cfg_param pop3d_cfg_param[] = {
 #endif
   { "output-buffer-size", mu_cfg_size, &pop3d_output_bufsize, 0, NULL,
     N_("Size of the output buffer.") },
+  { "mandatory-locking", mu_cfg_section },
   { ".server", mu_cfg_section, NULL, 0, NULL,
     N_("Server configuration.") },
   { "transcript", mu_cfg_bool, &pop3d_transcript, 0, NULL,
@@ -269,7 +270,7 @@ pop3d_mainloop (int ifd, int ofd)
 	}
 
       /* Refresh the Lock.  */
-      pop3d_touchlock ();
+      manlock_touchlock (mbox);
 
       if ((handler = pop3d_find_command (cmd)) != NULL)
 	status = handler (arg);
@@ -320,6 +321,7 @@ main (int argc, char **argv)
   mu_gocs_register ("tls", mu_tls_module_init);
 #endif /* WITH_TLS */
   mu_tcpwrapper_cfg_init ();
+  manlock_cfg_init ();
   mu_acl_cfg_init ();
   mu_m_server_cfg_init ();
   
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index 1e3692e..ea43fb5 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -220,7 +220,6 @@ void pop3d_send_payload (mu_stream_t stream, mu_stream_t linestr,
 extern void pop3d_bye           (void);
 extern int pop3d_abquit         (int);
 extern char *pop3d_apopuser     (const char *);
-extern int pop3d_lock           (void);
 extern void process_cleanup     (void);
 
 extern void pop3d_parse_command (char *cmd, char **pcmd, char **parg);
@@ -232,8 +231,6 @@ extern RETSIGTYPE pop3d_child_signal  (int);
 extern int pop3d_stls           (char *);
 extern void enable_stls (void);
 #endif /* WITH_TLS */
-extern int pop3d_touchlock      (void);
-extern int pop3d_unlock         (void);
 extern void pop3d_outf          (const char *fmt, ...) MU_PRINTFLIKE(1,2);
 
 extern void pop3d_setio         (int, int);
diff --git a/pop3d/quit.c b/pop3d/quit.c
index 0295bac..4ace6b1 100644
--- a/pop3d/quit.c
+++ b/pop3d/quit.c
@@ -34,13 +34,13 @@ pop3d_quit (char *arg)
 
   if (state == TRANSACTION)
     {
-      pop3d_unlock ();
       pop3d_fix_mark ();
 
       if (mu_mailbox_flush (mbox, 1) != 0)
 	err = ERR_FILE;
       if (mu_mailbox_close (mbox) != 0) 
 	err = ERR_FILE;
+      manlock_unlock (mbox);
       mu_mailbox_destroy (&mbox);
       mu_diag_output (MU_DIAG_INFO, _("session ended for user: %s"), username);
     }
diff --git a/pop3d/user.c b/pop3d/user.c
index 4091fa4..9983f28 100644
--- a/pop3d/user.c
+++ b/pop3d/user.c
@@ -22,7 +22,8 @@ struct mu_auth_data *auth_data;
 int
 pop3d_begin_session ()
 {
-  int status;
+  mu_url_t url = NULL;
+  size_t total = 0;
 
   mu_diag_output (MU_DIAG_INFO, _("POP3 login: user `%s', source %s"),
 		  auth_data->name, auth_data->source);
@@ -40,19 +41,9 @@ pop3d_begin_session ()
   if (auth_data->change_uid)
     setuid (auth_data->uid);
   
-  if ((status = mu_mailbox_create (&mbox, auth_data->mailbox)) != 0
-      || (status = mu_mailbox_open (mbox, MU_STREAM_CREAT | MU_STREAM_RDWR)) != 0)
+  if (manlock_open_mailbox (&mbox, auth_data->mailbox, 0,
+			    MU_STREAM_CREAT | MU_STREAM_RDWR))
     {
-      mu_mailbox_destroy (&mbox);
-      state = AUTHORIZATION;
-      mu_auth_data_destroy (&auth_data);
-      return ERR_MBOX_LOCK;
-    }
-  
-  if (pop3d_lock ())
-    {
-      mu_mailbox_close (mbox);
-      mu_mailbox_destroy (&mbox); 
       mu_auth_data_destroy (&auth_data);
       state = AUTHORIZATION;
       return ERR_MBOX_LOCK;
@@ -70,18 +61,14 @@ pop3d_begin_session ()
 
   deliver_pending_bulletins ();
   
-  /* mailbox name */
-  {
-    mu_url_t url = NULL;
-    size_t total = 0;
-    mu_mailbox_get_url (mbox, &url);
-    mu_mailbox_messages_count (mbox, &total);
-    mu_diag_output (MU_DIAG_INFO,
+  /* log mailbox stats */
+  mu_mailbox_get_url (mbox, &url);
+  mu_mailbox_messages_count (mbox, &total);
+  mu_diag_output (MU_DIAG_INFO,
 	    ngettext ("user `%s' logged in with mailbox `%s' (%s message)",
 		      "user `%s' logged in with mailbox `%s' (%s messages)",
 		      (unsigned long) total),
 	    username, mu_url_to_string (url), mu_umaxtostr (0, total));
-  }
 
   return OK;
 }


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Thu Jul 14 05:19:11 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1QhI4d-0004fo-4V
	for mharc-commit-mailutils@gnu.org; Thu, 14 Jul 2011 05:19:11 -0400
Received: from eggs.gnu.org ([140.186.70.92]:53503)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhI4V-0004e5-EK
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 05:19:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhI4P-0007xQ-RG
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 05:19:03 -0400
Received: from colonialone.fsf.org ([140.186.70.51]:46318)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhI4P-0007xM-Li
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 05:18:57 -0400
Received: from [10.1.0.108] (helo=vcs-noshell.in.savannah.gnu.org)
	by colonialone.fsf.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhI4P-0004iG-DL
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 09:18:57 +0000
Received: from gray by vcs-noshell.in.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1QhI4O-0001Lw-Jl
	for commit-mailutils@gnu.org; Thu, 14 Jul 2011 09:18:57 +0000
Date: Thu, 14 Jul 2011 09:18:56 +0000
Message-Id: <E1QhI4O-0001Lw-Jl@vcs-noshell.in.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-375-g62b637f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b
X-Git-Newrev: 62b637f209e02ffdc4c69384fe24eece83e57024
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.51
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Jul 2011 09:19:09 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=62b637f209e02ffdc4c69384fe24eece83e57024

The branch, master has been updated
       via  62b637f209e02ffdc4c69384fe24eece83e57024 (commit)
      from  d0769b4ffcfab56d74f68890c14bc5cfff3b3d3b (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 -----------------------------------------------------------------
commit 62b637f209e02ffdc4c69384fe24eece83e57024
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jul 14 12:06:52 2011 +0300

    Version 2.99.92
    
    * NEWS: Update.
    * configure.ac: Update.
    * po/POTFILES.in: Update.

-----------------------------------------------------------------------

Summary of changes:
 NEWS           |    4 ++--
 configure.ac   |    2 +-
 po/POTFILES.in |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index cb48dc0..8709a7e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2011-06-08
+GNU mailutils NEWS -- history of user-visible changes. 2011-07-14
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 Free Software Foundation, Inc.
 See the end of file for copying conditions.
@@ -6,7 +6,7 @@ See the end of file for copying conditions.
 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
 
 
-Version 2.99.91 (Git)
+Version 2.99.92 (Git)
 
 This version is highly experimental.  It features a rewrite from
 scratch of the stream subsystem and other vital parts of the
diff --git a/configure.ac b/configure.ac
index 59a99af..18ea434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@ dnl You should have received a copy of the GNU General Public License along
 dnl with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.63)
-AC_INIT([GNU Mailutils], [2.99.91], [bug-mailutils@gnu.org], [mailutils])
+AC_INIT([GNU Mailutils], [2.99.92], [bug-mailutils@gnu.org], [mailutils])
 AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 dist-xz std-options silent-rules])
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7f44a7e..96a73c6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -32,6 +32,7 @@ lib/mailcap.c
 lib/tcpwrap.c
 lib/xmalloc.c
 lib/strexit.c
+lib/manlock.c
 
 libmu_argp/cmdline.c
 libmu_argp/common.c
@@ -197,7 +198,6 @@ movemail/movemail.c
 pop3d/apop.c
 pop3d/bulletin.c
 pop3d/extra.c
-pop3d/lock.c
 pop3d/logindelay.c
 pop3d/pop3d.c
 pop3d/popauth.c


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Wed Jul 27 13:46:53 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Qm8C5-0002rf-FQ
	for mharc-commit-mailutils@gnu.org; Wed, 27 Jul 2011 13:46:53 -0400
Received: from eggs.gnu.org ([140.186.70.92]:39655)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Qm8C3-0002rD-Fc
	for commit-mailutils@gnu.org; Wed, 27 Jul 2011 13:46:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Qm8C1-0001id-HP
	for commit-mailutils@gnu.org; Wed, 27 Jul 2011 13:46:51 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:43272)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Qm8C1-0001iY-DU
	for commit-mailutils@gnu.org; Wed, 27 Jul 2011 13:46:49 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Qm8C0-0007OR-V3
	for commit-mailutils@gnu.org; Wed, 27 Jul 2011 17:46:49 +0000
Date: Wed, 27 Jul 2011 17:46:49 +0000
Message-Id: <E1Qm8C0-0007OR-V3@vcs.savannah.gnu.org>
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
Subject: [SCM] GNU Mailutils branch, master, updated. release-2.2-378-g6060ab1
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 608036eaae1d53d8add125c964b23b9ec047b76c
X-Git-Newrev: 6060ab1110b1a1c27c1f88e22581a50b3930bf4b
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 27 Jul 2011 17:46:52 -0000

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 "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=6060ab1110b1a1c27c1f88e22581a50b3930bf4b

The branch, master has been updated
       via  6060ab1110b1a1c27c1f88e22581a50b3930bf4b (commit)
      from  608036eaae1d53d8add125c964b23b9ec047b76c (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 -----------------------------------------------------------------
commit 6060ab1110b1a1c27c1f88e22581a50b3930bf4b
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Wed Jul 27 20:51:22 2011 +0300

    Fake commit to test whether git mail notification works.

-----------------------------------------------------------------------

Summary of changes:
 NEWS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 8709a7e..aa31dd9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2011-07-14
+GNU mailutils NEWS -- history of user-visible changes. 2011-07-27
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 Free Software Foundation, Inc.
 See the end of file for copying conditions.


hooks/post-receive
-- 
GNU Mailutils


