From MAILER-DAEMON Fri Jun 01 05:45:36 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SaOQK-0004lg-Eg
	for mharc-commit-mailutils@gnu.org; Fri, 01 Jun 2012 05:45:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33619)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SaOQB-0004lF-TI
	for commit-mailutils@gnu.org; Fri, 01 Jun 2012 05:45:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SaOQ3-00040W-Vk
	for commit-mailutils@gnu.org; Fri, 01 Jun 2012 05:45:27 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37575)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SaOQ3-00040R-RB
	for commit-mailutils@gnu.org; Fri, 01 Jun 2012 05:45:19 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SaOQ3-0005Zn-A2
	for commit-mailutils@gnu.org; Fri, 01 Jun 2012 09:45:19 +0000
Date: Fri, 01 Jun 2012 09:45:19 +0000
Message-Id: <E1SaOQ3-0005Zn-A2@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-602-gc84e1f2
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e02df56cb384465b3238c46c6f214f27ee8431ab
X-Git-Newrev: c84e1f2193b205d399ec89da3bf27a2aa60d4fbb
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: Fri, 01 Jun 2012 09:45:35 -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=c84e1f2193b205d399ec89da3bf27a2aa60d4fbb

The branch, master has been updated
       via  c84e1f2193b205d399ec89da3bf27a2aa60d4fbb (commit)
       via  f7a95e5e5b6361e5ee18f39168ecf55199092694 (commit)
       via  6f86192fc47001aa505d348ef5be88924e3002ca (commit)
       via  5bce3efcd164e4c8dae1a7bcf892dd9da419eacd (commit)
      from  e02df56cb384465b3238c46c6f214f27ee8431ab (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 c84e1f2193b205d399ec89da3bf27a2aa60d4fbb
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Jun 1 12:40:37 2012 +0300

    Update root ignore list.

commit f7a95e5e5b6361e5ee18f39168ecf55199092694
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Jun 1 12:10:55 2012 +0300

    Fix typos in the generated ChangeLog.
    
    * ChangeLog.amend: New file.
    * Makefile.am: Apply corrections from ChangeLog.amend when
    generating ChangeLog file.

commit 6f86192fc47001aa505d348ef5be88924e3002ca
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu May 31 17:09:05 2012 +0300

    Update ignore lists.

commit 5bce3efcd164e4c8dae1a7bcf892dd9da419eacd
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu May 31 16:52:18 2012 +0300

    inc: accept mail from multiple source mailboxes.
    
    * doc/texinfo/mu-mh.texi: Document changes to inc.
    * NEWS: Likewise.
    * mh/inc.c: Accept multiple source mailboxes.
    (input_file): Remove.
    (input_file_list): New variable.
    (opt_handler): Multiple -file options augment input_file_list.
    (incmbox): New function.
    (main): Iterate over input_file_list, incorporating mail from each
    mailbox in it.
    
    Bugfix:
    
    * libproto/imap/mbox.c (_imap_env_date): Return a 0-terminated string.
    
    Fix MH test suite.
    
    The ali-everybody tests fails on machines with user database kept
    in a non-standard storage (e.g. LDAP or NIS).  This patch attempts to
    fix it.
    
    * mh/tests/lu.c: New file.
    * mh/tests/.gitignore: Add lu.
    * mh/tests/Makefile.am (noinst_PROGRAMS): New variable.
    * mh/tests/ali.at: Use lu instead of scanning /etc/passwd directly.

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

Summary of changes:
 .gitignore                    |    2 +
 ChangeLog.amend               |   16 +++
 Makefile.am                   |    6 +-
 NEWS                          |   29 +++++-
 doc/texinfo/mu-mh.texi        |   53 ++++++++++
 libmailutils/tests/.gitignore |    2 +
 libproto/imap/mbox.c          |    7 +-
 mh/inc.c                      |  225 ++++++++++++++++++++++++++++-------------
 mh/tests/.gitignore           |    1 +
 mh/tests/Makefile.am          |    7 ++
 mh/tests/ali.at               |    2 +-
 mh/tests/lu.c                 |   31 ++++++
 testsuite/.gitignore          |    3 +
 13 files changed, 309 insertions(+), 75 deletions(-)
 create mode 100644 ChangeLog.amend
 create mode 100644 mh/tests/lu.c

diff --git a/.gitignore b/.gitignore
index a530f29..f99f881 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,7 +26,9 @@ configure
 core
 git-describe
 git-describe.h
+gnulib
 libtool
 m4
+mailutils*.tar.*
 pathdefs.h
 stamp-h1
diff --git a/ChangeLog.amend b/ChangeLog.amend
new file mode 100644
index 0000000..8c6d963
--- /dev/null
+++ b/ChangeLog.amend
@@ -0,0 +1,16 @@
+# Spelling corrections for GNU Mailutils ChangeLog
+
+e02df56cb384465b3238c46c6f214f27ee8431ab
+s/command on 64 boxes/command on 64-bit boxes/
+
+bec7b95e67fa1adcff64372ec05253ca7ed9b54e
+s/Ninor/Minor/
+
+e6ae2852edb142fcf84dc489715f8984843dfe0c
+s/ificated/indicated/
+
+f9a486e8ff07e3f35e250d366e748c7f5e712c13
+s/adresses/addresses/
+
+fb53814d3acb7a08cd849ffbbdbe86d8a374590c
+s/prever/prefer/
diff --git a/Makefile.am b/Makefile.am
index d007472..c11b316 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -129,11 +129,15 @@ DISTCLEANFILES = pathdefs.h git-describe.h
 
 gen_start_date = "2008-12-08"
 prev_change_log = "doc/ChangeLog.CVS"
+amend_file=ChangeLog.amend
 
 .PHONY: ChangeLog
 ChangeLog:
 	@if test -d .git; then                                             \
-	  cmd=$(top_srcdir)/build-aux/gitlog-to-changelog;                 \
+	  cmd="$(top_srcdir)/build-aux/gitlog-to-changelog";               \
+	  if test -n "$(amend_file)"; then                                 \
+            cmd="$$cmd --amend=$(amend_file)";                             \
+          fi;                                                              \
 	  if test -n "$(gen_start_date)"; then                             \
 	    cmd="$$cmd --since=\"$(gen_start_date)\"";                     \
 	  fi;                                                              \
diff --git a/NEWS b/NEWS
index 02291b4..1da261c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2012-04-29
+GNU mailutils NEWS -- history of user-visible changes. 2012-05-31
 Copyright (C) 2002-2012 Free Software Foundation, Inc.
 See the end of file for copying conditions.
 
@@ -126,6 +126,33 @@ input folders of type IMAP or IMAPS. A sample usage is:
 
 Note the `-truncate' option. 
 
+** MH: multiple sources
+
+The `inc' command is able to incorporate messages from several
+source mailboxes. These are specified via multiple `-file'
+options, e.g.:
+
+  inc  -truncate \
+       -file 'imaps://imap.gmail.com;moveto=archived' \
+       -file pops://mail.gnu.org \
+       -file /var/mail/root
+
+Additional parameters can be used in URLs supplied with the `-file'
+option:
+
+  moveto=FOLDER
+    Moves incorporated messages into FOLDER.  This is similar to the
+    `--moveto' option, but applies only to that particular mailbox.
+    See the example above.
+    
+  nomoveto
+    Disables the previous `--moveto' option.
+
+  truncate[=BOOL]
+    Controls source mailbox truncation.  If BOOL is not given or is
+    "yes", the mailbox will be truncated after successful processing.
+    If BOOL is "no", the source mailbox will not be truncated.
+
 ** mailutils-config is deprecated.
 
 Use `mu cflags' and `mu ldflags' instead.  The mailutils-config is
diff --git a/doc/texinfo/mu-mh.texi b/doc/texinfo/mu-mh.texi
index e16cffc..415e3e4 100644
--- a/doc/texinfo/mu-mh.texi
+++ b/doc/texinfo/mu-mh.texi
@@ -249,6 +249,59 @@ Understands @option{--build} option.
 
 This command is not provided.  Use @option{fmtcheck} instead.
 
+@item inc
+@itemize @bullet
+@item The @option{--moveto} option.
+The @option{--moveto} option instructs @command{inc} to move
+messages into another folder after incorporating them.  This option
+has effect only if the @option{--truncate} option has also been
+specified and the underlying mailbox supports the @samp{move}
+operation.  Currently only @samp{imap} and @samp{imaps} mailboxes
+support it.  For example, the following command moves incorporated
+messages into the @samp{archive} folder:
+
+@example
+inc --file imaps://imap.gmail.com --moveto=archive
+@end example
+
+The @samp{moveto} URL parameter can be used instead of this option,
+e.g.:
+
+@example
+inc --file 'imaps://imap.gmail.com;moveto=archive'
+@end example
+
+@item Multiple sources
+Mailutils @command{inc} is able to incorporate messages from several
+source mailboxes. These are specified via multiple @option{-file}
+options, e.g.:
+
+@example
+inc  -truncate \
+     -file 'imaps://imap.gmail.com;moveto=archived' \
+     -file pops://mail.gnu.org \
+     -file /var/mail/root
+@end example
+
+@item URL parameters
+The following additional parameters can be used in the mailbox
+URLs supplied with the @option{-file} option:
+
+@table @option
+@item moveto=@var{folder}
+Moves incorporated messages into another folder.  This was discussed
+above.
+
+@item nomoveto
+Disables the previous @option{--moveto} option.
+
+@item truncate[=@var{bool}]
+Controls source mailbox truncation.  If @var{bool} is not given or it is
+@samp{yes}, the mailbox will be truncated after successful processing.
+If @var{bool} is @samp{no}, the source mailbox will not be truncated.
+@end table
+@end itemize
+
 @item mhl
 
 The @samp{ignores} keyword can be used in variable list.  In that
diff --git a/libmailutils/tests/.gitignore b/libmailutils/tests/.gitignore
index dbeb39b..fe72adf 100644
--- a/libmailutils/tests/.gitignore
+++ b/libmailutils/tests/.gitignore
@@ -19,11 +19,13 @@ listop
 mailcap
 mimehdr
 modtofsaf
+msgset
 prop
 scantime
 strftime
 strin
 strout
+tempfile
 url-comp
 url-parse
 wicket
diff --git a/libproto/imap/mbox.c b/libproto/imap/mbox.c
index a7fd302..538c04b 100644
--- a/libproto/imap/mbox.c
+++ b/libproto/imap/mbox.c
@@ -269,9 +269,12 @@ _imap_env_date (mu_envelope_t env, char *buf, size_t len,
 			  statbuf);
       rc = mu_c_streamftime (str, MU_DATETIME_FROM,
 			     &imsg->env->date, &imsg->env->tz);
+      if (rc == 0)
+	rc = mu_stream_write (str, "", 1, NULL);
       mu_stream_destroy (&str);
-      if (pnwrite)
-	*pnwrite = statbuf[MU_STREAM_STAT_OUT];
+      if (rc == 0 && pnwrite)
+	/* Do not count terminating null character */
+	*pnwrite = statbuf[MU_STREAM_STAT_OUT] - 1;
     }
   return rc;
 }
diff --git a/mh/inc.c b/mh/inc.c
index 790d5cf..ca87066 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -68,7 +68,7 @@ struct mh_option mh_option[] = {
 
 static char *format_str = mh_list_format;
 static int width = 80;
-static char *input_file;
+static mu_list_t input_file_list;
 static char *audit_file; 
 static FILE *audit_fp;
 static int changecur = -1;
@@ -80,6 +80,8 @@ static const char *move_to_mailbox;
 static error_t
 opt_handler (int key, char *arg, struct argp_state *state)
 {
+  int rc;
+  
   switch (key)
     {
     case ARGP_KEY_FINI:
@@ -116,11 +118,26 @@ opt_handler (int key, char *arg, struct argp_state *state)
       break;
       
     case ARG_FILE:
-      input_file = arg;
+      if (!input_file_list)
+	{
+	  rc = mu_list_create (&input_file_list);
+	  if (rc)
+	    {
+	      mu_diag_funcall (MU_DIAG_ERROR,
+			       "mu_list_create", "&input_file_list", rc);
+	      exit (1);
+	    }
+	}
+      rc = mu_list_append (input_file_list, arg);
+      if (rc)
+	{
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_list_append", arg, rc);
+	  exit (1);
+	}
       break;
 
     case ARG_TRUNCATE:
-      truncate_source = is_true(arg);
+      truncate_source = is_true (arg);
       break;
 
     case ARG_NOTRUNCATE:
@@ -165,33 +182,42 @@ list_message (mh_format_t *format, mu_mailbox_t mbox, size_t msgno,
   free (buf);
 }
 
-int
-main (int argc, char **argv)
+struct incdat
 {
-  mu_mailbox_t input = NULL;
-  mu_mailbox_t output = NULL;
-  size_t total, n;
+  mu_mailbox_t output;
   size_t lastmsg;
-  int f_truncate = 0;
-  int f_changecur = 0;
   mh_format_t format;
-  int rc;
-
-  /* Native Language Support */
-  MU_APP_INIT_NLS ();
-
-  mh_argp_init ();
-  mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
-		 opt_handler, NULL, NULL);
-  /* Inc sets missing cur to 1 */
-  mh_mailbox_cur_default = 1;
+};
 
-  if (!quiet && mh_format_parse (format_str, &format))
+static int
+getparam (mu_url_t url, const char *param, const char **sval)
+{
+  int rc = mu_url_sget_param (url, param, sval);
+  switch (rc)
     {
-      mu_error (_("Bad format string"));
+    case 0:
+    case MU_ERR_NOENT:
+      break;
+	  
+    default:
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_url_sget_param", param, rc);
       exit (1);
     }
+  return rc;
+}
 
+static int
+incmbx (void *item, void *data)
+{
+  char *input_file = item;
+  struct incdat *dp = data;
+  mu_mailbox_t input = NULL;
+  size_t total, n;
+  int rc;
+  int f_truncate = truncate_source;
+  const char *f_move_to_mailbox = move_to_mailbox, *sval;
+  mu_url_t url;
+  
   /* Select and open input mailbox */
   if (input_file == NULL)
     {
@@ -201,8 +227,6 @@ main (int argc, char **argv)
 		    mu_strerror (rc));
 	  exit (1);
 	}
-      f_truncate = 1;
-      f_changecur = 1;
     }
   else if ((rc = mu_mailbox_create_default (&input, input_file)) != 0)
     {
@@ -210,14 +234,14 @@ main (int argc, char **argv)
 		input_file, mu_strerror (rc));
       exit (1);
     }
-
+  
   if ((rc = mu_mailbox_open (input, MU_STREAM_RDWR)) != 0)
     {
       mu_url_t url;
       mu_mailbox_get_url (input, &url);
       mu_error (_("cannot open mailbox %s: %s"),
 		mu_url_to_string (url),
-		mu_strerror (errno));
+		mu_strerror (rc));
       exit (1);
     }
 
@@ -227,24 +251,29 @@ main (int argc, char **argv)
       exit (1);
     }
 
-  output = mh_open_folder (append_folder, MU_STREAM_RDWR|MU_STREAM_CREAT);
-  if ((rc = mu_mailbox_messages_count (output, &lastmsg)) != 0)
+  if ((rc = mu_mailbox_get_url (input, &url)) != 0)
     {
-      mu_error (_("cannot read output mailbox: %s"),
-		mu_strerror (errno));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_get_url", input_file, rc);
       exit (1);
     }
-  
-  /* Fixup options */
-  if (truncate_source == -1)
-    truncate_source = f_truncate;
-  if (changecur == -1)
-    changecur = f_changecur;
 
+  if (getparam (url, "truncate", &sval) == 0)
+    {
+      if (!sval)
+	f_truncate = 1;
+      else
+	f_truncate = is_true (sval);
+    }
+  
+  if (getparam (url, "nomoveto", NULL) == 0)
+    f_move_to_mailbox = NULL;
+  else
+    getparam (url, "nomoveto", &f_move_to_mailbox);
+  
   /* Open audit file, if specified */
   if (audit_file)
     audit_fp = mh_audit_open (audit_file, input);
-  
+
   for (n = 1; n <= total; n++)
     {
       mu_message_t imsg;
@@ -256,27 +285,28 @@ main (int argc, char **argv)
 	  continue;
 	}
 
-      if ((rc = mu_mailbox_append_message (output, imsg)) != 0)
+      if ((rc = mu_mailbox_append_message (dp->output, imsg)) != 0)
 	{
 	  mu_error (_("%lu: error appending message: %s"),
 		    (unsigned long) n, mu_strerror (rc));
 	  continue;
 	}
-
+      
       if (n == 1 && changecur)
 	{
 	  mu_message_t msg = NULL;
 	  size_t cur;
 	  
-	  mu_mailbox_get_message (output, lastmsg + 1, &msg);
+	  mu_mailbox_get_message (dp->output, dp->lastmsg + 1, &msg);
 	  mh_message_number (msg, &cur);
-	  mh_mailbox_set_cur (output, cur);
+	  mh_mailbox_set_cur (dp->output, cur);
 	}
-	  
+
+      ++dp->lastmsg;
       if (!quiet)
-	list_message (&format, output, lastmsg + n, width);
+	list_message (&dp->format, dp->output, dp->lastmsg, width);
       
-      if (truncate_source)
+      if (f_truncate)
 	{
 	  mu_attribute_t attr;
 	  mu_message_get_attribute (imsg, &attr);
@@ -284,50 +314,105 @@ main (int argc, char **argv)
 	}
     }
 
-  if (truncate_source && move_to_mailbox)
+  if (total && f_truncate)
     {
-      mu_msgset_t msgset;
-      
-      rc = mu_msgset_create (&msgset, input, MU_MSGSET_NUM);
-      if (rc)
-	mu_diag_funcall (MU_DIAG_ERROR, "mu_msgset_create", NULL, rc);
-      else
+      if (f_move_to_mailbox)
 	{
-	  rc = mu_msgset_add_range (msgset, 1, total, MU_MSGSET_NUM);
+	  mu_msgset_t msgset;
+      
+	  rc = mu_msgset_create (&msgset, input, MU_MSGSET_NUM);
 	  if (rc)
-	    mu_diag_funcall (MU_DIAG_ERROR, "mu_msgset_add_range", NULL, rc);
+	    mu_diag_funcall (MU_DIAG_ERROR, "mu_msgset_create", NULL, rc);
 	  else
 	    {
-	      rc = mu_mailbox_msgset_copy (input, msgset, move_to_mailbox,
-					   MU_MAILBOX_COPY_CREAT);
+	      rc = mu_msgset_add_range (msgset, 1, total, MU_MSGSET_NUM);
 	      if (rc)
+		mu_diag_funcall (MU_DIAG_ERROR, "mu_msgset_add_range",
+				 NULL, rc);
+	      else
 		{
-		  mu_error (_("failed to move messages to %s: %s"),
-			    move_to_mailbox, mu_strerror (rc));
-		  truncate_source = 0;
+		  rc = mu_mailbox_msgset_copy (input, msgset, move_to_mailbox,
+					       MU_MAILBOX_COPY_CREAT);
+		  if (rc)
+		    {
+		      mu_error (_("failed to move messages to %s: %s"),
+				move_to_mailbox, mu_strerror (rc));
+		      f_truncate = 0;
+		    }
 		}
+	      mu_msgset_destroy (&msgset);
 	    }
-	  mu_msgset_destroy (&msgset);
 	}
+      mu_mailbox_expunge (input);
     }
   
-  if (!changecur)
+  if (audit_fp)
     {
-      mu_property_t prop = mh_mailbox_get_property (output);
-      mu_property_invalidate (prop);
+      mh_audit_close (audit_fp);
+      audit_fp = NULL;
     }
-  mh_global_save_state ();
   
-  mu_mailbox_close (output);
-  mu_mailbox_destroy (&output);
-
-  if (truncate_source)
-    mu_mailbox_expunge (input);
   mu_mailbox_close (input);
   mu_mailbox_destroy (&input);
 
-  if (audit_fp)
-    mh_audit_close (audit_fp);
+  return 0;
+}
+
+int
+main (int argc, char **argv)
+{
+  struct incdat incdat;
+  int rc;
+  int f_truncate = 0;
+  int f_changecur = 0;
+
+  /* Native Language Support */
+  MU_APP_INIT_NLS ();
+
+  mh_argp_init ();
+  mh_argp_parse (&argc, &argv, 0, options, mh_option, args_doc, doc,
+		 opt_handler, NULL, NULL);
+  /* Inc sets missing cur to 1 */
+  mh_mailbox_cur_default = 1;
+
+  memset (&incdat, 0, sizeof (incdat));
+  if (!quiet && mh_format_parse (format_str, &incdat.format))
+    {
+      mu_error (_("Bad format string"));
+      exit (1);
+    }
+
+  incdat.output = mh_open_folder (append_folder,
+				  MU_STREAM_RDWR|MU_STREAM_CREAT);
+  if ((rc = mu_mailbox_messages_count (incdat.output, &incdat.lastmsg)) != 0)
+    {
+      mu_error (_("cannot read output mailbox: %s"),
+		mu_strerror (errno));
+      exit (1);
+    }
+  
+  /* Fixup options */
+  if (!input_file_list)
+    f_truncate = f_changecur = 1;
+  if (truncate_source == -1)
+    truncate_source = f_truncate;
+  if (changecur == -1)
+    changecur = f_changecur;
+
+  if (!input_file_list)
+    incmbx (NULL, &incdat);
+  else
+    mu_list_foreach (input_file_list, incmbx, &incdat);
+    
+  if (!changecur)
+    {
+      mu_property_t prop = mh_mailbox_get_property (incdat.output);
+      mu_property_invalidate (prop);
+    }
+  mh_global_save_state ();
+  
+  mu_mailbox_close (incdat.output);
+  mu_mailbox_destroy (&incdat.output);
   
   return 0;
 }
diff --git a/mh/tests/.gitignore b/mh/tests/.gitignore
index 33e4e9a..cea5b74 100644
--- a/mh/tests/.gitignore
+++ b/mh/tests/.gitignore
@@ -1,5 +1,6 @@
 atconfig
 atlocal
+lu
 package.m4
 status.mf
 testsuite
diff --git a/mh/tests/Makefile.am b/mh/tests/Makefile.am
index c2e991e..227adbf 100644
--- a/mh/tests/Makefile.am
+++ b/mh/tests/Makefile.am
@@ -34,6 +34,13 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 
 #
 
+## -------------------------- ##
+## Non-installable programs   ##
+## -------------------------- ##
+
+INCLUDES = @MU_LIB_COMMON_INCLUDES@
+noinst_PROGRAMS = lu
+
 ## ------------ ##
 ## Test suite.  ##
 ## ------------ ##
diff --git a/mh/tests/ali.at b/mh/tests/ali.at
index 487a680..98cd477 100644
--- a/mh/tests/ali.at
+++ b/mh/tests/ali.at
@@ -98,7 +98,7 @@ ali -list -a ./mh_aliases korzen
 [expout])
 
 MH_CHECK([ali: everybody],[ali06 ali-everybody],[
-cat /etc/passwd | awk -F : '/^#/ { next } $3>200 { print $1 }' > expout
+lu 200 > expout
 test -s expout || AT_SKIP_TEST
 AT_DATA([mh_aliases],[
 everybody: *
diff --git a/mh/tests/lu.c b/mh/tests/lu.c
new file mode 100644
index 0000000..c438f9d
--- /dev/null
+++ b/mh/tests/lu.c
@@ -0,0 +1,31 @@
+/* This file is part of GNU Mailutils test suite.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+
+   This file is free software; as a special exception the author gives
+   unlimited permission to copy and/or distribute it, with or without
+   modifications.
+
+   This file is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/  
+#include <sys/types.h>
+#include <pwd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* List all user names.  With a single numeric argument, list users with UID
+   greater than that argument. */
+int
+main (int argc, char **argv)
+{
+	struct passwd *pw;
+	int minuid = 0;
+	
+	if (argc == 2)
+		minuid = atoi (argv[1]);
+	while ((pw = getpwent ()))
+		if (pw->pw_uid > minuid)
+			printf ("%s\n", pw->pw_name);
+	return 0;
+}
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index 29a9221..60475e8 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -1,11 +1,14 @@
 atconfig
 atlocal
+bs
 fldel
+lstuid
 package.m4
 testsuite
 testsuite.dir
 testsuite.log
 mbdel
 mimetest
+msgset
 smtpsend
 ufms


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Mon Jun 04 11:50:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SbZYZ-0001u4-6D
	for mharc-commit-mailutils@gnu.org; Mon, 04 Jun 2012 11:50:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:46397)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SbZYP-0001te-QB
	for commit-mailutils@gnu.org; Mon, 04 Jun 2012 11:50:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SbZYJ-0001Ld-5f
	for commit-mailutils@gnu.org; Mon, 04 Jun 2012 11:50:49 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51627)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SbZYI-0001Km-T2
	for commit-mailutils@gnu.org; Mon, 04 Jun 2012 11:50:43 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SbZYF-0002lY-B0
	for commit-mailutils@gnu.org; Mon, 04 Jun 2012 15:50:40 +0000
Date: Mon, 04 Jun 2012 15:50:40 +0000
Message-Id: <E1SbZYF-0002lY-B0@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-604-g24333ac
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c84e1f2193b205d399ec89da3bf27a2aa60d4fbb
X-Git-Newrev: 24333ac926f4412737d618dbff6d3ca0c70809ec
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: Mon, 04 Jun 2012 15:50:56 -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=24333ac926f4412737d618dbff6d3ca0c70809ec

The branch, master has been updated
       via  24333ac926f4412737d618dbff6d3ca0c70809ec (commit)
       via  7dd1756826cdabb704b705da0fe2bcc83141caf6 (commit)
      from  c84e1f2193b205d399ec89da3bf27a2aa60d4fbb (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 24333ac926f4412737d618dbff6d3ca0c70809ec
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Mon Jun 4 18:27:24 2012 +0300

    Don't use disabled features in mailutils.scm
    
    * libmu_scm/mailutils/Makefile.am (DISTCLEANFILES): Rename to
    CLEANFILES: mailutils.scm should be cleaned as a usual object file.
    (MU_FEATURES): New variable, constructed depending on MU_COND_
    variables.
    (mailutils.scm goal): Use the value of MU_FEATURES as m4 command
    line.
    * libmu_scm/mailutils/mailutils.scm.in: Include only supported libraries.

commit 7dd1756826cdabb704b705da0fe2bcc83141caf6
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Mon Jun 4 18:26:46 2012 +0300

    Bugfix
    
    * libmailutils/base/symlink.c (mu_readlink): Fix initialization of size.

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

Summary of changes:
 libmailutils/base/symlink.c          |    2 +-
 libmu_scm/mailutils/Makefile.am      |   33 ++++++++++++++++++++++++++++-----
 libmu_scm/mailutils/mailutils.scm.in |   12 ++++++++----
 3 files changed, 37 insertions(+), 10 deletions(-)

diff --git a/libmailutils/base/symlink.c b/libmailutils/base/symlink.c
index 5b85821..ee5cba1 100644
--- a/libmailutils/base/symlink.c
+++ b/libmailutils/base/symlink.c
@@ -37,7 +37,7 @@ mu_readlink (const char *name, char **pbuf, size_t *psize, size_t *plen)
 {
   size_t status = 0;
   char *buf = *pbuf;
-  size_t size = *plen;
+  size_t size = *psize;
   ssize_t linklen;
 
   while (1)
diff --git a/libmu_scm/mailutils/Makefile.am b/libmu_scm/mailutils/Makefile.am
index 6fa617c..5eacd2d 100644
--- a/libmu_scm/mailutils/Makefile.am
+++ b/libmu_scm/mailutils/Makefile.am
@@ -17,15 +17,38 @@
 
 EXTRA_DIST=mailutils.scm.in
 
-DISTCLEANFILES=\
+CLEANFILES=\
  mailutils.scm
 
 sitedir   = @GUILE_SITE@/$(PACKAGE)
 site_DATA = mailutils.scm
 
+MU_FEATURES=\
+ -DVERSION=$(VERSION)\
+ -DLIBDIR=$(libdir)\
+ -DSITEDIR=$(sitedir)\
+ -DBUILDDIR=$(top_builddir)/libmu_scm
+
+if MU_COND_SUPPORT_POP
+  MU_FEATURES += -DMU_SUPPORT_POP
+endif
+
+if MU_COND_SUPPORT_IMAP
+  MU_FEATURES += -DMU_SUPPORT_IMAP
+endif
+
+if MU_COND_SUPPORT_NNTP
+  MU_FEATURES += -DMU_SUPPORT_NNTP
+endif
+
+if MU_COND_SUPPORT_MH
+  MU_FEATURES += -DMU_SUPPORT_MH
+endif
+
+if MU_COND_SUPPORT_MAILDIR
+  MU_FEATURES += -DMU_SUPPORT_MAILDIR
+endif
+
 mailutils.scm: mailutils.scm.in
-	$(AM_V_GEN)m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
-	   -DSITEDIR=$(sitedir) \
-           -DBUILDDIR=$(top_builddir)/libmu_scm \
-            $(srcdir)/mailutils.scm.in > $@
+	$(AM_V_GEN)m4 $(MU_FEATURES) $(srcdir)/mailutils.scm.in > $@
 
diff --git a/libmu_scm/mailutils/mailutils.scm.in b/libmu_scm/mailutils/mailutils.scm.in
index c4187d3..7c91d13 100644
--- a/libmu_scm/mailutils/mailutils.scm.in
+++ b/libmu_scm/mailutils/mailutils.scm.in
@@ -27,10 +27,14 @@ changequote([,])dnl
 (define mu-libs (list (cons "libmailutils"     "libmailutils")
 		      (cons "libmu_auth"       "libmu_auth")
 		      (cons "libproto/mbox"    "libmu_mbox")
-		      (cons "libproto/mh"      "libmu_mh")
-		      (cons "libproto/maildir" "libmu_maildir")
-		      (cons "libproto/pop"     "libmu_pop")
-		      (cons "libproto/imap"    "libmu_imap")))
+ifdef([MU_SUPPORT_MH],dnl
+		      [(cons "libproto/mh"      "libmu_mh")])
+ifdef([MU_SUPPORT_MAILDIR],dnl
+		      [(cons "libproto/maildir" "libmu_maildir")])
+ifdef([MU_SUPPORT_POP],dnl
+		      [(cons "libproto/pop"     "libmu_pop")])
+ifdef([MU_SUPPORT_IMAP],dnl
+		      [(cons "libproto/imap"    "libmu_imap")])))
 
 (cond
  ((getenv "MAILUTILS_SCM_LIBRARY_ROOT") =>


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Wed Jun 06 10:51:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScHZw-0006VJ-7h
	for mharc-commit-mailutils@gnu.org; Wed, 06 Jun 2012 10:51:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47500)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScHZp-0006UZ-8y
	for commit-mailutils@gnu.org; Wed, 06 Jun 2012 10:51:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScHZi-0001sa-PE
	for commit-mailutils@gnu.org; Wed, 06 Jun 2012 10:51:12 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44926)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScHZi-0001rM-MN
	for commit-mailutils@gnu.org; Wed, 06 Jun 2012 10:51:06 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScHZh-0002Tb-P6
	for commit-mailutils@gnu.org; Wed, 06 Jun 2012 14:51:05 +0000
Date: Wed, 06 Jun 2012 14:51:05 +0000
Message-Id: <E1ScHZh-0002Tb-P6@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-605-g4c2e690
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 24333ac926f4412737d618dbff6d3ca0c70809ec
X-Git-Newrev: 4c2e6902643219c600504688bb59881465cc5536
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, 06 Jun 2012 14:51:19 -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=4c2e6902643219c600504688bb59881465cc5536

The branch, master has been updated
       via  4c2e6902643219c600504688bb59881465cc5536 (commit)
      from  24333ac926f4412737d618dbff6d3ca0c70809ec (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 4c2e6902643219c600504688bb59881465cc5536
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Wed Jun 6 17:46:24 2012 +0300

    Fix comsat testsuite.
    
    * comsat/tests/atlocal.in (MH_SUPPORT)
    (MAILDIR_SUPPORT): New variables.
    * comsat/tests/testsuite.at: Disable test cases if their
    prerequisite features are not compiled in.

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

Summary of changes:
 comsat/tests/atlocal.in   |    2 ++
 comsat/tests/testsuite.at |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/comsat/tests/atlocal.in b/comsat/tests/atlocal.in
index 113b7fc..32e0ef8 100644
--- a/comsat/tests/atlocal.in
+++ b/comsat/tests/atlocal.in
@@ -3,4 +3,6 @@
 # Copyright (C) 2004, 2010-2012 Free Software Foundation, Inc.
 
 PATH=@abs_builddir@:@abs_top_builddir@/comsat:$top_srcdir:$srcdir:$PATH
+@MU_COND_SUPPORT_MH_TRUE@MH_SUPPORT=yes
+@MU_COND_SUPPORT_MAILDIR_TRUE@MAILDIR_SUPPORT=yes
   
diff --git a/comsat/tests/testsuite.at b/comsat/tests/testsuite.at
index 93000c6..d1bf15d 100644
--- a/comsat/tests/testsuite.at
+++ b/comsat/tests/testsuite.at
@@ -103,7 +103,8 @@ EOT
 chmod 600 biff.rc
 > $cwd/output
 ],
-[comsatcmd maildir:$cwd/mailbox new/1284627340.M364969P3770Q81.Trurl
+[test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
+comsatcmd maildir:$cwd/mailbox new/1284627340.M364969P3770Q81.Trurl
 sed '1s/^Mail to .*/Mail to test user/' output
 ],
 [Mail to test user
@@ -127,7 +128,8 @@ EOT
 chmod 600 biff.rc
 > $cwd/output
 ],
-[comsatcmd mh:$cwd/mailbox teaparty/58
+[test "$MH_SUPPORT" = yes || AT_SKIP_TEST
+comsatcmd mh:$cwd/mailbox teaparty/58
 sed '1s/^Mail to .*/Mail to test user/' output
 ],
 [Mail to test user


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Thu Jun 07 00:34:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ScUQ4-0002pT-ML
	for mharc-commit-mailutils@gnu.org; Thu, 07 Jun 2012 00:34:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41852)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScUQ1-0002pN-OE
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 00:33:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScUPz-0003i2-Ek
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 00:33:57 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39812)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScUPz-0003hu-BE
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 00:33:55 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1ScUPy-0001W3-HC
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 04:33:54 +0000
Date: Thu, 07 Jun 2012 04:33:54 +0000
Message-Id: <E1ScUPy-0001W3-HC@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-606-g8ef7c0a
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4c2e6902643219c600504688bb59881465cc5536
X-Git-Newrev: 8ef7c0ad473e5271fb349a69c819675e242235a2
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: Thu, 07 Jun 2012 04:33:59 -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=8ef7c0ad473e5271fb349a69c819675e242235a2

The branch, master has been updated
       via  8ef7c0ad473e5271fb349a69c819675e242235a2 (commit)
      from  4c2e6902643219c600504688bb59881465cc5536 (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 8ef7c0ad473e5271fb349a69c819675e242235a2
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jun 7 07:31:30 2012 +0300

    Implement two new Scheme functions.
    
    * NEWS: Update.
    * configure.ac: Version 2.99.97
    * libmu_scm/mu_mailbox.c (mu-mailbox-sync)
    (mu-mailbox-flush): New functions.

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

Summary of changes:
 NEWS                   |   22 ++++++++++++++++++++--
 configure.ac           |    2 +-
 libmu_scm/mu_mailbox.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 1da261c..4017176 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,11 @@
-GNU mailutils NEWS -- history of user-visible changes. 2012-05-31
+GNU mailutils NEWS -- history of user-visible changes. 2012-06-07
 Copyright (C) 2002-2012 Free Software Foundation, Inc.
 See the end of file for copying conditions.
 
 Please send mailutils bug reports to <bug-mailutils@gnu.org>.
 
 
-Version 2.99.96 (Git)
+Version 2.99.97 (Git)
 
 This version is a major rewrite of GNU Mailutils.  Quite a few parts
 of the basic framework were rewritten from scratch, while some others
@@ -254,6 +254,24 @@ See <http://mailutils.org/wiki/debug_level>.
 
 ** Configuration file support (libmu_cfg) rewritten.
 
+* New Scheme primitives
+
+** mu-mailbox-sync
+
+Synchronizes the changes done to the mailbox with its external
+storage.
+
+** mu-mailbox-expunge
+
+Similar to mu-mailbox-sync, but also permanently removes messages
+marked for deletion.
+
+** mu-mailbox-flush
+
+Marks all messages as seen, and synchronizes the changes with the
+mailbox external storage.  Depending on its second argument, removes
+messages marked for deletion.
+
 
 Version 2.2 - 2010-09-08
 
diff --git a/configure.ac b/configure.ac
index cb07ad4..ec3b416 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,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.96], [bug-mailutils@gnu.org], [mailutils])
+AC_INIT([GNU Mailutils], [2.99.97], [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/libmu_scm/mu_mailbox.c b/libmu_scm/mu_mailbox.c
index 9699b0d..5345f95 100644
--- a/libmu_scm/mu_mailbox.c
+++ b/libmu_scm/mu_mailbox.c
@@ -373,6 +373,51 @@ SCM_DEFINE_PUBLIC (scm_mu_mailbox_expunge, "mu-mailbox-expunge", 1, 0, 0,
 }
 #undef FUNC_NAME
 
+SCM_DEFINE_PUBLIC (scm_mu_mailbox_sync, "mu-mailbox-sync", 1, 0, 0,
+		   (SCM mbox), 
+"Synchronize changes to @var{mbox} with its storage.")
+#define FUNC_NAME s_scm_mu_mailbox_sync
+{
+  struct mu_mailbox *mum;
+  int status;
+    
+  SCM_ASSERT (mu_scm_is_mailbox (mbox), mbox, SCM_ARG1, FUNC_NAME);
+  mum = (struct mu_mailbox *) SCM_CDR (mbox);
+  status = mu_mailbox_sync (mum->mbox);
+  if (status)
+    mu_scm_error (FUNC_NAME, status,
+		  "Sync failed for mailbox ~A",
+		  scm_list_1 (mbox));
+  return SCM_BOOL_T;
+}
+#undef FUNC_NAME
+
+SCM_DEFINE_PUBLIC (scm_mu_mailbox_flush, "mu-mailbox-flush", 1, 1, 0,
+		   (SCM mbox, SCM expunge), 
+"Mark all messages in @var{mbox} as seen and synchronize all changes with "
+"its storage.  If @var{expunge} is @samp{#t}, expunge deleted messages "
+"as well.")
+#define FUNC_NAME s_scm_mu_mailbox_flush
+{
+  struct mu_mailbox *mum;
+  int status, do_expunge = 0;
+    
+  SCM_ASSERT (mu_scm_is_mailbox (mbox), mbox, SCM_ARG1, FUNC_NAME);
+  mum = (struct mu_mailbox *) SCM_CDR (mbox);
+  if (!SCM_UNBNDP (expunge))
+    {
+      SCM_ASSERT (scm_is_bool (expunge), expunge, SCM_ARG2, FUNC_NAME);
+      do_expunge = expunge == SCM_BOOL_T;
+    }
+  status = mu_mailbox_flush (mum->mbox, do_expunge);
+  if (status)
+    mu_scm_error (FUNC_NAME, status,
+		  "Flush failed for mailbox ~A",
+		  scm_list_1 (mbox));
+  return SCM_BOOL_T;
+}
+#undef FUNC_NAME
+
 SCM_DEFINE_PUBLIC (scm_mu_mailbox_append_message, "mu-mailbox-append-message", 2, 0, 0,
 		   (SCM mbox, SCM mesg),
 		   "Appends message @var{mesg} to the mailbox @var{mbox}.")


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Thu Jun 07 11:05:18 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SceH0-0001zH-QK
	for mharc-commit-mailutils@gnu.org; Thu, 07 Jun 2012 11:05:18 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38433)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SceGs-0001yT-J8
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 11:05:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SceGh-0006qs-W2
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 11:05:10 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:35492)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SceGh-0006qU-SG
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 11:04:59 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SceGe-000346-Uk
	for commit-mailutils@gnu.org; Thu, 07 Jun 2012 15:04:57 +0000
Date: Thu, 07 Jun 2012 15:04:57 +0000
Message-Id: <E1SceGe-000346-Uk@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-608-gd2455d5
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8ef7c0ad473e5271fb349a69c819675e242235a2
X-Git-Newrev: d2455d52c2789022e57b80584140248aedd3973e
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: Thu, 07 Jun 2012 15:05:17 -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=d2455d52c2789022e57b80584140248aedd3973e

The branch, master has been updated
       via  d2455d52c2789022e57b80584140248aedd3973e (commit)
       via  8f95e3582c89689599c7e5a0496d4f9fc2cc4e06 (commit)
      from  8ef7c0ad473e5271fb349a69c819675e242235a2 (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 d2455d52c2789022e57b80584140248aedd3973e
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jun 7 18:00:21 2012 +0300

    Minor fix.
    
    * imap4d/imap4d.c Include mailutils/gsasl.h unconditionally.

commit 8f95e3582c89689599c7e5a0496d4f9fc2cc4e06
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Jun 7 14:20:50 2012 +0300

    Fixes: port cfg statement, listen cfg statement in maidag, final dot recognition in maidag.
    
    * include/mailutils/server.h (mu_m_server_listen)
    (mu_m_server_parse_url): New protos.
    * libmailutils/server/msrv.c (add_server): Rename to
    mu_m_server_listen (now extern). All uses updated.
    (get_port): Bugfix: return port in server byte order.
    This fixes the use of the "port" configuration statement.
    * maidag/lmtp.c (cfun_data): Don't switch to full buffering.
    This makes it impossible to note the final dot in time.
    * maidag/maidag.c (cb_listen): New callback.
    (maidag_cfg_param): Attach cb_listen to the "listen" statement.

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

Summary of changes:
 imap4d/imap4d.c            |    4 +---
 include/mailutils/server.h |    5 +++++
 libmailutils/server/msrv.c |   12 ++++++------
 maidag/lmtp.c              |   19 +------------------
 maidag/maidag.c            |   15 ++++++++++++++-
 5 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 04fe4d5..d05c862 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -15,9 +15,7 @@
    along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "imap4d.h"
-#ifdef WITH_GSASL
-# include <mailutils/gsasl.h>
-#endif
+#include <mailutils/gsasl.h>
 #include "mailutils/libargp.h"
 #include "tcpwrap.h"
 
diff --git a/include/mailutils/server.h b/include/mailutils/server.h
index cd87609..dd50f95 100644
--- a/include/mailutils/server.h
+++ b/include/mailutils/server.h
@@ -119,6 +119,11 @@ void mu_m_server_set_strexit (mu_m_server_t srv, const char *(*fun) (int));
 void mu_m_server_set_app_data_size (mu_m_server_t srv, size_t size);
 int mu_m_server_set_config_size (mu_m_server_t srv, size_t size);
 
+struct mu_srv_config *mu_m_server_listen (mu_m_server_t msrv,
+					  struct mu_sockaddr *s, int type);
+int mu_m_server_parse_url (mu_m_server_t msrv, const char *arg,
+			   struct mu_sockaddr **psa);
+
 int mu_m_server_mode (mu_m_server_t srv);
 int mu_m_server_foreground (mu_m_server_t srv);
 time_t mu_m_server_timeout (mu_m_server_t srv);
diff --git a/libmailutils/server/msrv.c b/libmailutils/server/msrv.c
index a8080da..6f848f9 100644
--- a/libmailutils/server/msrv.c
+++ b/libmailutils/server/msrv.c
@@ -453,8 +453,8 @@ static int m_srv_conn (int fd, struct sockaddr *sa, int salen,
 		       void *server_data, void *call_data,
 		       mu_ip_server_t srv);
 
-static struct mu_srv_config *
-add_server (mu_m_server_t msrv, struct mu_sockaddr *s, int type)
+struct mu_srv_config *
+mu_m_server_listen (mu_m_server_t msrv, struct mu_sockaddr *s, int type)
 {
   mu_ip_server_t tcpsrv;
   struct mu_srv_config *pconf;
@@ -505,7 +505,7 @@ mu_m_server_begin (mu_m_server_t msrv)
 	  {
 	    struct mu_sockaddr *next = ta->next;
 	    ta->next = ta->prev = NULL;
-	    add_server (msrv, ta, msrv->deftype);
+	    mu_m_server_listen (msrv, ta, msrv->deftype);
 	    ta = next;
 	  }
     }
@@ -789,7 +789,7 @@ server_block_begin (const char *arg, mu_m_server_t msrv, void **pdata)
 			"only the first is used"), arg);
       mu_sockaddr_free (s->next);
     }
-  *pdata = add_server (msrv, s, msrv->deftype);
+  *pdata = mu_m_server_listen (msrv, s, msrv->deftype);
   return 0;
 }
 
@@ -858,14 +858,14 @@ get_port (const char *p)
 	      return 1;
 	    }
 	  
-	  return htons (n);
+	  return n;
 	}
       else
 	{
 	  struct servent *sp = getservbyname (p, "tcp");
 	  if (!sp)
 	    return 0;
-	  return sp->s_port;
+	  return ntohs (sp->s_port);
 	}
     }
   return 0;
diff --git a/maidag/lmtp.c b/maidag/lmtp.c
index 49b478f..9c8b9ea 100644
--- a/maidag/lmtp.c
+++ b/maidag/lmtp.c
@@ -346,8 +346,7 @@ cfun_data (mu_stream_t iostr, char *arg)
   mu_stream_t flt, tempstr;
   time_t t;
   struct tm *tm;
-  int xlev = MU_XSCRIPT_PAYLOAD, xlev_switch = 0, buf_switch = 0;
-  struct mu_buffer_query oldbuf;
+  int xlev = MU_XSCRIPT_PAYLOAD, xlev_switch = 0;
   
   if (*arg)
     {
@@ -389,19 +388,6 @@ cfun_data (mu_stream_t iostr, char *arg)
 
   lmtp_reply (iostr, "354", NULL, "Go ahead");
 
-  if (mu_stream_ioctl (iostr, MU_IOCTL_TRANSPORT_BUFFER, 
-                       MU_IOCTL_OP_GET, &oldbuf) == 0)
-    {
-      struct mu_buffer_query newbuf;
-
-      newbuf.type = MU_TRANSPORT_OUTPUT;
-      newbuf.buftype = mu_buffer_full;
-      newbuf.bufsize = 64*1024;
-      if (mu_stream_ioctl (iostr, MU_IOCTL_TRANSPORT_BUFFER, MU_IOCTL_OP_SET, 
-                           &newbuf))
-	buf_switch = 1;
-    }
-
   if (mu_stream_ioctl (iostr, MU_IOCTL_XSCRIPTSTREAM,
                        MU_IOCTL_XSCRIPTSTREAM_LEVEL, &xlev) == 0)
     xlev_switch = 1;
@@ -410,9 +396,6 @@ cfun_data (mu_stream_t iostr, char *arg)
   if (xlev_switch)
     mu_stream_ioctl (iostr, MU_IOCTL_XSCRIPTSTREAM,
                      MU_IOCTL_XSCRIPTSTREAM_LEVEL, &xlev);
-  if (buf_switch)
-    mu_stream_ioctl (iostr, MU_IOCTL_TRANSPORT_BUFFER, MU_IOCTL_OP_SET, 
-                     &oldbuf);
   if (rc)
     {
       maidag_error (_("copy error: %s"), mu_strerror (rc));
diff --git a/maidag/maidag.c b/maidag/maidag.c
index a5843a0..dc86387 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -415,6 +415,19 @@ cb_delivery_mode (void *data, mu_config_value_t *val)
   return 0;
 }
 
+static int
+cb_listen (void *data, mu_config_value_t *val)
+{
+  struct mu_sockaddr *s;
+  
+  if (mu_cfg_assert_value_type (val, MU_CFG_STRING))
+    return 1;
+  if (mu_m_server_parse_url (server, val->v.string, &s))
+    return 1;
+  mu_m_server_listen (server, s, MU_IP_TCP);
+  return 0;
+}
+
 struct mu_cfg_param maidag_cfg_param[] = {
   { "delivery-mode", mu_cfg_callback, NULL, 0, cb_delivery_mode,
     N_("Set delivery mode"),
@@ -458,7 +471,7 @@ struct mu_cfg_param maidag_cfg_param[] = {
   { "group", mu_cfg_callback, &lmtp_groups, 0, cb_group,
     N_("In LMTP mode, retain these supplementary groups."),
     N_("groups: list of string") },
-  { "listen", mu_cfg_string, &lmtp_url_string, 0, NULL,
+  { "listen", mu_cfg_callback, NULL, 0, cb_listen,
     N_("In LMTP mode, listen on the given URL.  Valid URLs are:\n"
        "   tcp://<address: string>:<port: number> (note that port is "
        "mandatory)\n"


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Sun Jun 10 09:49:13 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SdiW1-0004x8-9x
	for mharc-commit-mailutils@gnu.org; Sun, 10 Jun 2012 09:49:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38760)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SdiVx-0004wY-Lp
	for commit-mailutils@gnu.org; Sun, 10 Jun 2012 09:49:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SdiVv-00025P-4P
	for commit-mailutils@gnu.org; Sun, 10 Jun 2012 09:49:09 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46754)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SdiVv-00025A-0Z
	for commit-mailutils@gnu.org; Sun, 10 Jun 2012 09:49:07 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SdiVt-0000yT-Qt
	for commit-mailutils@gnu.org; Sun, 10 Jun 2012 13:49:06 +0000
Date: Sun, 10 Jun 2012 13:49:05 +0000
Message-Id: <E1SdiVt-0000yT-Qt@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-610-gb591335
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d2455d52c2789022e57b80584140248aedd3973e
X-Git-Newrev: b5913357069b49cbf77c1ff263460ee2e13148e9
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: Sun, 10 Jun 2012 13:49:11 -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=b5913357069b49cbf77c1ff263460ee2e13148e9

The branch, master has been updated
       via  b5913357069b49cbf77c1ff263460ee2e13148e9 (commit)
       via  844f7fed0547be2bf3643a7294160ea7ffd6cb69 (commit)
      from  d2455d52c2789022e57b80584140248aedd3973e (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 b5913357069b49cbf77c1ff263460ee2e13148e9
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Sun Jun 10 16:34:56 2012 +0300

    Fix in configuration reduction routines.
    
    * libmailutils/cfg/parser.y (mu_cfg_preorder): Accept null node
    lists.

commit 844f7fed0547be2bf3643a7294160ea7ffd6cb69
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Jun 8 21:09:57 2012 +0300

    Fix bug in mh testsuite.
    
    We cannot assume that $HOME points to existing directory.
    
    * mh/tests/testsuite.at (MH_SETUP): Override HOME environment
    variable. Use it instead of curdir.
    * mh/tests/atlocal.in (remove_curdir): Likewise.
    * mh/tests/mhn.at: Likewise.

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

Summary of changes:
 libmailutils/cfg/parser.y |    2 ++
 mh/tests/atlocal.in       |    2 +-
 mh/tests/mhn.at           |    6 +++---
 mh/tests/testsuite.at     |   11 ++++++-----
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/libmailutils/cfg/parser.y b/libmailutils/cfg/parser.y
index ac69e6d..2b93136 100644
--- a/libmailutils/cfg/parser.y
+++ b/libmailutils/cfg/parser.y
@@ -655,6 +655,8 @@ _mu_cfg_preorder_recursive (void *item, void *cbdata)
 int
 mu_cfg_preorder (mu_list_t nodelist, struct mu_cfg_iter_closure *clos)
 {
+  if (!nodelist)
+    return 0;
   return mu_list_foreach (nodelist, _mu_cfg_preorder_recursive, clos);
 }
 
diff --git a/mh/tests/atlocal.in b/mh/tests/atlocal.in
index 53b512f..282b2b8 100644
--- a/mh/tests/atlocal.in
+++ b/mh/tests/atlocal.in
@@ -4,7 +4,7 @@
 
 PATH=@abs_builddir@:@abs_top_builddir@/mh:$top_srcdir:$srcdir:$PATH
 remove_curdir() {
-	sed "s|$curdir/*||;s|  *$||" $*
+	sed "s|$HOME/*||;s|  *$||" $*
 }	
 # mimeflt [FILE]
 # Filter out all variable information from a MIME message in FILE.
diff --git a/mh/tests/mhn.at b/mh/tests/mhn.at
index 4625b39..48de9c3 100644
--- a/mh/tests/mhn.at
+++ b/mh/tests/mhn.at
@@ -176,7 +176,7 @@ cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
 MUT_MBCHMOD(Mail/inbox, 700)
 
 mkdir out
-echo "mhn-storage: $curdir/out" >> $MH
+echo "mhn-storage: $HOME/out" >> $MH
 
 mhn +inbox -store 4 | remove_curdir || echo $?
 ],
@@ -212,7 +212,7 @@ mkdir out
 cp $abs_top_srcdir/testsuite/mh/mbox1/4 Mail/inbox
 MUT_MBCHMOD(Mail/inbox, 700)
 
-echo "mhn-store-application: $curdir/out/%m%P.%s" >> $MH
+echo "mhn-store-application: $HOME/out/%m%P.%s" >> $MH
 mhn +inbox -store 4 | remove_curdir || exit $?
 ],
 [0],
@@ -262,7 +262,7 @@ echo "Current-Folder: inbox" > Mail/context
 echo "mhn-store-text: | $abs_top_srcdir/mh/tests/mhed -" >> $MH
 dnl ! Note extra quoting in the sed argument below, necessary because of
 dnl ! unbalanced parentheses.
-mhn +inbox -store -part 1 4 | sed ["s|$abs_top_srcdir/mh/tests/||;s|(cd \(.*\)\;|(cd home\;|;s|  *$||"] || exit $?
+mhn +inbox -store -part 1 4 | sed ["s|$abs_top_srcdir/mh/tests/||g;s|(cd \(.*\)\;|(cd home\;|;s|  *$||"] || exit $?
 ],
 [0],
 [-- Editor invocation: -
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index d8a90ef..4c02bc8 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -18,15 +18,16 @@ m4_include([testsuite.inc])
 
 m4_define([MH_SETUP],[
 test -d Mail || mkdir Mail
-curdir=`pwd`
-MH=$curdir/mh_profile
+HOME=`pwd`
+export HOME
+MH=$HOME/mh_profile
 export MH
 cat > $MH <<EOT
-Path: $curdir/Mail
+Path: $HOME/Mail
 mhetcdir: $abs_top_srcdir/mh/etc
 moreproc: /bin/cat
 EOT
-MTSTAILOR=$curdir/mtstailor
+MTSTAILOR=$HOME/mtstailor
 export MTSTAILOR
 exec <&-
 ])
@@ -39,7 +40,7 @@ username: mhtester
 url: sendmail://$abs_top_builddir/examples/mta
 EOT
 
-MTA_DIAG=$curdir/mta.diag
+MTA_DIAG=$HOME/mta.diag
 export MTA_DIAG
 MTA_DOMAIN=example.net
 export MTA_DOMAIN


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Mon Jun 11 17:59:30 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SeCe2-0001vt-Ff
	for mharc-commit-mailutils@gnu.org; Mon, 11 Jun 2012 17:59:30 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43087)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SeCe0-0001vn-AV
	for commit-mailutils@gnu.org; Mon, 11 Jun 2012 17:59:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SeCdy-0003bU-BR
	for commit-mailutils@gnu.org; Mon, 11 Jun 2012 17:59:27 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53040)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SeCdy-0003b6-8G
	for commit-mailutils@gnu.org; Mon, 11 Jun 2012 17:59:26 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SeCdx-0002dI-5b
	for commit-mailutils@gnu.org; Mon, 11 Jun 2012 21:59:25 +0000
Date: Mon, 11 Jun 2012 21:59:25 +0000
Message-Id: <E1SeCdx-0002dI-5b@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-611-g2cf5e6f
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b5913357069b49cbf77c1ff263460ee2e13148e9
X-Git-Newrev: 2cf5e6f54a12f20abbe75a9ece8778bb7668db53
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: Mon, 11 Jun 2012 21:59:29 -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=2cf5e6f54a12f20abbe75a9ece8778bb7668db53

The branch, master has been updated
       via  2cf5e6f54a12f20abbe75a9ece8778bb7668db53 (commit)
      from  b5913357069b49cbf77c1ff263460ee2e13148e9 (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 2cf5e6f54a12f20abbe75a9ece8778bb7668db53
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Mon Jun 11 15:20:13 2012 +0300

    Fix a typo.
    
    * imap4d/copy.c (imap4d_copy0): Invert condition.

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

Summary of changes:
 imap4d/copy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/imap4d/copy.c b/imap4d/copy.c
index cec19fe..12ad324 100644
--- a/imap4d/copy.c
+++ b/imap4d/copy.c
@@ -222,7 +222,7 @@ imap4d_copy0 (imap4d_tokbuf_t tok, int isuid, char **err_text)
   msgset_str = imap4d_tokbuf_getarg (tok, arg);
   name = imap4d_tokbuf_getarg (tok, arg + 1);
   status = mu_msgset_create (&msgset, mbox, MU_MSGSET_NUM);
-  if (!status)
+  if (status)
     {
       *err_text = "Software error";
       return RESP_BAD;


hooks/post-receive
-- 
GNU Mailutils


From MAILER-DAEMON Fri Jun 15 11:20:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SfYKZ-0006lL-FQ
	for mharc-commit-mailutils@gnu.org; Fri, 15 Jun 2012 11:20:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33123)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SfYKW-0006kG-KY
	for commit-mailutils@gnu.org; Fri, 15 Jun 2012 11:20:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SfYKQ-0008GR-AO
	for commit-mailutils@gnu.org; Fri, 15 Jun 2012 11:20:56 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50716)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SfYKQ-0008GG-70
	for commit-mailutils@gnu.org; Fri, 15 Jun 2012 11:20:50 -0400
Received: from gray by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1SfYKP-0007B9-AW
	for commit-mailutils@gnu.org; Fri, 15 Jun 2012 15:20:49 +0000
Date: Fri, 15 Jun 2012 15:20:49 +0000
Message-Id: <E1SfYKP-0007B9-AW@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-612-g9cf47fb
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2cf5e6f54a12f20abbe75a9ece8778bb7668db53
X-Git-Newrev: 9cf47fb2b45e91177459d81f40a184265033752f
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: Fri, 15 Jun 2012 15:20:58 -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=9cf47fb2b45e91177459d81f40a184265033752f

The branch, master has been updated
       via  9cf47fb2b45e91177459d81f40a184265033752f (commit)
      from  2cf5e6f54a12f20abbe75a9ece8778bb7668db53 (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 9cf47fb2b45e91177459d81f40a184265033752f
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Jun 15 18:16:41 2012 +0300

    inc: bugfix
    
    * mh/inc.c (incmbx): Fix typos.

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

Summary of changes:
 mh/inc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mh/inc.c b/mh/inc.c
index ca87066..16e1206 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -268,7 +268,7 @@ incmbx (void *item, void *data)
   if (getparam (url, "nomoveto", NULL) == 0)
     f_move_to_mailbox = NULL;
   else
-    getparam (url, "nomoveto", &f_move_to_mailbox);
+    getparam (url, "moveto", &f_move_to_mailbox);
   
   /* Open audit file, if specified */
   if (audit_file)
@@ -331,12 +331,12 @@ incmbx (void *item, void *data)
 				 NULL, rc);
 	      else
 		{
-		  rc = mu_mailbox_msgset_copy (input, msgset, move_to_mailbox,
+		  rc = mu_mailbox_msgset_copy (input, msgset, f_move_to_mailbox,
 					       MU_MAILBOX_COPY_CREAT);
 		  if (rc)
 		    {
 		      mu_error (_("failed to move messages to %s: %s"),
-				move_to_mailbox, mu_strerror (rc));
+				f_move_to_mailbox, mu_strerror (rc));
 		      f_truncate = 0;
 		    }
 		}


hooks/post-receive
-- 
GNU Mailutils


