From MAILER-DAEMON Tue Aug 04 11:21:08 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MYLp5-0007ad-Qz
	for mharc-commit-mailutils@gnu.org; Tue, 04 Aug 2009 11:21:07 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MYLp4-0007ZS-76
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 11:21:06 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MYLp3-0007Ye-GI
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 11:21:05 -0400
Received: from [199.232.76.173] (port=34428 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MYLp3-0007YX-4H
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 11:21:05 -0400
Received: from savannah.gnu.org ([199.232.41.3]:46730 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MYLp2-0005mA-SE
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 11:21:05 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MYLp2-00050C-4h
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 15:21:04 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MYLp1-0004zf-BC
	for commit-mailutils@gnu.org; Tue, 04 Aug 2009 15:21:04 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7fb746b5ac15d43e071944c1503dea43ef24d732
X-Git-Newrev: 9cd3a9ff906b510d1d1f54e013a45fc8974c9a81
Message-Id: <E1MYLp1-0004zf-BC@cvs.savannah.gnu.org>
Date: Tue, 04 Aug 2009 15:21:03 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-302-g9cd3a9f
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Aug 2009 15:21: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=9cd3a9ff906b510d1d1f54e013a45fc8974c9a81

The branch, master has been updated
       via  9cd3a9ff906b510d1d1f54e013a45fc8974c9a81 (commit)
      from  7fb746b5ac15d43e071944c1503dea43ef24d732 (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 9cd3a9ff906b510d1d1f54e013a45fc8974c9a81
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 4 18:20:53 2009 +0300

    Minor changes
    
    * NEWS: Reword some passages.
    * mail/mail.c: Fix indentation.
    * mailbox/folder.c (mu_folder_create): Return meaningful error code.

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

Summary of changes:
 NEWS             |    4 ++--
 mail/mail.c      |   17 ++++++++---------
 mailbox/folder.c |    2 +-
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index 82514b7..07bbfef 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2009-07-13
+GNU mailutils NEWS -- history of user-visible changes. 2009-08-03
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 
 2008, 2009 Free Software Foundation, Inc.
 See the end of file for copying conditions.
@@ -55,7 +55,7 @@ first recipient) is implemented.
 
 ** struct command
 
-The st[ruct] command allows to list message MIME structures, e.g.:
+The st[ruct] command lists MIME structures of the message or messages, e.g.:
 
 & struct 2
 2[1]  text/plain                 513
diff --git a/mail/mail.c b/mail/mail.c
index 0d95323..d633b03 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -330,7 +330,7 @@ main (int argc, char **argv)
   /* Register the desired formats.  */
   mu_register_all_formats ();
 
-  interactive = isatty (fileno(stdin));
+  interactive = isatty (fileno (stdin));
 #ifdef HAVE_SIGACTION
   {
     struct sigaction act;
@@ -351,11 +351,11 @@ main (int argc, char **argv)
     }
 
   /* Set up the default environment */
-  setenv ("DEAD", util_fullpath("~/dead.letter"), 0);
+  setenv ("DEAD", util_fullpath ("~/dead.letter"), 0);
   setenv ("EDITOR", "ed", 0);
   setenv ("LISTER", "ls", 0);
-  setenv ("MAILRC", util_fullpath("~/.mailrc"), 0);
-  setenv ("MBOX", util_fullpath("~/mbox"), 0);
+  setenv ("MAILRC", util_fullpath ("~/.mailrc"), 0);
+  setenv ("MBOX", util_fullpath ("~/mbox"), 0);
   setenv ("PAGER", "more", 0);
   setenv ("SHELL", "sh", 0);
   setenv ("VISUAL", "vi", 0);
@@ -363,7 +363,7 @@ main (int argc, char **argv)
   setenv ("LINES", "24", 0);
 
   /* set defaults for execution */
-  for (i = 0; i < sizeof(default_setup)/sizeof(default_setup[0]); i++)
+  for (i = 0; i < sizeof (default_setup)/sizeof (default_setup[0]); i++)
     util_do_command (default_setup[i]);
   util_do_command ("set screen=%d", util_getlines ());
   util_do_command ("set columns=%d", util_getcols ());
@@ -425,7 +425,6 @@ main (int argc, char **argv)
   /* Mode is just sending */
   if (strcmp (mode, "send") == 0)
     {
-      /* FIXME: set cmd to "mail [add1...]" */
       char *buf = NULL;
       int rc;
 
@@ -477,7 +476,7 @@ main (int argc, char **argv)
 	    return util_do_command ("from *");
 	  else if (strcmp (mode, "read"))
 	    {
-	      util_error(_("Unknown mode `%s'"), mode);
+	      util_error (_("Unknown mode `%s'"), mode);
 	      util_do_command ("quit");
 	      return 1;
 	    }
@@ -519,7 +518,7 @@ mail_mainloop (char *(*input) (void *, int),
 {
   char *command, *cmd;
 
-  while ((command = (*input)(closure, 0)) != NULL)
+  while ((command = (*input) (closure, 0)) != NULL)
     {
       int len = strlen (command);
       while (command[len-1] == '\\')
@@ -543,7 +542,7 @@ mail_mainloop (char *(*input) (void *, int),
       cmd = mu_str_stripws (command);
       util_do_command ("%s", cmd);
 #ifdef WITH_READLINE
-      if (do_history && !(mu_isspace(cmd[0]) || cmd[0] == '#'))
+      if (do_history && !(mu_isspace (cmd[0]) || cmd[0] == '#'))
 	add_history (cmd);
 #endif
       if (command)
diff --git a/mailbox/folder.c b/mailbox/folder.c
index 1247fc3..d685733 100644
--- a/mailbox/folder.c
+++ b/mailbox/folder.c
@@ -158,7 +158,7 @@ mu_folder_create (mu_folder_t *pfolder, const char *name)
     rc = mu_folder_create_from_record (pfolder, url, NULL);
   if (rc)
     mu_url_destroy (&url);
-  return 0;
+  return rc;
 }
 
 /* The folder is destroy if it is the last reference.  */


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Mon Aug 10 05:28:59 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaRBb-0000yH-Or
	for mharc-commit-mailutils@gnu.org; Mon, 10 Aug 2009 05:28:59 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaRBZ-0000yC-Tv
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 05:28:57 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaRBZ-0000y0-3I
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 05:28:57 -0400
Received: from [199.232.76.173] (port=47035 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaRBY-0000xx-QB
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 05:28:56 -0400
Received: from savannah.gnu.org ([199.232.41.3]:53309 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MaRBY-0003ru-Ii
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 05:28:56 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaRBX-0004cZ-Ty
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 09:28:55 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaRBX-0004c2-MF
	for commit-mailutils@gnu.org; Mon, 10 Aug 2009 09:28:55 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 29b6ab7a115af00e066803ab6fac400bccbcad5f
X-Git-Newrev: 6e40542e56205ebcaa607db2092076db8287292a
Message-Id: <E1MaRBX-0004c2-MF@cvs.savannah.gnu.org>
Date: Mon, 10 Aug 2009 09:28:55 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-313-g6e40542
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2009 09:28: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=6e40542e56205ebcaa607db2092076db8287292a

The branch, master has been updated
       via  6e40542e56205ebcaa607db2092076db8287292a (commit)
      from  29b6ab7a115af00e066803ab6fac400bccbcad5f (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 6e40542e56205ebcaa607db2092076db8287292a
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Mon Aug 10 12:28:36 2009 +0300

    Minor fixes.
    
    * examples/argcv.c (main): Use fgest instead of getline.
    * mail/decode.c (mime_descend): Use util_get_hdr_value
    which does not cut off the additional arguments after
    the ';'.

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

Summary of changes:
 examples/argcv.c |    7 +++----
 mail/decode.c    |    4 +++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/examples/argcv.c b/examples/argcv.c
index be37e2b..007f62f 100644
--- a/examples/argcv.c
+++ b/examples/argcv.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009 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
@@ -32,10 +32,10 @@ main(int argc, char **argv)
 {
   char *delim = "";
   char *comment = "#";
-  char *buf = NULL;
+  char buf[512];
   size_t n = 0;
   
-  while (getline (&buf, &n, stdin) > 0)
+  while (fgets (buf, sizeof buf, stdin))
     {
       int status, c;
       char **v;
@@ -57,6 +57,5 @@ main(int argc, char **argv)
 	}
       mu_argcv_free (c, v);
     } 
-  free (buf);
   exit (0);
 }
diff --git a/mail/decode.c b/mail/decode.c
index 1b951fb..5de847c 100644
--- a/mail/decode.c
+++ b/mail/decode.c
@@ -173,7 +173,9 @@ mime_descend (struct mime_descend_closure *closure,
   struct mime_descend_closure subclosure;
 
   mu_message_get_header (closure->message, &hdr);
-  util_get_content_type (hdr, &type, NULL);
+  util_get_hdr_value (hdr, MU_HEADER_CONTENT_TYPE, &type);
+  if (type == NULL)
+    type = xstrdup ("text/plain");
   get_content_encoding (hdr, &encoding);
 
   closure->type = type;


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Tue Aug 11 12:53:42 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaubW-00041R-9u
	for mharc-commit-mailutils@gnu.org; Tue, 11 Aug 2009 12:53:42 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaubT-0003xL-GZ
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 12:53:39 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaubR-0003tE-DY
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 12:53:38 -0400
Received: from [199.232.76.173] (port=35206 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaubR-0003sz-56
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 12:53:37 -0400
Received: from savannah.gnu.org ([199.232.41.3]:32987 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MaubP-0000ty-Qh
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 12:53:36 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaubP-0004Ci-2q
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 16:53:35 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaubM-0004CC-CI
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 16:53:34 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6e40542e56205ebcaa607db2092076db8287292a
X-Git-Newrev: 968b981b080a2c84445de6bd0df67b265c5fdf28
Message-Id: <E1MaubM-0004CC-CI@cvs.savannah.gnu.org>
Date: Tue, 11 Aug 2009 16:53:32 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-314-g968b981
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Aug 2009 16:53:40 -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=968b981b080a2c84445de6bd0df67b265c5fdf28

The branch, master has been updated
       via  968b981b080a2c84445de6bd0df67b265c5fdf28 (commit)
      from  6e40542e56205ebcaa607db2092076db8287292a (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 968b981b080a2c84445de6bd0df67b265c5fdf28
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 11 19:53:19 2009 +0300

    Improve command line and error handling in pop3d.
    
    * pop3d/pop3d.h: Remove unused includes.
    (ABORT): New state.
    (pop3d_command_handler_t, struct pop3d_command): New types.
    (pop3d_find_command): New function.
    (pop3d_stat,pop3d_top,pop3d_uidl,pop3d_user,pop3d_apop)
    (pop3d_auth,pop3d_capa,pop3d_dele,pop3d_list,pop3d_noop)
    (pop3d_quit,pop3d_retr,pop3d_rset): Remove const from
    the arguments. Functions are free to modify it.
    (pop3d_parse_command): New function.
    
    * pop3d/cmd.c: New file.
    * pop3d/Makefile.am: Link in cmd.o
    * pop3d/apop.c: Use pop3d_parse_command to parse commands
    * pop3d/auth.c: Likewise.
    * pop3d/extra.c (pop3d_args, pop3d_cmd): Remove.
    (pop3d_parse_command): New function.
    (pop3d_abquit): use pop3d_error_string to convert error numbers to
    messages.
    * pop3d/pop3d.c (cb_bulletin_db): Protect by #ifdef USE_DBM
    (pop3d_mainloop): Change loop condition.
    Use pop3d_parse_command to parse commands,
    pop3d_find_command to lookup handlers in the command table
    and pop3d_error_string to convert error numbers to
    messages.
    (main): Call enable_stls if necessary.
    
    * pop3d/capa.c, pop3d/dele.c, pop3d/list.c,
    pop3d/noop.c, pop3d/quit.c, pop3d/retr.c,
    pop3d/rset.c, pop3d/stat.c, pop3d/stls.c,
    pop3d/top.c, pop3d/uidl.c, pop3d/user.c: Remove const
    qualifier from the command handler argument.

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

Summary of changes:
 pop3d/Makefile.am |    1 +
 pop3d/apop.c      |   21 +++-------
 pop3d/auth.c      |    8 +--
 pop3d/capa.c      |    8 +--
 pop3d/cmd.c       |  109 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 pop3d/dele.c      |    9 ++--
 pop3d/extra.c     |   74 +++++++----------------------------
 pop3d/list.c      |   10 ++---
 pop3d/noop.c      |    8 +--
 pop3d/pop3d.c     |   93 ++++++++-------------------------------------
 pop3d/pop3d.h     |   87 ++++++++++++++---------------------------
 pop3d/quit.c      |   10 ++---
 pop3d/retr.c      |    9 ++--
 pop3d/rset.c      |    6 +--
 pop3d/stat.c      |    5 +-
 pop3d/stls.c      |   14 ++++---
 pop3d/top.c       |   14 ++----
 pop3d/uidl.c      |    9 ++--
 pop3d/user.c      |   21 ++--------
 19 files changed, 229 insertions(+), 287 deletions(-)
 create mode 100644 pop3d/cmd.c

diff --git a/pop3d/Makefile.am b/pop3d/Makefile.am
index a194658..8a3418c 100644
--- a/pop3d/Makefile.am
+++ b/pop3d/Makefile.am
@@ -30,6 +30,7 @@ pop3d_SOURCES =\
  auth.c\
  bulletin.c\
  capa.c\
+ cmd.c\
  dele.c\
  expire.c\
  extra.c\
diff --git a/pop3d/apop.c b/pop3d/apop.c
index 80dde15..51a8349 100644
--- a/pop3d/apop.c
+++ b/pop3d/apop.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007,
+   2009 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
@@ -12,9 +13,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
@@ -144,9 +143,9 @@ pop3d_apopuser (const char *user)
 }
 
 int
-pop3d_apop (const char *arg)
+pop3d_apop (char *arg)
 {
-  char *tmp, *user_digest, *user, *password;
+  char *tmp, *password, *user_digest, *user;
   char buf[POP_MAXCMDLEN];
   struct mu_md5_ctx md5context;
   unsigned char md5digest[16];
@@ -157,22 +156,18 @@ pop3d_apop (const char *arg)
   if (strlen (arg) == 0)
     return ERR_BAD_ARGS;
 
-  user = pop3d_cmd (arg);
+  pop3d_parse_command (arg, &user, &user_digest);
   if (strlen (user) > (POP_MAXCMDLEN - APOP_DIGEST))
     {
       mu_diag_output (MU_DIAG_INFO, _("User name too long: %s"), user);
-      free (user);
       return ERR_BAD_ARGS;
     }
-  user_digest = pop3d_args (arg);
 
   password = pop3d_apopuser (user);
   if (password == NULL)
     {
       mu_diag_output (MU_DIAG_INFO, _("Password for `%s' not found in the database"),
 	      user);
-      free (user);
-      free (user_digest);
       return ERR_BAD_LOGIN;
     }
 
@@ -194,14 +189,10 @@ pop3d_apop (const char *arg)
   if (strcmp (user_digest, buf))
     {
       mu_diag_output (MU_DIAG_INFO, _("APOP failed for `%s'"), user);
-      free (user);
-      free (user_digest);
       return ERR_BAD_LOGIN;
     }
 
-  free (user_digest);
   auth_data = mu_get_auth_by_name (user);
-  free (user);
   if (auth_data == NULL)
     return ERR_BAD_LOGIN;
 
diff --git a/pop3d/auth.c b/pop3d/auth.c
index fd343f8..21a8f34 100644
--- a/pop3d/auth.c
+++ b/pop3d/auth.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2009 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
@@ -12,16 +12,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* AUTH is not yet implemented */
 
 int
-pop3d_auth (const char *arg MU_ARG_UNUSED)
+pop3d_auth (char *arg MU_ARG_UNUSED)
 {
   if (state != AUTHORIZATION)
     return ERR_WRONG_STATE;
diff --git a/pop3d/capa.c b/pop3d/capa.c
index 9b96adb..e003542 100644
--- a/pop3d/capa.c
+++ b/pop3d/capa.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2001, 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2003, 2007, 2009 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
@@ -12,9 +12,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
@@ -28,7 +26,7 @@
   Capabilities available in the AUTHORIZATION state MUST be announced
   in both states.  */
 int
-pop3d_capa (const char *arg)
+pop3d_capa (char *arg)
 {
   if (strlen (arg) != 0)
     return ERR_BAD_ARGS;
diff --git a/pop3d/cmd.c b/pop3d/cmd.c
new file mode 100644
index 0000000..4243cb7
--- /dev/null
+++ b/pop3d/cmd.c
@@ -0,0 +1,109 @@
+/* GNU Mailutils -- a suite of utilities for electronic mail
+   Copyright (C) 2009 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"
+
+static struct pop3d_command command_table[] = {
+#ifdef WITH_TLS
+  { "STLS", pop3d_stls },
+# define COMMAND_TABLE_HEAD 1
+#else
+# define COMMAND_TABLE_HEAD 0
+#endif
+  { "RETR", pop3d_retr },
+  { "DELE", pop3d_dele },
+  { "USER", pop3d_user },
+  { "QUIT", pop3d_quit },
+  { "APOP", pop3d_apop },
+  { "AUTH", pop3d_auth },
+  { "STAT", pop3d_stat },
+  { "LIST", pop3d_list },
+  { "NOOP", pop3d_noop },
+  { "RSET", pop3d_rset },
+  { "TOP",  pop3d_top },
+  { "UIDL", pop3d_uidl },
+  { "CAPA", pop3d_capa },
+  { NULL }
+};
+
+static struct pop3d_command *command_table_head =
+         command_table + COMMAND_TABLE_HEAD;
+
+pop3d_command_handler_t
+pop3d_find_command (const char *name)
+{
+  struct pop3d_command *p;
+  for (p = command_table_head; p->name; p++)
+    {
+      if (mu_c_strcasecmp (name, p->name) == 0)
+	return p->handler;
+    }
+  return p->handler;
+}
+
+#ifdef WITH_TLS
+void
+enable_stls ()
+{
+  command_table_head = command_table;
+}
+#endif
+
+struct error_table
+{
+  int code;
+  const char *text;
+};
+
+static struct error_table error_table[] = {
+  { ERR_WRONG_STATE, "Incorrect state" },
+  { ERR_BAD_ARGS, "Invalid arguments" },
+  { ERR_BAD_LOGIN, "Bad login" },
+  { ERR_NO_MESG, "No such message" },
+  { ERR_MESG_DELE, "Message has been deleted" },
+  { ERR_NOT_IMPL, "Not implemented" },
+  { ERR_BAD_CMD, "Invalid command" },
+  { ERR_MBOX_LOCK, "[IN-USE] Mailbox in use" },
+  { ERR_TOO_LONG, "Argument too long" },
+  { ERR_NO_MEM, "Out of memory, quitting" },
+  { ERR_SIGNAL, "Quitting on signal" },
+  { ERR_FILE, "Some deleted messages not removed" },
+  { ERR_NO_IFILE, "No input stream" },
+  { ERR_NO_OFILE, "No output stream" },
+  { ERR_IO, "I/O error" },
+  { ERR_PROTO, "Remote protocol error" },
+  { ERR_TIMEOUT, "Session timed out" },
+  { ERR_UNKNOWN, "Unknown error" },
+  { ERR_MBOX_SYNC, "Mailbox was updated by other process" },
+#ifdef WITH_TLS
+  { ERR_TLS_ACTIVE, "Command not permitted when TLS active" },
+#endif /* WITH_TLS */
+  { ERR_TLS_IO, "TLS I/O error" },
+  { ERR_LOGIN_DELAY,
+    "[LOGIN-DELAY] Attempt to log in within the minimum login delay interval" },
+  { ERR_TERMINATE, "Terminating on request" },
+  { 0 }
+};
+
+const char *
+pop3d_error_string (int code)
+{
+  struct error_table *ep;
+  for (ep = error_table; ep->code != 0; ep++)
+    if (ep->code == code)
+      return ep->text;
+  return "unknown error";
+}
diff --git a/pop3d/dele.c b/pop3d/dele.c
index e98a560..88dd834 100644
--- a/pop3d/dele.c
+++ b/pop3d/dele.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 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
@@ -12,16 +13,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* DELE adds a message number to the list of messages to be deleted on QUIT */
 
 int
-pop3d_dele (const char *arg)
+pop3d_dele (char *arg)
 {
   size_t num;
   mu_message_t msg;
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 808ca3d..054d8c6 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -22,66 +22,22 @@
 
 static mu_stream_t istream, ostream;
 
-/* Takes a string as input and returns either the remainder of the string
-   after the first space, or a zero length string if no space */
-
-char *
-pop3d_args (const char *cmd)
+void
+pop3d_parse_command (char *cmd, char **pcmd, char **parg)
 {
-  int space = -1, i = 0, len;
-  char *buf;
-
-  len = strlen (cmd) + 1;
-  buf = malloc (len * sizeof (char));
-  if (buf == NULL)
-    pop3d_abquit (ERR_NO_MEM);
-
-  while (space < 0 && i < len)
+  char *p;
+  
+  cmd = mu_str_skip_class (cmd, MU_CTYPE_BLANK);
+  *pcmd = cmd;
+  p = mu_str_skip_class_comp (cmd, MU_CTYPE_SPACE);
+  *p++ = 0;
+  if (*p)
     {
-      if (cmd[i] == ' ')
-	space = i + 1;
-      else if (cmd[i] == '\0' || cmd[i] == '\r' || cmd[i] == '\n')
-	len = i;
-      i++;
+      *parg = p;
+      mu_rtrim_class (p, MU_CTYPE_SPACE);
     }
-
-  if (space < 0)
-    buf[0] = '\0';
   else
-    {
-      for (i = space; i < len; i++)
-	if (cmd[i] == '\0' || cmd[i] == '\r' || cmd[i] == '\n')
-	  buf[i - space] = '\0';
-	else
-	  buf[i - space] = cmd[i];
-    }
-
-  return buf;
-}
-
-/* This takes a string and returns the string up to the first space or end of
-   the string, whichever occurs first */
-
-char *
-pop3d_cmd (const char *cmd)
-{
-  char *buf;
-  int i = 0, len;
-
-  len = strlen (cmd) + 1;
-  buf = malloc (len * sizeof (char));
-  if (buf == NULL)
-    pop3d_abquit (ERR_NO_MEM);
-
-  for (i = 0; i < len; i++)
-    {
-      if (cmd[i] == ' ' || cmd[i] == '\0' || cmd[i] == '\r' || cmd[i] == '\n')
-	len = i;
-      else
-	buf[i] = cmd[i];
-    }
-  buf[i - 1] = '\0';
-  return buf;
+    *parg = "";
 }
 
 /* This is called if GNU POP3 needs to quit without going to the UPDATE stage.
@@ -105,7 +61,7 @@ pop3d_abquit (int reason)
     {
     case ERR_NO_MEM:
       code = EX_SOFTWARE;
-      pop3d_outf ("-ERR Out of memory, quitting\r\n");
+      pop3d_outf ("-ERR %s\r\n", pop3d_error_string (reason));
       mu_diag_output (MU_DIAG_ERROR, _("Out of memory"));
       break;
 
@@ -121,7 +77,7 @@ pop3d_abquit (int reason)
 
     case ERR_TIMEOUT:
       code = EX_TEMPFAIL;
-      pop3d_outf ("-ERR Session timed out\r\n");
+      pop3d_outf ("-ERR %s\r\n", pop3d_error_string (reason));
       if (state == TRANSACTION)
 	mu_diag_output (MU_DIAG_INFO, _("Session timed out for user: %s"),
 			username);
@@ -160,7 +116,7 @@ pop3d_abquit (int reason)
 
     default:
       code = EX_SOFTWARE;
-      pop3d_outf ("-ERR Quitting (reason unknown)\r\n");
+      pop3d_outf ("-ERR Quitting: %s\r\n", pop3d_error_string (reason));
       mu_diag_output (MU_DIAG_ERROR, _("Quitting (numeric reason %d)"),
 		      reason);
       break;
diff --git a/pop3d/list.c b/pop3d/list.c
index d53a795..bd20969 100644
--- a/pop3d/list.c
+++ b/pop3d/list.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005,
-   2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 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
@@ -13,16 +13,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* Displays the size of message number arg or all messages (if no arg) */
 
 int
-pop3d_list (const char *arg)
+pop3d_list (char *arg)
 {
   size_t mesgno;
   mu_message_t msg = NULL;
diff --git a/pop3d/noop.c b/pop3d/noop.c
index 1b8f2a0..daa823e 100644
--- a/pop3d/noop.c
+++ b/pop3d/noop.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2001, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2007, 2009 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
@@ -12,16 +12,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* Does nothing */
 
 int
-pop3d_noop (const char *arg)
+pop3d_noop (char *arg)
 {
   if (strlen (arg) != 0)
     return ERR_BAD_ARGS;
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 21d5609..16fa21e 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -117,6 +117,7 @@ cb_bulletin_source (mu_debug_t debug, void *data, mu_config_value_t *val)
   return 0;
 }
 
+#ifdef USE_DBM
 static int
 cb_bulletin_db (mu_debug_t debug, void *data, mu_config_value_t *val)
 {
@@ -125,6 +126,7 @@ cb_bulletin_db (mu_debug_t debug, void *data, mu_config_value_t *val)
   set_bulletin_db (val->v.string); /* FIXME: Error reporting? */
   return 0;
 }
+#endif
 
 static struct mu_cfg_param pop3d_cfg_param[] = {
   { "undelete", mu_cfg_bool, &undelete_on_startup, 0, NULL,
@@ -327,15 +329,16 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
   /* Lets boogie.  */
   pop3d_outf ("+OK POP3 Ready %s\r\n", md5shared);
 
-  while (state != UPDATE)
+  while (state != UPDATE && state != ABORT)
     {
-      char *buf, *arg, *cmd;
-
+      char *buf;
+      char *arg, *cmd;
+      pop3d_command_handler_t handler;
+      
       pop3d_flush_output ();
       status = OK;
       buf = pop3d_readline (buffer, sizeof (buffer));
-      cmd = pop3d_cmd (buf);
-      arg = pop3d_args (buf);
+      pop3d_parse_command (buf, &cmd, &arg);
 
       /* The mailbox size needs to be check to make sure that we are in
 	 sync.  Some other applications may not respect the *.lock or
@@ -361,79 +364,13 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
 	status = ERR_TOO_LONG;
       else if (strlen (cmd) > 4)
 	status = ERR_BAD_CMD;
-      else if (mu_c_strncasecmp (cmd, "RETR", 4) == 0)
-	status = pop3d_retr (arg);
-      else if (mu_c_strncasecmp (cmd, "DELE", 4) == 0)
-	status = pop3d_dele (arg);
-      else if (mu_c_strncasecmp (cmd, "USER", 4) == 0)
-	status = pop3d_user (arg);
-      else if (mu_c_strncasecmp (cmd, "QUIT", 4) == 0)
-	status = pop3d_quit (arg);
-      else if (mu_c_strncasecmp (cmd, "APOP", 4) == 0)
-	status = pop3d_apop (arg);
-      else if (mu_c_strncasecmp (cmd, "AUTH", 4) == 0)
-	status = pop3d_auth (arg);
-      else if (mu_c_strncasecmp (cmd, "STAT", 4) == 0)
-	status = pop3d_stat (arg);
-      else if (mu_c_strncasecmp (cmd, "LIST", 4) == 0)
-	status = pop3d_list (arg);
-      else if (mu_c_strncasecmp (cmd, "NOOP", 4) == 0)
-	status = pop3d_noop (arg);
-      else if (mu_c_strncasecmp (cmd, "RSET", 4) == 0)
-	status = pop3d_rset (arg);
-      else if ((mu_c_strncasecmp (cmd, "TOP", 3) == 0) && (strlen (cmd) == 3))
-	status = pop3d_top (arg);
-      else if (mu_c_strncasecmp (cmd, "UIDL", 4) == 0)
-	status = pop3d_uidl (arg);
-      else if (mu_c_strncasecmp (cmd, "CAPA", 4) == 0)
-	status = pop3d_capa (arg);
-#ifdef WITH_TLS
-      else if ((mu_c_strncasecmp (cmd, "STLS", 4) == 0) && tls_available)
-	{
-	  status = pop3d_stls (arg);
-	  if (status)
-	    {
-	      mu_diag_output (MU_DIAG_ERROR, _("Session terminated"));
-	      break;
-	    }
-	}
-#endif /* WITH_TLS */
+      else if ((handler = pop3d_find_command (cmd)) != NULL)
+	status = handler (arg);
       else
 	status = ERR_BAD_CMD;
 
-      if (status == OK)
-	; /* Everything is good.  */
-      else if (status == ERR_WRONG_STATE)
-	pop3d_outf ("-ERR " BAD_STATE "\r\n");
-      else if (status == ERR_BAD_ARGS)
-	pop3d_outf ("-ERR " BAD_ARGS "\r\n");
-      else if (status == ERR_NO_MESG)
-	pop3d_outf ("-ERR " NO_MESG "\r\n");
-      else if (status == ERR_MESG_DELE)
-	pop3d_outf ("-ERR " MESG_DELE "\r\n");
-      else if (status == ERR_NOT_IMPL)
-	pop3d_outf ("-ERR " NOT_IMPL "\r\n");
-      else if (status == ERR_BAD_CMD)
-	pop3d_outf ("-ERR " BAD_COMMAND "\r\n");
-      else if (status == ERR_BAD_LOGIN)
-	pop3d_outf ("-ERR " BAD_LOGIN "\r\n");
-      else if (status == ERR_MBOX_LOCK)
-	pop3d_outf ("-ERR [IN-USE] " MBOX_LOCK "\r\n");
-      else if (status == ERR_TOO_LONG)
-	pop3d_outf ("-ERR " TOO_LONG "\r\n");
-      else if (status == ERR_FILE)
-	pop3d_outf ("-ERR " FILE_EXP "\r\n");
-#ifdef WITH_TLS
-      else if (status == ERR_TLS_ACTIVE)
-	pop3d_outf ("-ERR " TLS_ACTIVE "\r\n");
-#endif /* WITH_TLS */
-      else if (status == ERR_LOGIN_DELAY)
-	pop3d_outf ("-ERR [LOGIN-DELAY] " LOGIN_DELAY "\r\n");
-      else
-	pop3d_outf ("-ERR unknown error\r\n");
-
-      free (cmd);
-      free (arg);
+      if (status != OK)
+	pop3d_outf ("-ERR %s\r\n", pop3d_error_string (status));
     }
 
   pop3d_bye ();
@@ -553,7 +490,11 @@ main (int argc, char **argv)
 #ifdef WITH_TLS
   tls_available = mu_check_tls_environment ();
   if (tls_available)
-    tls_available = mu_init_tls_libs ();
+    {
+      tls_available = mu_init_tls_libs ();
+      if (tls_available)
+	enable_stls ();
+    }
 #endif /* WITH_TLS */
 
   /* Actually run the daemon.  */
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index 8621270..cadbff5 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -31,44 +31,6 @@
 /* The implementation */
 #define	IMPL		"GNU POP3 Daemon"
 
-/* You can edit the messages the POP server prints out here */
-
-/* A command that doesn't exist */
-#define BAD_COMMAND	"Invalid command"
-
-/* Incorrect number of arguments passed to a command */
-#define BAD_ARGS	"Invalid arguments"
-
-/* Command issued in wrong state */
-#define BAD_STATE	"Incorrect state"
-
-/* An action on a message that doesn't exist */
-#define NO_MESG		"No such message"
-
-/* An action on a message that doesn't exist */
-#define MESG_DELE	"Message has been deleted"
-
-/* A command that is known but not implemented */
-#define NOT_IMPL	"Not implemented"
-
-/* Invalid username or password */
-#define BAD_LOGIN	"Bad login"
-
-/* User authenticated, but mailbox is locked */
-#define MBOX_LOCK	"Mailbox in use"
-
-/* The command argument was > 40 characters */
-#define TOO_LONG	"Argument too long"
-
-/* An error occured when expunging.  */
-#define FILE_EXP        "Some deleted messages not removed"
-
-/* Command not permitted when TLS active. */
-#define TLS_ACTIVE      "Command not permitted when TLS active"
-
-/* Trying to log in within the minimum login delay interval */
-#define LOGIN_DELAY     "Attempt to log in within the minimum login delay interval"
-
 /* APOP password file, without .db or .passwd, which are added based on file
    type automatically */
 #define APOP_PASSFILE_NAME "apop"
@@ -183,10 +145,11 @@ extern int expire_on_exit;
 #define POP3_ATTRIBUTE_DELE 0x0001
 #define POP3_ATTRIBUTE_RETR 0x0010
 
-#define INITIAL        -1
+#define INITIAL         -1
 #define AUTHORIZATION	0
 #define TRANSACTION	1
 #define UPDATE		2
+#define ABORT           3
 
 #define OK		0
 #define ERR_WRONG_STATE	1
@@ -214,6 +177,13 @@ extern int expire_on_exit;
 #define ERR_TERMINATE   23
 
 typedef struct mu_pop_server *mu_pop_server_t;
+typedef int (*pop3d_command_handler_t) (char *);
+
+struct pop3d_command
+{
+  const char *name;
+  pop3d_command_handler_t handler;
+};
 
 extern mu_pop_server_t pop3srv;
 extern mu_mailbox_t mbox;
@@ -234,34 +204,38 @@ extern struct mu_auth_data *auth_data;
 extern unsigned int idle_timeout;
 extern int pop3d_transcript;
 
+extern pop3d_command_handler_t pop3d_find_command (const char *name);
+
+extern int pop3d_stat           (char *);
+extern int pop3d_top            (char *);
+extern int pop3d_uidl           (char *);
+extern int pop3d_user           (char *);
+extern int pop3d_apop           (char *);
+extern int pop3d_auth           (char *);
+extern int pop3d_capa           (char *);
+extern int pop3d_dele           (char *);
+extern int pop3d_list           (char *);
+extern int pop3d_noop           (char *);
+extern int pop3d_quit           (char *);
+extern int pop3d_retr           (char *);
+extern int pop3d_rset           (char *);
+
 extern void pop3d_bye           (void);
 extern int pop3d_abquit         (int);
-extern int pop3d_apop           (const char *);
 extern char *pop3d_apopuser     (const char *);
-extern char *pop3d_args         (const char *);
-extern int pop3d_auth           (const char *);
-extern int pop3d_capa           (const char *);
-extern char *pop3d_cmd          (const char *);
-extern int pop3d_dele           (const char *);
-extern int pop3d_list           (const char *);
 extern int pop3d_lock           (void);
-extern int pop3d_noop           (const char *);
-extern int pop3d_quit           (const char *);
-extern int pop3d_retr           (const char *);
-extern int pop3d_rset           (const char *);
 extern void process_cleanup     (void);
 
+extern void pop3d_parse_command (char *cmd, char **pcmd, char **parg);
+
 extern RETSIGTYPE pop3d_master_signal  (int);
 extern RETSIGTYPE pop3d_child_signal  (int);
 
-extern int pop3d_stat           (const char *);
 #ifdef WITH_TLS
-extern int pop3d_stls           (const char *);
+extern int pop3d_stls           (char *);
+extern void enable_stls (void);
 #endif /* WITH_TLS */
-extern int pop3d_top            (const char *);
 extern int pop3d_touchlock      (void);
-extern int pop3d_uidl           (const char *);
-extern int pop3d_user           (const char *);
 extern int pop3d_unlock         (void);
 extern void pop3d_outf          (const char *fmt, ...) MU_PRINTFLIKE(1,2);
 
@@ -291,7 +265,6 @@ extern void deliver_pending_bulletins (void);
 extern void set_bulletin_db (const char *file);
 extern int set_bulletin_source (const char *source);
 extern int pop3d_begin_session (void);
-
-
+extern const char *pop3d_error_string (int code);
 
 #endif /* _POP3D_H */
diff --git a/pop3d/quit.c b/pop3d/quit.c
index b754169..4d8c5a8 100644
--- a/pop3d/quit.c
+++ b/pop3d/quit.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2005, 2007,
+   2009 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
@@ -13,9 +13,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
@@ -28,7 +26,7 @@
 static void pop3d_fix_mark ();
 
 int
-pop3d_quit (const char *arg)
+pop3d_quit (char *arg)
 {
   int err = OK;
   if (strlen (arg) != 0)
diff --git a/pop3d/retr.c b/pop3d/retr.c
index 47d83ee..2424677 100644
--- a/pop3d/retr.c
+++ b/pop3d/retr.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 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
@@ -12,16 +13,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* Prints out the specified message */
 
 int
-pop3d_retr (const char *arg)
+pop3d_retr (char *arg)
 {
   size_t mesgno, n;
   char buf[BUFFERSIZE];
diff --git a/pop3d/rset.c b/pop3d/rset.c
index dec4516..de4aeb6 100644
--- a/pop3d/rset.c
+++ b/pop3d/rset.c
@@ -12,16 +12,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* Resets the connection so that no messages are marked as deleted */
 
 int
-pop3d_rset (const char *arg)
+pop3d_rset (char *arg)
 {
   size_t i;
   size_t total = 0;
diff --git a/pop3d/stat.c b/pop3d/stat.c
index 4582d73..238bb9e 100644
--- a/pop3d/stat.c
+++ b/pop3d/stat.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 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
@@ -21,7 +22,7 @@
 /* Prints the number of messages and the total size of all messages */
 
 int
-pop3d_stat (const char *arg)
+pop3d_stat (char *arg)
 {
   size_t mesgno;
   size_t size = 0;
diff --git a/pop3d/stls.c b/pop3d/stls.c
index 20c2c66..a6d0d1e 100644
--- a/pop3d/stls.c
+++ b/pop3d/stls.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2009 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
@@ -12,9 +12,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
@@ -23,7 +21,7 @@
 #ifdef WITH_TLS
 
 int
-pop3d_stls (const char *arg)
+pop3d_stls (char *arg)
 {
   if (strlen (arg) != 0)
     return ERR_BAD_ARGS;
@@ -40,7 +38,11 @@ pop3d_stls (const char *arg)
   tls_done = pop3d_init_tls_server ();
 
   if (!tls_done)
-    return ERR_UNKNOWN;
+    {
+      mu_diag_output (MU_DIAG_ERROR, _("Session terminated"));
+      state = ABORT;
+      return ERR_UNKNOWN;
+    }
 
   state = AUTHORIZATION;  /* Confirm we're in this state. Necessary for
 			     --tls-required to work */
diff --git a/pop3d/top.c b/pop3d/top.c
index ecc2ae5..b9e305b 100644
--- a/pop3d/top.c
+++ b/pop3d/top.c
@@ -12,16 +12,14 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 /* Prints the header of a message plus a specified number of lines.  */
 
 int
-pop3d_top (const char *arg)
+pop3d_top (char *arg)
 {
   size_t mesgno;
   int lines;
@@ -41,12 +39,10 @@ pop3d_top (const char *arg)
   if (state != TRANSACTION)
     return ERR_WRONG_STATE;
 
-  mesgc = pop3d_cmd (arg);
-  linesc = pop3d_args (arg);
+  pop3d_parse_command (arg, &mesgc, &linesc);
+  
   mesgno = strtoul (mesgc, NULL, 10);
-  lines = strlen (linesc) > 0 ? strtol (linesc, NULL, 10) : -1;
-  free (mesgc);
-  free (linesc);
+  lines = *linesc ? strtol (linesc, NULL, 10) : -1;
 
   if (lines < 0)
     return ERR_BAD_ARGS;
diff --git a/pop3d/uidl.c b/pop3d/uidl.c
index 4e5d51f..7d31fdb 100644
--- a/pop3d/uidl.c
+++ b/pop3d/uidl.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 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
@@ -12,14 +13,12 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
 int
-pop3d_uidl (const char *arg)
+pop3d_uidl (char *arg)
 {
   size_t mesgno;
   char uidl[128];
diff --git a/pop3d/user.c b/pop3d/user.c
index 50a972c..ca0da51 100644
--- a/pop3d/user.c
+++ b/pop3d/user.c
@@ -13,9 +13,7 @@
    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, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-   MA 02110-1301 USA */
+   along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include "pop3d.h"
 
@@ -89,7 +87,7 @@ pop3d_begin_session ()
 }
 
 int
-pop3d_user (const char *arg)
+pop3d_user (char *arg)
 {
   char *buf, pass[POP_MAXCMDLEN], *tmp, *cmd;
   char buffer[512];
@@ -104,36 +102,27 @@ pop3d_user (const char *arg)
   pop3d_flush_output ();
 
   buf = pop3d_readline (buffer, sizeof (buffer));
-  cmd = pop3d_cmd (buf);
-  tmp = pop3d_args (buf);
+  pop3d_parse_command (buf, &cmd, &tmp);
 
   if (strlen (tmp) > POP_MAXCMDLEN)
-    {
-      free (cmd);
-      free (tmp);
-      return ERR_TOO_LONG;
-    }
+    return ERR_TOO_LONG;
   else
     {
       strncpy (pass, tmp, POP_MAXCMDLEN);
       /* strncpy () is lame, make sure the string is null terminated.  */
       pass[POP_MAXCMDLEN - 1] = '\0';
-      free (tmp);
     }
 
   if (mu_c_strcasecmp (cmd, "PASS") == 0)
     {
       int rc;
 
-      free (cmd);
-
 #ifdef _USE_APOP
       /* Check to see if they have an APOP password. If so, refuse USER/PASS */
       tmp = pop3d_apopuser (arg);
       if (tmp != NULL)
 	{
 	  mu_diag_output (MU_DIAG_INFO, _("APOP user %s tried to log in with USER"), arg);
-	  free (tmp);
 	  return ERR_BAD_LOGIN;
 	}
 #endif
@@ -159,12 +148,10 @@ pop3d_user (const char *arg)
   else if (mu_c_strcasecmp (cmd, "QUIT") == 0)
     {
       mu_diag_output (MU_DIAG_INFO, _("Possible probe of account `%s'"), arg);
-      free (cmd);
       return pop3d_quit (pass);
     }
   else
     {
-      free (cmd);
       return ERR_BAD_CMD;
     }
 


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Tue Aug 11 15:54:58 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MaxQw-0004hV-R6
	for mharc-commit-mailutils@gnu.org; Tue, 11 Aug 2009 15:54:58 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MaxQv-0004hN-RR
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 15:54:57 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MaxQv-0004h9-Bg
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 15:54:57 -0400
Received: from [199.232.76.173] (port=53216 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MaxQv-0004h6-6s
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 15:54:57 -0400
Received: from savannah.gnu.org ([199.232.41.3]:38612 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MaxQu-0006CU-Oc
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 15:54:56 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaxQu-0000Vp-6l
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 19:54:56 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MaxQt-0000V0-36
	for commit-mailutils@gnu.org; Tue, 11 Aug 2009 19:54:56 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 968b981b080a2c84445de6bd0df67b265c5fdf28
X-Git-Newrev: e4128c9e5ebdafaea274caadb87a52a7a405243d
Message-Id: <E1MaxQt-0000V0-36@cvs.savannah.gnu.org>
Date: Tue, 11 Aug 2009 19:54:55 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-315-ge4128c9
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 11 Aug 2009 19:54: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=e4128c9e5ebdafaea274caadb87a52a7a405243d

The branch, master has been updated
       via  e4128c9e5ebdafaea274caadb87a52a7a405243d (commit)
      from  968b981b080a2c84445de6bd0df67b265c5fdf28 (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 e4128c9e5ebdafaea274caadb87a52a7a405243d
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 11 22:54:35 2009 +0300

    Minor fix.
    
    * mailbox/mu_auth.c (mu_auth_runlist): Do not overwrite last
    meaningful error code by ENOSYS.

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

Summary of changes:
 mailbox/mu_auth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mailbox/mu_auth.c b/mailbox/mu_auth.c
index 1945a67..2dc237c 100644
--- a/mailbox/mu_auth.c
+++ b/mailbox/mu_auth.c
@@ -218,7 +218,9 @@ mu_auth_runlist (mu_list_t flist, struct mu_auth_data **return_data,
               status = rc;
               break;
             }
-          else if (status != EAGAIN)
+          else if (rc == ENOSYS && status != 0)
+	    /* nothing: do not overwrite last meaningful return code */;
+	  else if (status != EAGAIN)
             status = rc;
         }
 


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Wed Aug 12 09:51:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbEEt-00025J-AY
	for mharc-commit-mailutils@gnu.org; Wed, 12 Aug 2009 09:51:39 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbEEr-000244-1b
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 09:51:37 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbEEq-00023U-8O
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 09:51:36 -0400
Received: from [199.232.76.173] (port=58769 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbEEp-00023J-Nc
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 09:51:35 -0400
Received: from savannah.gnu.org ([199.232.41.3]:50799 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MbEEo-00057W-V5
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 09:51:35 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbEEo-0000YH-FE
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 13:51:34 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbEEo-0000Xl-0Z
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 13:51:34 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: e4128c9e5ebdafaea274caadb87a52a7a405243d
X-Git-Newrev: dd2131f5522681d0f9f2cf5a648bd4fa1617bb1a
Message-Id: <E1MbEEo-0000Xl-0Z@cvs.savannah.gnu.org>
Date: Wed, 12 Aug 2009 13:51:34 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-316-gdd2131f
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2009 13:51: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=dd2131f5522681d0f9f2cf5a648bd4fa1617bb1a

The branch, master has been updated
       via  dd2131f5522681d0f9f2cf5a648bd4fa1617bb1a (commit)
      from  e4128c9e5ebdafaea274caadb87a52a7a405243d (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 dd2131f5522681d0f9f2cf5a648bd4fa1617bb1a
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Wed Aug 12 16:51:23 2009 +0300

    Rewrite conditional compilation support.
    
    * Makefile.am: Conditionally add directories to SUBDIRS.
    * am/enable.m4 (MU_ENABLE_BUILD): New macro.
    * configure.ac: Require automake 1.11
    Add MU_ENABLE_BUILDs for each utility.
    Remove unused substitution variables.
    * guimb/Makefile.am: Remove substitution variables.
    * guimb/scm/Makefile.am: Likewise.
    * libmu_scm/Makefile.am: Likewise.
    * mh/Makefile.am: Likewise.
    * python/libmu_py/Makefile.am: Likewise.
    * python/mailutils/Makefile.am: Likewise.
    * README: Document --disable-build-* options.

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

Summary of changes:
 Makefile.am                  |   96 +++++++++++++++++++++++++++++++++++-------
 README                       |   33 ++++++++------
 am/enable.m4                 |   31 +++++++++++++
 configure.ac                 |   78 ++++++++++++++++++----------------
 guimb/Makefile.am            |    4 +-
 guimb/scm/Makefile.am        |    5 +-
 libmu_scm/Makefile.am        |   20 +++++----
 mh/Makefile.am               |   44 ++-----------------
 python/libmu_py/Makefile.am  |    8 +---
 python/mailutils/Makefile.am |    4 +-
 10 files changed, 194 insertions(+), 129 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f46a833..5e6492b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,70 @@
 
 ACLOCAL_AMFLAGS = -I m4 -I am
 
+if MU_COND_PYTHON
+  PYTHON_DIR = python
+endif
+
+if MU_COND_MH
+  MH_DIR = mh
+endif
+
+if MU_COND_FRM
+  FRM_DIR = frm
+endif
+
+if MU_COND_POP3D
+  POP3D_DIR = pop3d
+endif
+
+if MU_COND_IMAP4D
+  IMAP4D_DIR = imap4d
+endif
+
+if MU_COND_MAIDAG
+  MAIDAG_DIR = maidag
+endif
+
+if MU_COND_MAIL
+  MAIL_DIR = mail
+endif
+
+if MU_COND_SIEVE
+  SIEVE_DIR = sieve
+endif
+
+if MU_COND_GUIMB
+  GUIMB_DIR = guimb
+endif
+
+if MU_COND_MESSAGES
+  MESSAGES_DIR = messages
+endif
+
+if MU_COND_COMSAT
+  COMSAT_DIR = comsat
+endif
+
+if MU_COND_READMSG
+  READMSG_DIR = readmsg
+endif
+
+if MU_COND_DOTLOCK
+  DOTLOCK_DIR = dotlock
+endif
+
+if MU_COND_MOVEMAIL
+  MOVEMAIL_DIR = movemail
+endif
+
+if MU_COND_MIMEVIEW
+  MIMEVIEW_DIR = mimeview
+endif
+
+if MU_COND_LIBMU_SCM
+  LIBMU_SCM_DIR = libmu_scm
+endif
+
 SUBDIRS = \
  mu-aux\
  include\
@@ -33,26 +97,26 @@ SUBDIRS = \
  libmu_argp\
  libmu_cfg\
  libmu_cpp\
- libmu_scm\
+ $(LIBMU_SCM_DIR)\
  libmu_sieve\
- python\
+ $(PYTHON_DIR)\
  doc\
  config\
  examples\
- frm\
- pop3d\
- imap4d\
- maidag\
- mail\
- sieve\
- guimb\
- messages\
- comsat\
- readmsg\
- dotlock\
- mh\
- movemail\
- mimeview
+ $(FRM_DIR)\
+ $(POP3D_DIR)\
+ $(IMAP4D_DIR)\
+ $(MAIDAG_DIR)\
+ $(MAIL_DIR)\
+ $(SIEVE_DIR)\
+ $(GUIMB_DIR)\
+ $(MESSAGES_DIR)\
+ $(COMSAT_DIR)\
+ $(READMSG_DIR)\
+ $(DOTLOCK_DIR)\
+ $(MH_DIR)\
+ $(MOVEMAIL_DIR)\
+ $(MIMEVIEW_DIR)
 
 EXTRA_DIST = COPYING.LESSER paths
 
diff --git a/README b/README
index 2ec15c5..8c6a4a7 100644
--- a/README
+++ b/README
@@ -134,18 +134,6 @@ mailutils-specific configuration options:
 	You may have to explicitly specify LIBS and CPPFLAGS (see
 	above). 
 
-    --enable-mh-utils
-
-        Build a suite of MH utilities. The GNU implementation of MH
-        primarily aims to provide an interface between Mailutils' 
-        functionality and Emacs, using the mh-e module. 
-        For more information, refer to the TODO file in the mh
-        subdirectory, and to the section `MH' in the accompanying
-	documentation. To access it, run
-	`info -f ./doc/texinfo/mailutils.info mh' from the Mailutils
-	root directory. After installation, it will become available
-	by running `info mailutils mh'.
-
     --with-mh-bindir=DIR
 
         By default the MH binaries are installed in
@@ -308,14 +296,31 @@ features:
 
     --disable-imap        Disables IMAP protocol support. 
     --disable-pop         Disables POP protocol support. 
-    --disable-smtp        Disables support for SMTP mailer. With this
-                          option `mail.remote' is not built.
+    --disable-smtp        Disables support for SMTP mailer.
     --disable-sendmail    Disables support for `Sendmail' mailer.
     --disable-mh          Disables support for MH mailbox format.  
     --disable-virtual-domains 
                           Disables support for authentication using
                           virtual mail domains.
 
+Special options are provided that control whether each particular
+Mailutils program is built. These are:
+
+    --disable-build-frm        do not build frm
+    --disable-build-pop3d      do not build pop3d
+    --disable-build-imap4d     do not build imap4d
+    --disable-build-comsat     do not build comsat
+    --disable-build-maidag     do not build maidag
+    --disable-build-mail       do not build mail
+    --disable-build-sieve      do not build sieve
+    --disable-build-guimb      do not build guimb
+    --disable-build-messages   do not build messages
+    --disable-build-readmsg    do not build readmsg
+    --disable-build-dotlock    do not build dotlock
+    --disable-build-movemail   do not build movemail
+    --disable-build-mimeview   do not build mimeview
+    --disable-build-mh         do not build mh utilities
+
 Several environment variables affect the configuration. Currently,
 the only mailutils-specific variable is DEFAULT_CUPS_CONFDIR. It
 sets the location of CUPS (Common UNIX Printing System) configuration
diff --git a/am/enable.m4 b/am/enable.m4
index 876be0e..e6b06f4 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -46,5 +46,36 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
 	popdef([mu_cache_var])
 ])
 
+AC_DEFUN([MU_ENABLE_BUILD], [
+	pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
+	pushdef([mu_cache_var],[mu_cv_enable_build_]translit($1,[+-],[x_]))
+	pushdef([mu_cond],[MU_COND_]mu_upcase)
+
+	AC_ARG_ENABLE(build-$1, 
+	              AC_HELP_STRING([--disable-build-]$1,
+		                     [do not build ]$1),
+	              [
+	case "${enableval}" in
+		yes) mu_cache_var=yes;;
+                no)  mu_cache_var=no;;
+	        *)   AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
+        esac],
+                      [ifelse([$4],,mu_cache_var=yes,[$4])])
+
+	if test x"[$]mu_cache_var" = x"yes"; then
+		ifelse([$2],,:,[$2])
+	ifelse([$3],,,else
+               [$3])
+	fi
+	if test x"[$]mu_cache_var" = x"yes"; then
+		AC_DEFINE([MU_BUILD_]mu_upcase,1,[Define this if you build $1])
+        fi
+	AM_CONDITIONAL(mu_cond,
+	               [test x"[$]mu_cache_var" = x"yes"])
+	
+	popdef([mu_upcase])
+	popdef([mu_cache_var])
+	popdef([mu_cond])
+])
 
 
diff --git a/configure.ac b/configure.ac
index 864ae2b..619a264 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_PREREQ(2.63)
 AC_INIT([GNU Mailutils], [2.0.90], [bug-mailutils@gnu.org], [mailutils])
 AC_CONFIG_SRCDIR([mailbox/mailbox.c])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([gnits 1.8.5 dist-bzip2 std-options silent-rules])
+AM_INIT_AUTOMAKE([gnits 1.11 dist-bzip2 std-options silent-rules])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -808,14 +808,8 @@ MU_ENABLE_SUPPORT(sendmail)
 
 MU_ENABLE_SUPPORT(prog)
 
-AC_SUBST(MU_MH_PROGRAMS_BUILD)
-AC_SUBST(MU_MH_LIBRARIES_BUILD)
-AC_SUBST(MU_MH_EXEC_HOOK)
+MU_ENABLE_SUPPORT(mh)
 
-MU_ENABLE_SUPPORT(mh,
-                  [MU_MH_PROGRAMS_BUILD='$(MU_MH_PROGRAMS_LIST)';
-                   MU_MH_LIBRARIES_BUILD='$(MU_MH_LIBRARIES_LIST)';
-                   MU_MH_EXEC_HOOK=mh_finish_install])
 MU_ENABLE_SUPPORT(maildir)
 
 # FIXME: Should be --with-radius 
@@ -825,17 +819,6 @@ MU_ENABLE_SUPPORT(radius,
 				  mu_cv_enable_radius=yes],
 				 [mu_cv_enable_radius=no])]) 
 
-AC_SUBST(MH_BIN_DIR)
-
-AC_ARG_WITH([mh-bindir],
-	    AC_HELP_STRING([--with-mh-bindir],
-                           [Set the directory where to install the MH binaries. If it starts with '/' it is taken as an absolute path specification, otherwise ${prefix} is prepended to it. (Default: ${exec_prefix}/bin/mu-mh)]),
-		    [case "${withval}" in
-		     /*)  MH_BIN_DIR=${withval};;
-                     *)   MH_BIN_DIR="\${prefix}/${withval}";;
-                     esac],
-                    [MH_BIN_DIR='${exec_prefix}/bin/mu-mh'])
-
 AC_ARG_ENABLE([experimental],
               AC_HELP_STRING([--enable-experimental],
                              [build experimental and/or unfinished utilities]),
@@ -1070,15 +1053,10 @@ fi
 
 dnl Check for Guile
 AC_SUBST(GUILE_BINDIR)
-AC_SUBST(MU_SCM_BIN_PROGRAMS_BUILD)
-AC_SUBST(MU_SCM_LTLIBRARIES_BUILD)
 AC_SUBST(LIBMU_SCM)
 AC_SUBST(LIBMU_SCM_DEPS)
-AC_SUBST(GUILE_SITE_DATA)
-AC_SUBST(GUILE_BUILT_SOURCES)
 AC_SUBST(MU_GUILE_SITE_DIR)
 AC_SUBST(MU_GUILE_SIEVE_MOD_DIR)
-AC_SUBST(MU_GUILE_SIEVE_SCRIPTS)
 AC_SUBST(MU_GUILE_SIEVE_MOD_DATA)
 
 if test "$useguile" != "no"; then
@@ -1086,16 +1064,11 @@ if test "$useguile" != "no"; then
          [useguile=yes
    	  AC_DEFINE(WITH_GUILE,1,[Enable Guile support])
           GUILE_BINDIR=`guile-config info bindir`
-	  MU_SCM_BIN_PROGRAMS_BUILD='$(MU_SCM_BIN_PROGRAMS_LIST)'
-          MU_SCM_LTLIBRARIES_BUILD='$(MU_SCM_LTLIBRARIES_LIST)'
           LIBMU_SCM=../libmu_scm/libmu_scm.la
           LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR} ${MU_LIB_MAILER}'
-          GUILE_SITE_DATA='$(GUILE_SITE_DATA_X)'
           MU_GUILE_SITE_DIR='$(GUILE_SITE)/$(PACKAGE)'
           MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/sieve-modules'
-          MU_GUILE_SIEVE_SCRIPTS='$(MU_GUILE_SIEVE_SCRIPTS_X)'
           MU_GUILE_SIEVE_MOD_DATA='$(MU_GUILE_SIEVE_MOD_DATA_X)'
-          GUILE_BUILT_SOURCES='$(GUILE_BUILT_SOURCES_X)'
   ],[useguile=no])
 
  if test "$useguile" = "yes"; then
@@ -1120,6 +1093,8 @@ if test "$useguile" != "no"; then
  fi 
 fi
 
+AM_CONDITIONAL([MU_COND_LIBMU_SCM],[test "$useguile" = "yes"])
+
 AC_SUBST(GUILE_SITE)
 
 dnl Check for Emacs site-lisp directory
@@ -1143,9 +1118,6 @@ esac],[status_python=yes])
 
 AC_SUBST(PYTHON_LIBS)
 AC_SUBST(PYTHON_INCLUDES)
-AC_SUBST(MU_PY_LIB_LTLIBRARIES_BUILD)
-AC_SUBST(MU_PY_PKGPYEXEC_LTLIBRARIES_BUILD)
-AC_SUBST(MU_PY_PKGPYTHON_BUILD)
 
 if test "$status_python" = yes; then
   AM_PATH_PYTHON(2.5.0,, [status_python=no])
@@ -1161,13 +1133,11 @@ if test "$status_python" = yes; then
 
     if test "$status_python" = yes; then
       AC_DEFINE(WITH_PYTHON,1,[Enable Python support])
-      MU_PY_LIB_LTLIBRARIES_BUILD='$(MU_PY_LIB_LTLIBRARIES_LIST)'
-      MU_PY_PKGPYEXEC_LTLIBRARIES_BUILD='$(MU_PY_PKGPYEXEC_LTLIBRARIES_LIST)'
-      MU_PY_PKGPYTHON_BUILD='$(MU_PY_PKGPYTHON_LIST)'
       MU_LIB_PY='${top_builddir}/python/libmu_py/libmu_py.la'
     fi
   fi
 fi
+AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes])
 
 AC_SUBST(MU_CXX_LTLIBRARIES_BUILD)
 AC_SUBST(MU_CXX_EXAMPLES_BUILD)
@@ -1208,6 +1178,43 @@ if test -z "$DEFAULT_CUPS_CONFDIR"; then
   DEFAULT_CUPS_CONFDIR='$(sysconfdir)/cups'
 fi
 
+dnl ***********************************************************************
+dnl Configure particular utilities
+dnl ***********************************************************************
+
+MU_ENABLE_BUILD(frm)
+MU_ENABLE_BUILD(pop3d)
+MU_ENABLE_BUILD(imap4d)
+MU_ENABLE_BUILD(comsat)
+MU_ENABLE_BUILD(maidag)
+MU_ENABLE_BUILD(mail)
+MU_ENABLE_BUILD(sieve)
+if test "$useguile" = yes; then
+  MU_ENABLE_BUILD(guimb)
+fi
+MU_ENABLE_BUILD(messages)
+MU_ENABLE_BUILD(readmsg)
+MU_ENABLE_BUILD(dotlock)
+MU_ENABLE_BUILD(movemail)
+MU_ENABLE_BUILD(mimeview)
+
+if test "$mu_cv_enable_mh" = yes; then
+  MU_ENABLE_BUILD(mh)
+fi
+
+AC_SUBST(MH_BIN_DIR)
+
+AC_ARG_WITH([mh-bindir],
+	    AC_HELP_STRING([--with-mh-bindir],
+                           [Set the directory where to install the MH binaries. If it starts with '/' it is taken as an absolute path specification, otherwise ${prefix} is prepended to it. (Default: ${exec_prefix}/bin/mu-mh)]),
+		    [case "${withval}" in
+		     /*)  MH_BIN_DIR=${withval};;
+                     *)   MH_BIN_DIR="\${prefix}/${withval}";;
+                     esac],
+                    [MH_BIN_DIR='${exec_prefix}/bin/mu-mh'])
+
+
+
 dnl Make sysconfdir available to the application
 dnl This must be done LAST, since CPPFLAGS is passed by configure
 dnl to build tests, but this relies on being run in make to
@@ -1273,7 +1280,6 @@ Mailers:
 SMTP .......................... $status_smtp
 Sendmail ...................... $status_sendmail
 
-
 *******************************************************************
 
 Before proceeding, verify if these satisfy your requirements. 
diff --git a/guimb/Makefile.am b/guimb/Makefile.am
index a439c82..3197b9e 100644
--- a/guimb/Makefile.am
+++ b/guimb/Makefile.am
@@ -21,9 +21,7 @@ INCLUDES = @MU_APP_COMMON_INCLUDES@ @GUILE_INCLUDES@
 
 SUBDIRS=scm
 
-MU_SCM_BIN_PROGRAMS_LIST=guimb # FIXME: does it need $(EXEEXT)?
-bin_PROGRAMS=@MU_SCM_BIN_PROGRAMS_BUILD@
-EXTRA_PROGRAMS=$(MU_SCM_BIN_PROGRAMS_LIST)
+bin_PROGRAMS=guimb
 guimb_SOURCES=main.c collect.c util.c guimb.h 
 guimb_LDADD = \
  ${MU_APP_LIBRARIES}\
diff --git a/guimb/scm/Makefile.am b/guimb/scm/Makefile.am
index 1a494fc..70fa7c7 100644
--- a/guimb/scm/Makefile.am
+++ b/guimb/scm/Makefile.am
@@ -18,7 +18,7 @@
 ##   02110-1301 USA
 
 MU_GUILE_SIEVE_SCRIPTS_X=sieve.scm
-bin_SCRIPTS = @MU_GUILE_SIEVE_SCRIPTS@
+bin_SCRIPTS = sieve.scm
 EXTRA_SCRIPTS=sieve.scm
 
 sievemoddir=@MU_GUILE_SIEVE_MOD_DIR@
@@ -37,8 +37,7 @@ sieve.sed: Makefile
 CLEANFILES = sieve.scm sieve.sed
 
 sitedir=@MU_GUILE_SITE_DIR@
-GUILE_SITE_DATA_X=sieve-core.scm
-site_DATA=@GUILE_SITE_DATA@
+site_DATA=sieve-core.scm
 
 MU_GUILE_SIEVE_MOD_DATA_X=\
  mimeheader.scm\
diff --git a/libmu_scm/Makefile.am b/libmu_scm/Makefile.am
index f9a79e9..5d7185b 100644
--- a/libmu_scm/Makefile.am
+++ b/libmu_scm/Makefile.am
@@ -20,9 +20,8 @@
 
 INCLUDES = -I. @MU_LIB_COMMON_INCLUDES@ @GUILE_INCLUDES@ 
 
-MU_SCM_LTLIBRARIES_LIST = libmu_scm.la
-lib_LTLIBRARIES=@MU_SCM_LTLIBRARIES_BUILD@
-EXTRA_LTLIBRARIES=libmu_scm.la
+lib_LTLIBRARIES=libmu_scm.la
+
 C_SRCS=\
  mu_address.c\
  mu_body.c\
@@ -52,11 +51,10 @@ libmu_scm_la_LIBADD = \
  ${MU_LIB_MAILUTILS}\
  @GUILE_LIBS@
 
-EXTRA_DIST=mailutils.scm mailutils.scm.in
+EXTRA_DIST=mailutils.scm mailutils.scm.in guile-procedures.texi guile-procedures.txt
 
 sitedir=@MU_GUILE_SITE_DIR@
-GUILE_SITE_DATA_X=guile-procedures.txt mailutils.scm
-site_DATA=@GUILE_SITE_DATA@
+site_DATA=guile-procedures.txt mailutils.scm
 
 DOT_X_FILES=\
  mu_address.x\
@@ -80,11 +78,15 @@ DOT_DOC_FILES=\
  mu_scm.doc\
  mu_util.doc 
 
-GUILE_BUILT_SOURCES_X=$(DOT_X_FILES) $(DOT_DOC_FILES) guile-procedures.texi
+BUILT_SOURCES=$(DOT_X_FILES) $(DOT_DOC_FILES) guile-procedures.texi
 
-BUILT_SOURCES=@GUILE_BUILT_SOURCES@ 
+DISTCLEANFILES=\
+ $(DOT_X_FILES)\
+ $(DOT_DOC_FILES)\
+ guile-procedures.texi\
+ guile-procedures.txt\
+ mailutils.scm
 
-DISTCLEANFILES=$(DOT_X_FILES) $(DOT_DOC_FILES) guile-procedures.texi @GUILE_SITE_DATA@
 CLEANFILES=*.inc
 
 AM_CPPFLAGS=-DDATADIR=\"$(pkgdatadir)\"
diff --git a/mh/Makefile.am b/mh/Makefile.am
index 589cbd7..cb01b67 100644
--- a/mh/Makefile.am
+++ b/mh/Makefile.am
@@ -17,35 +17,9 @@
 ##   Foundation, Inc.  51 Franklin Street, Fifth Floor, Boston, MA
 ##   02110-1301 USA
 
-# All MH programs. Note that we have to explicitely append EXEEXT, Makefile
-# won't do that.
-MU_MH_PROGRAMS_LIST = \
- ali$(EXEEXT)\
- anno$(EXEEXT)\
- burst$(EXEEXT)\
- comp$(EXEEXT)\
- fmtcheck$(EXEEXT)\
- folder$(EXEEXT)\
- forw$(EXEEXT)\
- inc$(EXEEXT)\
- install-mh$(EXEEXT)\
- mark$(EXEEXT)\
- mhl$(EXEEXT)\
- mhn$(EXEEXT)\
- mhparam$(EXEEXT)\
- mhpath$(EXEEXT)\
- pick$(EXEEXT)\
- refile$(EXEEXT)\
- repl$(EXEEXT)\
- rmf$(EXEEXT)\
- rmm$(EXEEXT)\
- scan$(EXEEXT)\
- send$(EXEEXT)\
- sortm$(EXEEXT)\
- whatnow$(EXEEXT)\
- whom$(EXEEXT)
-
-EXTRA_PROGRAMS = \
+bindir = @MH_BIN_DIR@
+mhlibdir = $(pkgdatadir)/mh
+bin_PROGRAMS = \
  ali\
  anno\
  burst\
@@ -71,13 +45,7 @@ EXTRA_PROGRAMS = \
  whatnow\
  whom
 
-MU_MH_LIBRARIES_LIST = libmh.a
-EXTRA_LIBRARIES = libmh.a
-
-bindir = @MH_BIN_DIR@
-mhlibdir = $(pkgdatadir)/mh
-bin_PROGRAMS = @MU_MH_PROGRAMS_BUILD@
-noinst_LIBRARIES = @MU_MH_LIBRARIES_BUILD@
+noinst_LIBRARIES = libmh.a
 
 libmh_a_SOURCES= \
  compcommon.c\
@@ -168,9 +136,7 @@ mh_alias_lex.c: $(srcdir)/mh_alias.l mh_alias.h
                   $(srcdir)/mh_alias.l lex.yy.c mh_alias_lex.c \
                   -- -yy ali_yy
 
-install-exec-hook: @MU_MH_EXEC_HOOK@
-
-mh_finish_install:
+install-exec-hook: 
 	@here=`pwd`; \
 	cd $(DESTDIR)$(bindir); \
 	rm -f folders; \
diff --git a/python/libmu_py/Makefile.am b/python/libmu_py/Makefile.am
index 0aef8df..ed11295 100644
--- a/python/libmu_py/Makefile.am
+++ b/python/libmu_py/Makefile.am
@@ -19,10 +19,7 @@
 
 INCLUDES = @MU_LIB_COMMON_INCLUDES@ $(PYTHON_INCLUDES)
 
-EXTRA_LTLIBRARIES = libmu_py.la c_api.la
-
-MU_PY_LIB_LTLIBRARIES_LIST=libmu_py.la
-lib_LTLIBRARIES=@MU_PY_LIB_LTLIBRARIES_BUILD@
+lib_LTLIBRARIES=libmu_py.la
 libmu_py_la_SOURCES = \
  error.c \
  address.c \
@@ -66,8 +63,7 @@ libmu_py_la_LIBADD = $(PYTHON_LIBS) @MU_COMMON_LIBRARIES@ \
  @MU_AUTHLIBS@\
  ${MU_LIB_MAILUTILS}
 
-MU_PY_PKGPYEXEC_LTLIBRARIES_LIST = c_api.la
-pkgpyexec_LTLIBRARIES = @MU_PY_PKGPYEXEC_LTLIBRARIES_BUILD@
+pkgpyexec_LTLIBRARIES = c_api.la
 c_api_la_LDFLAGS = -avoid-version -module -rpath $(pkgpyexecdir)
 c_api_la_LIBADD = $(PYTHON_LIBS) ${MU_LIB_PY}
 c_api_la_SOURCES = c_api.c
diff --git a/python/mailutils/Makefile.am b/python/mailutils/Makefile.am
index e23ec0d..080db67 100644
--- a/python/mailutils/Makefile.am
+++ b/python/mailutils/Makefile.am
@@ -17,7 +17,7 @@
 ##   Foundation, Inc.  51 Franklin Street, Fifth Floor, Boston, MA
 ##   02110-1301 USA
 
-MU_PY_PKGPYTHON_LIST=\
+pkgpython_PYTHON=\
  __init__.py \
  error.py \
  address.py \
@@ -42,5 +42,3 @@ MU_PY_PKGPYTHON_LIST=\
  url.py \
  util.py
 
-pkgpython_PYTHON=@MU_PY_PKGPYTHON_BUILD@
-EXTRA_PYTHON=$(MU_PY_PKGPYTHON_LIST)


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Wed Aug 12 17:08:46 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbL3t-00041Y-U0
	for mharc-commit-mailutils@gnu.org; Wed, 12 Aug 2009 17:08:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbL3s-00041P-BF
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 17:08:44 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbL3q-00041D-Sa
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 17:08:43 -0400
Received: from [199.232.76.173] (port=46171 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbL3q-00041A-Lu
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 17:08:42 -0400
Received: from savannah.gnu.org ([199.232.41.3]:44494 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MbL3q-0001Cd-8t
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 17:08:42 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbL3p-0000CG-PF
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 21:08:41 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbL3p-0000Bi-FP
	for commit-mailutils@gnu.org; Wed, 12 Aug 2009 21:08:41 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2d3f4779e79431b114971d85ae94193b59fe39d5
X-Git-Newrev: eee2dde23b558aecd59b690ff9007341869577cb
Message-Id: <E1MbL3p-0000Bi-FP@cvs.savannah.gnu.org>
Date: Wed, 12 Aug 2009 21:08:41 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-318-geee2dde
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2009 21:08: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=eee2dde23b558aecd59b690ff9007341869577cb

The branch, master has been updated
       via  eee2dde23b558aecd59b690ff9007341869577cb (commit)
      from  2d3f4779e79431b114971d85ae94193b59fe39d5 (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 eee2dde23b558aecd59b690ff9007341869577cb
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 13 00:08:33 2009 +0300

    Fixes in configure.ac
    
    * am/enable.m4 (MU_ENABLE_SUPPORT): Change semantics of the
    last argument.
    (MU_ENABLE_BUILD): 4th argument gives additional conditions for
    AM_CONDITIONAL.
    * configure.ac: Enable building c++ interface when possible.
    Fix checks for guimb and mh utilities.
    * libmu_cpp/Makefile.am: Remove unnecessary substitution
    variables.

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

Summary of changes:
 am/enable.m4          |   14 ++++++++------
 configure.ac          |   13 +++----------
 libmu_cpp/Makefile.am |    4 +---
 3 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/am/enable.m4 b/am/enable.m4
index e6b06f4..fc956a3 100644
--- a/am/enable.m4
+++ b/am/enable.m4
@@ -1,5 +1,5 @@
 dnl This file is part of GNU mailutils.
-dnl Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
 dnl
 dnl This program is free software; you can redistribute it and/or modify
 dnl it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@ dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 dnl
 
 dnl MU_ENABLE_SUPPORT(feature, [action-if-true], [action-if-false],
-dnl                   [action-default])
+dnl                   [default-value])
 
 AC_DEFUN([MU_ENABLE_SUPPORT], [
 	pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
@@ -32,7 +32,7 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
                 no)  mu_cache_var=no;;
 	        *)   AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
         esac],
-                      [ifelse([$4],,mu_cache_var=yes,[$4])])
+                      [mu_cache_var=ifelse([$4],,yes,[$4])])
 
 	if test x"[$]mu_cache_var" = x"yes"; then
 		ifelse([$2],,:,[$2])
@@ -46,6 +46,8 @@ AC_DEFUN([MU_ENABLE_SUPPORT], [
 	popdef([mu_cache_var])
 ])
 
+dnl MU_ENABLE_BUILD(feature, [action-if-true], [action-if-false],
+dnl                 [additional-cond], [default-value])
 AC_DEFUN([MU_ENABLE_BUILD], [
 	pushdef([mu_upcase],translit($1,[a-z+-],[A-ZX_]))
 	pushdef([mu_cache_var],[mu_cv_enable_build_]translit($1,[+-],[x_]))
@@ -60,18 +62,18 @@ AC_DEFUN([MU_ENABLE_BUILD], [
                 no)  mu_cache_var=no;;
 	        *)   AC_MSG_ERROR([bad value ${enableval} for --disable-$1]) ;;
         esac],
-                      [ifelse([$4],,mu_cache_var=yes,[$4])])
+                      [mu_cache_var=ifelse([$5],,yes,[$5])])
 
 	if test x"[$]mu_cache_var" = x"yes"; then
 		ifelse([$2],,:,[$2])
 	ifelse([$3],,,else
                [$3])
 	fi
-	if test x"[$]mu_cache_var" = x"yes"; then
+	if test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4]); then
 		AC_DEFINE([MU_BUILD_]mu_upcase,1,[Define this if you build $1])
         fi
 	AM_CONDITIONAL(mu_cond,
-	               [test x"[$]mu_cache_var" = x"yes"])
+	               [test x"[$]mu_cache_var" = x"yes" ifelse($4,,,[&& $4])])
 	
 	popdef([mu_upcase])
 	popdef([mu_cache_var])
diff --git a/configure.ac b/configure.ac
index 619a264..954cf7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1142,10 +1142,7 @@ AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes])
 AC_SUBST(MU_CXX_LTLIBRARIES_BUILD)
 AC_SUBST(MU_CXX_EXAMPLES_BUILD)
 MU_ENABLE_SUPPORT(c++,
-  	          [MU_CXX_LTLIBRARIES_BUILD='$(MU_CXX_LTLIBRARIES_LIST)'
-	           MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'],
-		  :,
-		  [mu_cv_enable_cxx=$mu_build_experimental])
+  	          [MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'])
 
 # Default mailbox record
 # Note: 1. Support for mbox type is always enabled.
@@ -1189,18 +1186,14 @@ MU_ENABLE_BUILD(comsat)
 MU_ENABLE_BUILD(maidag)
 MU_ENABLE_BUILD(mail)
 MU_ENABLE_BUILD(sieve)
-if test "$useguile" = yes; then
-  MU_ENABLE_BUILD(guimb)
-fi
+MU_ENABLE_BUILD(guimb,,,[test "$useguile" = yes])
 MU_ENABLE_BUILD(messages)
 MU_ENABLE_BUILD(readmsg)
 MU_ENABLE_BUILD(dotlock)
 MU_ENABLE_BUILD(movemail)
 MU_ENABLE_BUILD(mimeview)
 
-if test "$mu_cv_enable_mh" = yes; then
-  MU_ENABLE_BUILD(mh)
-fi
+MU_ENABLE_BUILD(mh,,,[test "$mu_cv_enable_mh" = yes])
 
 AC_SUBST(MH_BIN_DIR)
 
diff --git a/libmu_cpp/Makefile.am b/libmu_cpp/Makefile.am
index 15a30ab..95dc1d6 100644
--- a/libmu_cpp/Makefile.am
+++ b/libmu_cpp/Makefile.am
@@ -19,9 +19,7 @@
 
 INCLUDES = @MU_LIB_COMMON_INCLUDES@ 
 
-MU_CXX_LTLIBRARIES_LIST = libmu_cpp.la
-lib_LTLIBRARIES = @MU_CXX_LTLIBRARIES_BUILD@
-EXTRA_LTLIBRARIES = $(MU_CXX_LTLIBRARIES_LIST)
+lib_LTLIBRARIES = libmu_cpp.la
 
 libmu_cpp_la_SOURCES = \
  address.cc\


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 13 08:21:26 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbZJ8-0005RX-OE
	for mharc-commit-mailutils@gnu.org; Thu, 13 Aug 2009 08:21:26 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbZJ7-0005ON-9Q
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 08:21:25 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbZJ6-0005MD-8D
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 08:21:24 -0400
Received: from [199.232.76.173] (port=59394 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbZJ6-0005Lj-0w
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 08:21:24 -0400
Received: from savannah.gnu.org ([199.232.41.3]:44776 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MbZJ5-00010S-Kg
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 08:21:23 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbZJ5-0003aE-3m
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 12:21:23 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbZJ4-0003Zi-17
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 12:21:23 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: eee2dde23b558aecd59b690ff9007341869577cb
X-Git-Newrev: 73fe9290251b13e7e5d978a6bfbe014499f87e36
Message-Id: <E1MbZJ4-0003Zi-17@cvs.savannah.gnu.org>
Date: Thu, 13 Aug 2009 12:21:22 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-319-g73fe929
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2009 12:21:25 -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=73fe9290251b13e7e5d978a6bfbe014499f87e36

The branch, master has been updated
       via  73fe9290251b13e7e5d978a6bfbe014499f87e36 (commit)
      from  eee2dde23b558aecd59b690ff9007341869577cb (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 73fe9290251b13e7e5d978a6bfbe014499f87e36
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 13 15:12:50 2009 +0300

    Fix building with fribidi2
    
    * configure.ac: Check for wcwidth and wchar.h.
    * frm/common.c (get_charset): Aways allocate output_charset.
    Provide a substitution for fribidi_wcwidth if it is not
    available.
    (puts_bidi): Use mu_fribidi_wcwidth.

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

Summary of changes:
 configure.ac |    4 +++-
 frm/common.c |   34 ++++++++++++++++++++++++----------
 2 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 954cf7f..f9ddd2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -409,7 +409,7 @@ AC_HEADER_DIRENT
 AC_CHECK_HEADERS(errno.h fcntl.h inttypes.h libgen.h limits.h\
  malloc.h obstack.h paths.h shadow.h socket.h sys/socket.h stdarg.h stdio.h\
  stdlib.h string.h strings.h sys/file.h sysexits.h syslog.h termcap.h\
- termios.h termio.h sgtty.h utmp.h utmpx.h unistd.h)
+ termios.h termio.h sgtty.h utmp.h utmpx.h unistd.h wchar.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -536,6 +536,8 @@ AH_BOTTOM([
 
 ## FriBidi support
 
+AC_CHECK_FUNCS(wcwidth)
+
 AC_SUBST(FRIBIDI_LIBS)
 
 use_fribidi=yes
diff --git a/frm/common.c b/frm/common.c
index 77f0685..4cd4f71 100644
--- a/frm/common.c
+++ b/frm/common.c
@@ -62,10 +62,10 @@ static char *output_charset = NULL;
 const char *
 get_charset ()
 {
-  char *tmp;
-  
   if (!output_charset)
     {
+      char *tmp;
+      const char *str = NULL;
       char locale[32];
       
       memset (locale, 0, sizeof (locale));
@@ -86,16 +86,16 @@ get_charset ()
 	  
 	  lang = strtok_r (locale, "_", &sp);
 	  terr = strtok_r (NULL, ".", &sp);
-	  output_charset = strtok_r (NULL, "@", &sp);
+	  str = strtok_r (NULL, "@", &sp);
 
-	  if (output_charset)
-	    output_charset = xstrdup (output_charset);
-	  else
-	    output_charset = mu_charset_lookup (lang, terr);
+	  if (!str)
+	    str = mu_charset_lookup (lang, terr);
 	}
       
-      if (!output_charset)
-	output_charset = "ASCII";
+      if (!str)
+	str = "ASCII";
+
+      output_charset = xstrdup (str);
     }
   return output_charset;
 }
@@ -104,6 +104,20 @@ get_charset ()
 /* BIDI support (will be moved to lib when it's ready) */
 #ifdef HAVE_LIBFRIBIDI
 
+# ifdef HAVE_FRIBIDI_WCWIDTH
+#  define mu_fribidi_wcwidth fribidi_wcwidth
+# else
+#  if defined(HAVE_WCHAR_H) && defined(HAVE_WCWIDTH)
+#   include <wchar.h>
+#   define mu_fribidi_wcwidth(c) wcwidth((wchar_t)c)
+#  else
+#   undef HAVE_LIBFRIBIDI
+#  endif
+# endif
+#endif
+
+#ifdef HAVE_LIBFRIBIDI
+
 static int fb_charset_num = -1;
 FriBidiChar *logical;
 char *outstring;
@@ -170,7 +184,7 @@ puts_bidi (char *string)
 	      if (fb_charset_num != FRIBIDI_CHARSET_CAP_RTL)
 		{
 		  while (wid > 0 && idx < len)
-		    wid -= fribidi_wcwidth (visual[idx++]);
+		    wid -= mu_fribidi_wcwidth (visual[idx++]);
 		}
 	      else
 		{


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 13 14:45:07 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MbfIR-0007z5-2F
	for mharc-commit-mailutils@gnu.org; Thu, 13 Aug 2009 14:45:07 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MbfIP-0007ys-UX
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 14:45:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MbfIN-0007ye-6X
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 14:45:04 -0400
Received: from [199.232.76.173] (port=41685 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MbfIM-0007ya-Vh
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 14:45:03 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54661 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MbfIM-0003Zt-KZ
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 14:45:02 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbfIL-000354-R4
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 18:45:01 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbfIL-00034P-5R
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 18:45:01 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 73fe9290251b13e7e5d978a6bfbe014499f87e36
X-Git-Newrev: f84bcd99f10ab957af4c84601f9aaaeb43de98b7
Message-Id: <E1MbfIL-00034P-5R@cvs.savannah.gnu.org>
Date: Thu, 13 Aug 2009 18:45:01 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-321-gf84bcd9
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2009 18:45: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=f84bcd99f10ab957af4c84601f9aaaeb43de98b7

The branch, master has been updated
       via  f84bcd99f10ab957af4c84601f9aaaeb43de98b7 (commit)
       via  6ffef584f46e175b1ae29a1b152316dacc8a08fd (commit)
      from  73fe9290251b13e7e5d978a6bfbe014499f87e36 (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 f84bcd99f10ab957af4c84601f9aaaeb43de98b7
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 13 21:44:53 2009 +0300

    Improve memory allocation in pop3d.
    
    * pop3d/pop3d.c (pop3d_alloc_die): New function.
    (main): Set mu_alloc_die_hook.
    (pop3d_mainloop): Use mu_alloc.
    * pop3d/pop3d.h: Include mailutils/alloc.h

commit 6ffef584f46e175b1ae29a1b152316dacc8a08fd
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 13 21:43:03 2009 +0300

    Further improvements of the configure system.
    
    * Makefile.am (MU_COND_LIBMU_CPP): New cond.
    (SUBDIRS): Use LIBMU_CPP_DIR
    * configure.ac: Rename --disable-c++ to --disable-cxx: autoconf
    cannot handle the former.
    (MU_COND_LIBMU_CPP): New cond.
    (AC_CONFIG_FILES): Add include/mailutils/cpp/Makefile
    * include/mailutils/Makefile.am (nobase_pkginclude_HEADERS): Remove
    (MU_COND_LIBMU_CPP): New cond.
    (SUBDIRS): Add CPP_DIR
    * include/mailutils/cpp/Makefile.am: Remove substitution vars.
    (cppincludedir, cppinclude_HEADERS): New variables.
    * include/mailutils/sys/Makefile.am (sysincludedir)
    (sysinclude_HEADERS): New variables.

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

Summary of changes:
 Makefile.am                       |    6 +++++-
 configure.ac                      |    5 +++--
 include/mailutils/Makefile.am     |    9 +++++----
 include/mailutils/cpp/Makefile.am |    6 ++----
 include/mailutils/sys/Makefile.am |    4 ++++
 pop3d/pop3d.c                     |   16 ++++++++++------
 pop3d/pop3d.h                     |    1 +
 7 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ba37745..5cabed2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -84,6 +84,10 @@ if MU_COND_LIBMU_SCM
   LIBMU_SCM_DIR = libmu_scm
 endif
 
+if MU_COND_LIBMU_CPP
+  LIBMU_CPP_DIR = libmu_cpp
+endif
+
 SUBDIRS = \
  mu-aux\
  include\
@@ -96,7 +100,7 @@ SUBDIRS = \
  lib\
  libmu_argp\
  libmu_cfg\
- libmu_cpp\
+ $(LIBMU_CPP_DIR)\
  $(LIBMU_SCM_DIR)\
  libmu_sieve\
  $(PYTHON_DIR)\
diff --git a/configure.ac b/configure.ac
index f9ddd2e..0258618 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1141,10 +1141,10 @@ if test "$status_python" = yes; then
 fi
 AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes])
 
-AC_SUBST(MU_CXX_LTLIBRARIES_BUILD)
 AC_SUBST(MU_CXX_EXAMPLES_BUILD)
-MU_ENABLE_SUPPORT(c++,
+MU_ENABLE_SUPPORT(cxx,
   	          [MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)'])
+AM_CONDITIONAL([MU_COND_LIBMU_CPP], [test "$mu_cv_enable_cxx" = yes])
 
 # Default mailbox record
 # Note: 1. Support for mbox type is always enabled.
@@ -1332,6 +1332,7 @@ AC_CONFIG_FILES([
  include/Makefile
  include/mailutils/Makefile
  include/mailutils/sys/Makefile
+ include/mailutils/cpp/Makefile
  lib/Makefile
  libmu_argp/Makefile
  libmu_auth/Makefile
diff --git a/include/mailutils/Makefile.am b/include/mailutils/Makefile.am
index b38f239..3ffda26 100644
--- a/include/mailutils/Makefile.am
+++ b/include/mailutils/Makefile.am
@@ -98,8 +98,9 @@ pkginclude_HEADERS = \
  vartab.h\
  version.h
 
-nobase_pkginclude_HEADERS = \
-  sys/nntp.h\
-  sys/pop3.h
-SUBDIRS = sys
+if MU_COND_LIBMU_CPP
+  CPP_DIR = cpp
+endif
+
+SUBDIRS = sys $(CPP_DIR)
 
diff --git a/include/mailutils/cpp/Makefile.am b/include/mailutils/cpp/Makefile.am
index 69c15b6..4438972 100644
--- a/include/mailutils/cpp/Makefile.am
+++ b/include/mailutils/cpp/Makefile.am
@@ -16,7 +16,8 @@
 ##   along with GNU Mailutils; if not, write to the Free Software
 ##   Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-MU_CXX_INCLUDES = \
+cppincludedir=$(pkgincludedir)/cpp
+cppinclude_HEADERS = \
  address.h\
  attribute.h\
  body.h\
@@ -41,6 +42,3 @@ MU_CXX_INCLUDES = \
  sieve.h\
  stream.h\
  url.h
-
-pkginclude_HEADERS = @MU_CXX_INCLUDES@
-EXTRA_HEADERS = '$(MU_CXX_INCLUDES)'
diff --git a/include/mailutils/sys/Makefile.am b/include/mailutils/sys/Makefile.am
index 59d3c18..75aab66 100644
--- a/include/mailutils/sys/Makefile.am
+++ b/include/mailutils/sys/Makefile.am
@@ -17,3 +17,7 @@
 ##   Foundation, Inc.  51 Franklin Street, Fifth Floor, Boston, MA
 ##   02110-1301 USA
 
+sysincludedir=$(pkgincludedir)/sys
+sysinclude_HEADERS = \
+  nntp.h\
+  pop3.h
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 16fa21e..8b05ace 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -301,9 +301,7 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
   /* Prepare the shared secret for APOP.  */
   {
     char *local_hostname;
-    local_hostname = malloc (MAXHOSTNAMELEN + 1);
-    if (local_hostname == NULL)
-      pop3d_abquit (ERR_NO_MEM);
+    local_hostname = mu_alloc (MAXHOSTNAMELEN + 1);
 
     /* Get our canonical hostname. */
     {
@@ -317,9 +315,7 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile)
 	}
     }
 
-    md5shared = malloc (strlen (local_hostname) + 51);
-    if (md5shared == NULL)
-      pop3d_abquit (ERR_NO_MEM);
+    md5shared = mu_alloc (strlen (local_hostname) + 51);
 
     snprintf (md5shared, strlen (local_hostname) + 50, "<%u.%u@%s>", getpid (),
 	      (unsigned)time (NULL), local_hostname);
@@ -388,6 +384,12 @@ pop3d_connection (int fd, struct sockaddr *sa, int salen, void *data,
   return 0;
 }
 
+static void
+pop3d_alloc_die ()
+{
+  pop3d_abquit (ERR_NO_MEM);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -421,6 +423,8 @@ main (int argc, char **argv)
   mu_m_server_set_default_port (server, 110);
   mu_m_server_set_timeout (server, 600);
   mu_m_server_set_strexit (server, mu_strexit);
+
+  mu_alloc_die_hook = pop3d_alloc_die;
   
   if (mu_app_init (&argp, pop3d_argp_capa, pop3d_cfg_param, 
 		   argc, argv, 0, NULL, server))
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index cadbff5..e1b3059 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.h
@@ -101,6 +101,7 @@ extern int expire_on_exit;
 #endif
 #include <sysexits.h>
 
+#include <mailutils/alloc.h>
 #include <mailutils/cctype.h>
 #include <mailutils/cstr.h>
 #include <mailutils/attribute.h>


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 13 15:17:24 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mbfng-0001NC-6G
	for mharc-commit-mailutils@gnu.org; Thu, 13 Aug 2009 15:17:24 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mbfnd-0001Ld-4N
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 15:17:21 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mbfnb-0001L7-7h
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 15:17:19 -0400
Received: from [199.232.76.173] (port=52418 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mbfnb-0001Kn-5S
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 15:17:19 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48910 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mbfna-0000TQ-AM
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 15:17:18 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbfnZ-000501-Pt
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 19:17:17 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MbfnZ-0004zL-6p
	for commit-mailutils@gnu.org; Thu, 13 Aug 2009 19:17:17 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f84bcd99f10ab957af4c84601f9aaaeb43de98b7
X-Git-Newrev: f2eb56bb7632e4044173a344964d6739a7ef4b7f
Message-Id: <E1MbfnZ-0004zL-6p@cvs.savannah.gnu.org>
Date: Thu, 13 Aug 2009 19:17:17 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-322-gf2eb56b
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Aug 2009 19:17:22 -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=f2eb56bb7632e4044173a344964d6739a7ef4b7f

The branch, master has been updated
       via  f2eb56bb7632e4044173a344964d6739a7ef4b7f (commit)
      from  f84bcd99f10ab957af4c84601f9aaaeb43de98b7 (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 f2eb56bb7632e4044173a344964d6739a7ef4b7f
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 13 22:17:02 2009 +0300

    Minor fixes.
    
    * comsat/comsat.h: Include confpaths.h, not paths.h.
    * lib/utmp.c: Likewise.
    * libmu_scm/mu_scm.h: Likewise.
    * libproto/mailer/sendmail.c: Likewise.
    * mail/mail.h: Likewise.
    * mailbox/mbx_default.c: Likewise.
    * mailbox/version.c: Likewise.
    * lib/daemon.c: Likewise.
    
    * include/mailutils/mailer.h (struct timeval): forward decl.

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

Summary of changes:
 comsat/comsat.h            |    4 +---
 include/mailutils/mailer.h |    3 +++
 lib/daemon.c               |   10 ++++------
 lib/utmp.c                 |    1 +
 libmu_scm/mu_scm.h         |    1 +
 libproto/mailer/sendmail.c |    2 ++
 mail/mail.h                |    5 ++---
 mailbox/mbx_default.c      |    4 +---
 mailbox/version.c          |    2 ++
 9 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/comsat/comsat.h b/comsat/comsat.h
index 5d6d320..59937a9 100644
--- a/comsat/comsat.h
+++ b/comsat/comsat.h
@@ -38,9 +38,7 @@
 #include <string.h>
 #include <pwd.h>
 
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <confpaths.h>
 
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
diff --git a/include/mailutils/mailer.h b/include/mailutils/mailer.h
index 4fb4277..7f41c3e 100644
--- a/include/mailutils/mailer.h
+++ b/include/mailutils/mailer.h
@@ -38,6 +38,9 @@ extern int mu_mailer_open           (mu_mailer_t, int flags);
 extern int mu_mailer_close          (mu_mailer_t);
 extern int mu_mailer_send_message   (mu_mailer_t, mu_message_t,
 				     mu_address_t from, mu_address_t to);
+
+struct timeval;
+
 extern int mu_mailer_send_fragments (mu_mailer_t mailer, mu_message_t msg,
 				     size_t fragsize, struct timeval *delay,
 				     mu_address_t from, mu_address_t to);
diff --git a/lib/daemon.c b/lib/daemon.c
index 5bb2ae0..3709f4d 100644
--- a/lib/daemon.c
+++ b/lib/daemon.c
@@ -38,12 +38,10 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <confpaths.h>
 
-#ifndef _PATH_DEVNULL
-# define _PATH_DEVNULL   "/dev/null"
+#ifndef PATH_DEVNULL
+# define PATH_DEVNULL   "/dev/null"
 #endif
 
 /*
@@ -180,7 +178,7 @@ waitdaemon (int nochdir, int noclose, int maxwait)
       for (i = 0; i < fdlimit; i++)
 	close (i);
 
-      fd = open (_PATH_DEVNULL, O_RDWR, 0);
+      fd = open (PATH_DEVNULL, O_RDWR, 0);
       if (fd != -1)
 	{
 	  dup2 (fd, STDIN_FILENO);
diff --git a/lib/utmp.c b/lib/utmp.c
index f19f50b..5e76ea7 100644
--- a/lib/utmp.c
+++ b/lib/utmp.c
@@ -27,6 +27,7 @@ MA 02110-1301 USA. */
 #include <unistd.h>
 #include <string.h>
 #include <stdio.h>
+#include <confpaths.h>
 
 static char *utmp_name = PATH_UTMP;
 static int fd = -1;
diff --git a/libmu_scm/mu_scm.h b/libmu_scm/mu_scm.h
index 39e1e2e..a7e5caf 100644
--- a/libmu_scm/mu_scm.h
+++ b/libmu_scm/mu_scm.h
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <sys/time.h>
 #include <string.h>
+#include <confpaths.h>
 
 #include <mailutils/mailbox.h>
 #include <mailutils/message.h>
diff --git a/libproto/mailer/sendmail.c b/libproto/mailer/sendmail.c
index 40fff12..beaf24d 100644
--- a/libproto/mailer/sendmail.c
+++ b/libproto/mailer/sendmail.c
@@ -30,6 +30,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <confpaths.h>
+
 #include <mailutils/address.h>
 #include <mailutils/debug.h>
 #include <mailutils/observer.h>
diff --git a/mail/mail.h b/mail/mail.h
index 54e4ce1..a600d46 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -51,9 +51,8 @@
 # include <varargs.h>
 #endif
 #include <signal.h>
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+
+#include <confpaths.h>
 
 #include <xalloc.h>
 
diff --git a/mailbox/mbx_default.c b/mailbox/mbx_default.c
index e83435a..50588f5 100644
--- a/mailbox/mbx_default.c
+++ b/mailbox/mbx_default.c
@@ -28,9 +28,7 @@
 #include <pwd.h>
 #include <unistd.h>
 
-#ifdef HAVE_PATHS_H
-# include <paths.h>
-#endif
+#include <confpaths.h>
 
 #include <mailutils/mailbox.h>
 #include <mailutils/mutil.h>
diff --git a/mailbox/version.c b/mailbox/version.c
index 92bd0d7..374a269 100644
--- a/mailbox/version.c
+++ b/mailbox/version.c
@@ -26,6 +26,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <confpaths.h>
+
 char *mu_license_text =
  N_("   GNU Mailutils is free software; you can redistribute it and/or modify\n"
     "   it under the terms of the GNU General Public License as published by\n"


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Fri Aug 14 15:54:12 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mc2qq-0005Lo-2y
	for mharc-commit-mailutils@gnu.org; Fri, 14 Aug 2009 15:54:12 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mc2qo-0005LW-HC
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 15:54:10 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mc2qm-0005L8-G0
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 15:54:09 -0400
Received: from [199.232.76.173] (port=39883 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mc2qm-0005L3-1h
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 15:54:08 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48531 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mc2ql-0003hC-36
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 15:54:07 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mc2qj-0002W9-TV
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 19:54:06 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mc2qh-0002VW-5i
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 19:54:05 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f2eb56bb7632e4044173a344964d6739a7ef4b7f
X-Git-Newrev: 9b0dee5fa917d5804aa2ca89a186ea8da64578ca
Message-Id: <E1Mc2qh-0002VW-5i@cvs.savannah.gnu.org>
Date: Fri, 14 Aug 2009 19:54:04 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-323-g9b0dee5
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Aug 2009 19:54:10 -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=9b0dee5fa917d5804aa2ca89a186ea8da64578ca

The branch, master has been updated
       via  9b0dee5fa917d5804aa2ca89a186ea8da64578ca (commit)
      from  f2eb56bb7632e4044173a344964d6739a7ef4b7f (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 9b0dee5fa917d5804aa2ca89a186ea8da64578ca
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Aug 14 22:53:52 2009 +0300

    Mail: configurable `headers' output format.
    
    * mail/from.c: Rewrite using format string.
    * mail/mail.c (default_setup): Set default value for `headline'.
    (main): Fix call to util_do_command.
    * mail/mail.h [HAVE_STDARG_H]: Remove conditions.
    (mail_compile_headline): New proto.
    * mail/mailvar.c (mailvar_tab): New variable "headline".
    * mail/util.c: Minor fixes.
    * NEWS, doc/programs.texi: Update.

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

Summary of changes:
 NEWS                      |   10 +-
 doc/texinfo/programs.texi |  120 ++++++++++-
 mail/from.c               |  518 ++++++++++++++++++++++++++++++++++++++-------
 mail/mail.c               |    3 +-
 mail/mail.h               |    8 +-
 mail/mailvar.c            |    4 +
 mail/util.c               |   21 +--
 7 files changed, 583 insertions(+), 101 deletions(-)

diff --git a/NEWS b/NEWS
index 07bbfef..ed4a90e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2009-08-03
+GNU mailutils NEWS -- history of user-visible changes. 2009-08-14
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 
 2008, 2009 Free Software Foundation, Inc.
 See the end of file for copying conditions.
@@ -83,6 +83,12 @@ described.
 For each variable, this command prints its name, data type, current
 value and a short description.
 
+** headline variable
+
+The headline variable holds a format string to use for the header
+summary. Its format is mostly compatible with that of the `nail'
+mail reader.
+
 ** showenvelope variable
 
 If the `showenvelope' variable is set, print command will include the
@@ -90,7 +96,7 @@ SMTP envelope in its output.
 
 ** fromfield variable
 
-The `fromenvelope' boolean variable, if set, instructs mail to obtain
+The `fromfield' boolean variable, if set, instructs mail to obtain
 the sender address from the `From:' header.  This is the default.
 If unset, the sender address is obtained from the SMTP envelope.
 
diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 20be516..4135911 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -2240,14 +2240,14 @@ but before opening the mailbox.
 @itemx --file
 Operate on the mailbox given by the first non-optional command line
 argument. If there is no such argument, read messages from the
-user's @file{mbox} file. @xref{Reading Mail} for more details about
+user's @file{mbox} file. @xref{Reading Mail}, for more details about
 using this option.
 @item -F
 @itemx --byname
 Record outgoing messages in a file named after the first recipient.
 The name is the login-name portion of the address found first on the
 @samp{To:} line in the mail header. This option sets the @samp{byname}
-variable, which see (@xref{byname}).
+variable, which see (@pxref{byname}).
 @item -H
 @itemx --headers
 Print header summary to stdout and exit.
@@ -3482,6 +3482,7 @@ set
 Following variables control the behavior of GNU @command{mail}:
 
 @table @code
+@kwindex append
 @item append
 @*Type: Boolean, Read-Only
 @*Default: True
@@ -3491,6 +3492,7 @@ Messages saved in mbox are appended to the end rather than prepended.
 This is the default and cannot be changed. This variable exists only
 for compatibility with other @command{mailx} implementations.
 
+@kwindex appenddeadletter
 @item appenddeadletter
 @*Type: Boolean.
 @*Default: False.
@@ -3500,6 +3502,7 @@ If this variable is @code{True}, the contents of canceled letter is
 appended to the user's @file{dead.letter} file. Otherwise it overwrites
 its contents.
 
+@kwindex askbcc
 @item askbcc
 @*Type: Boolean.
 @*Default: False.
@@ -3508,6 +3511,7 @@ its contents.
 When set to @code{True} the user will be prompted to enter @code{Bcc}
 field before composing the message.
 
+@kwindex askcc
 @item askcc
 @*Type: Boolean.
 @*Default: True.
@@ -3516,6 +3520,7 @@ field before composing the message.
 When set to @code{True} the user will be prompted to enter @code{Cc}
 field before composing the message.
 
+@kwindex asksub
 @item asksub
 @*Type: Boolean.
 @*Default: True in interactive mode, False otherwise.
@@ -3524,6 +3529,7 @@ field before composing the message.
 When set to @code{True} the user will be prompted to enter @code{Subject}
 field before composing the message.
 
+@kwindex autoinc
 @item autoinc
 @*Type: Boolean.
 @*Default: True.
@@ -3531,6 +3537,7 @@ field before composing the message.
 
 Automatically incorporate newly arrived messages.
 
+@kwindex autoprint
 @item autoprint
 @*Type: Boolean.
 @*Default: False.
@@ -3539,6 +3546,7 @@ Automatically incorporate newly arrived messages.
 Causes the delete command to behave like dp - thus, after deleting a
 message, the next one will be typed automatically.
 
+@kwindex bang
 @item bang
 @*Type: Boolean.
 @*Default: False.
@@ -3548,6 +3556,7 @@ When set, every occurrence of @code{!} in arguments to @code{!}
 command is replaced with the last executed command.
 
 @anchor{byname}
+@kwindex byname
 @item byname
 @*Type: Boolean
 @*Default: Unset
@@ -3561,6 +3570,7 @@ The name is the login-name portion of the address found first on the
 It is set by the @option{--byname} (@option{-F}) command line option.
 
 @anchor{datefield}
+@kwindex datefield
 @item datefield
 @*Type: Boolean.
 @*Default: False.
@@ -3574,6 +3584,7 @@ will fall back to using @acronym{SMTP} envelope.
 
 @xref{fromfield}.
 
+@kwindex charset
 @item charset
 @*Type: string
 @*Default: @samp{auto}
@@ -3586,6 +3597,7 @@ variable is set to @samp{auto}, @command{mail} tries to deduce the
 name of the character set from the value of @code{LC_ALL} environment
 variable. Otherwise, its value is taken as the name of the charset.
 
+@kwindex cmd
 @item cmd
 @*Type: String.
 @*Default: Unset.
@@ -3593,6 +3605,7 @@ variable. Otherwise, its value is taken as the name of the charset.
 
 Contains default shell command for @code{pipe}.
 
+@kwindex columns
 @item columns
 @*Type: Numeric.
 @*Default: Detected at startup by querying the terminal device. If this
@@ -3601,6 +3614,7 @@ fails, the value of environment variable @code{COLUMNS} is used.
 
 This variable contains the number of columns on terminal screen.
 
+@kwindex crt
 @item crt
 @*Type: Boolean or Numeric
 @*Default: True in interactive mode, False otherwise.
@@ -3614,6 +3628,7 @@ if @code{crt} is set without a value, then the height of the terminal
 screen is used to compute the threshold. The number of lines on
 screen is controlled by @code{screen} variable.
 
+@kwindex debug
 @item debug
 @*Type: String to boolean
 @*Default: Not set
@@ -3628,6 +3643,7 @@ information.  If set to @samp{true} (i.e. @code{set debug}), sets
 maximum debugging (@samp{<trace7}) on mailbox and its underlying
 objects.
 
+@kwindex decode-fallback
 @item decode-fallback
 @*Type: String.
 @*Default: @samp{none}.
@@ -3650,6 +3666,7 @@ Unprintable characters are represented by their octal codes. Printable
 ones are printed @samp{as is}.
 @end table
 
+@kwindex debug
 @item debug
 @*Type: Boolean
 @*Default: Unset
@@ -3658,6 +3675,7 @@ ones are printed @samp{as is}.
 This variable is not used.  It exists for compatibility with other
 @command{mailx} implementations and for future use.
 
+@kwindex dot
 @item dot
 @*Type: Boolean.
 @*Default: False.
@@ -3666,6 +3684,7 @@ This variable is not used.  It exists for compatibility with other
 If @code{True}, causes @command{mail} to interpret a period alone on a line as the
 terminator of a message you are sending.
 
+@kwindex emptystart
 @item emptystart
 @*Type: Boolean.
 @*Default: False.
@@ -3675,6 +3694,7 @@ If the mailbox is empty, @command{mail} normally prints @samp{No mail for user}
 exits immediately. If this option is set, @command{mail} will start no matter is
 the mailbox empty or not.
 
+@kwindex editheaders
 @item editheaders
 @*Type: Boolean.
 @*Default: False.
@@ -3684,6 +3704,7 @@ When set, @command{mail} will include message headers in the text to
 be the @code{~e} and @code{~v} escapes, thus allowing you to customize
 the headers.
 
+@kwindex escape
 @item escape
 @*Type: String.
 @*Default: ~
@@ -3692,6 +3713,7 @@ the headers.
 If defined, the first character of this option gives the character to
 denoting escapes.
 
+@kwindex flipr
 @item flipr
 @*Type: Boolean
 @*Default: Unset
@@ -3700,6 +3722,7 @@ denoting escapes.
 If set, the variable @code{flipr} swaps the meanings of @code{reply}
 and @code{Reply} commands (@pxref{Replying}).
 
+@kwindex folder
 @item folder
 @*Type: String.
 @*Default: Unset.
@@ -3709,6 +3732,7 @@ The name of the directory to use for storing folders of messages. If
 unset, @env{$HOME} is assumed.
 
 @anchor{fromfield}
+@kwindex fromfield
 @item fromfield
 @*Type: Boolean.
 @*Default: True.
@@ -3719,6 +3743,7 @@ Unsetting this variable tells @command{mail} to obtain it from the
 
 @xref{datefield}.
 
+@kwindex header
 @item header
 @*Type: Boolean.
 @*Default: True, unless started with @option{--nosum} (@option{-N}) option.
@@ -3727,6 +3752,56 @@ Unsetting this variable tells @command{mail} to obtain it from the
 Whether to run @code{headers} command automatically after entering
 interactive mode.
 
+@kwindex headline
+@item headline
+@*Type: String
+@*Default: @samp{%>%a%4m %18f %16d %3l/%-5o %s}
+
+A format string to use for the header summary.  The @samp{%} character
+introduces a @dfn{format specifier}.  Valid format specifiers are:
+
+@multitable @columnfractions 0.2 0.8
+@headitem Letter @tab Meaning
+@item %a @tab Message attributes.
+@item %d @tab The date when the message was received.
+@item %f @tab The address of the message sender.
+@item %l @tab The number of lines of the message.
+@item %m @tab Message number.
+@item %o @tab The number of octets (bytes) in the message.
+@item %s @tab Message subject (if any).
+@item %S @tab Message subject (if any) in double quotes.
+@item %> @tab A @samp{>} for the current message, otherwise a space.
+@item %< @tab A @samp{<} for the current message, otherwise a space.
+@item %% @tab A `%' character.
+@end multitable
+
+Some additional symbols are allowed between @samp{%} and the specifier
+letter. The @samp{-} character immediately following @samp{%}
+indicates that this field should be left aligned. Similarly, the
+@samp{+} character indicates right alignment. Default alignment
+depends on the type of the specifier: the specifiers that produce
+numeric values (@samp{%l}, @samp{%m}, and @samp{%o}) are aligned to
+the right, whereas the ones producing string values are aligned to the
+left.
+
+A number following @samp{%} or the alignment flag, indicates the
+field width. Consider, for example, the following specifiers:
+
+@table @asis
+@item %m
+Print current message number. Take as much screen columns as necessary
+to output it.
+
+@item %4m
+@itemx %+4m
+Print current message number. Occupy 4 screen columns, truncate the
+output if it does not fit that width. Align the output to the right. 
+
+@item %-4m
+Same as above, but align to the left.
+@end table
+
+@kwindex hold
 @item hold
 @*Type: Boolean.
 @*Default: False.
@@ -3737,6 +3812,7 @@ user's mailbox (@file{$HOME/mbox}). Otherwise, they will be held in
 system mailbox also. This option is in effect only when operating
 upon user's system mailbox.
 
+@kwindex ignore 
 @item ignore
 @*Type: Boolean.
 @*Default: False.
@@ -3746,6 +3822,7 @@ When set to @code{True}, @command{mail} will ignore keyboard interrupts
 when composing messages. Otherwise an interrupt will be taken as a
 signal to abort composing.
 
+@kwindex ignoreeof
 @item ignoreeof
 @*Type: Boolean.
 @*Default: False.
@@ -3754,6 +3831,7 @@ signal to abort composing.
 Controls whether typing EOF character terminates the letter being
 composed.
 
+@kwindex indentprefix
 @item indentprefix
 @*Type: String.
 @*Default: "\t" (a tab character).
@@ -3761,6 +3839,7 @@ composed.
 
 String used by the @code{~m} tilde escape for indenting quoted messages.
 
+@kwindex inplacealiases
 @item inplacealiases
 @*Type: Boolean
 @*Default: False
@@ -3770,6 +3849,7 @@ before entering send mode (@pxref{Composing Mail}). By default, the
 address header fields are left intact while composing, the alias
 expansion takes place immediately before sending message.
 
+@kwindex keep
 @item keep
 @*Type: Boolean, Read-Only
 @*Default: True
@@ -3779,6 +3859,7 @@ Truncate the user's system mailbox when it is empty, instead of
 removing it. This is the default and cannot be changed. This variable
 exists only for compatibility with other @command{mailx} implementations.
 
+@kwindex keepsave
 @item keepsave
 @*Type: Boolean.
 @*Default: False.
@@ -3788,6 +3869,7 @@ Controls whether saved messages should be kept in system mailbox too.
 This variable is in effect only when operating upon a user's system
 mailbox.
 
+@kwindex mailx
 @item mailx
 @*Type: Boolean.
 @*Default: False.
@@ -3807,6 +3889,7 @@ will exit with zero status. By default it exits with zero status only
 if the message was sent successfully.
 @end itemize
 
+@kwindex metamail
 @item metamail
 @*Type: Boolean or String.
 @*Default: True.
@@ -3830,6 +3913,7 @@ set metamail
 set metamail="metamail -m mail -p"
 @end smallexample
 
+@kwindex mimenoask
 @item mimenoask
 @*Type: String
 @*Default: Empty
@@ -3850,6 +3934,7 @@ will disable prompting before displaying any textual files, no
 matter what their subtype is, and before displaying files with
 type @samp{image/jpeg}.
 
+@kwindex metoo
 @item metoo
 @*Type: Boolean.
 @*Default: False.
@@ -3859,6 +3944,7 @@ Usually, when an alias is expanded that contains the sender, the sender
 is removed from the expansion. Setting this option causes the sender to
 be included in the group.
 
+@kwindex mode
 @item mode
 @*Type: String, Read-Only
 @*Default: The name of current operation mode.
@@ -3888,6 +3974,7 @@ The program operates in send mode. This means it was given one or more
 recipient addresses in the command line.
 @end table
 
+@kwindex nullbody
 @item nullbody
 @* Type: Boolean
 @* Default: True
@@ -3912,6 +3999,7 @@ outputs something on its standard output or error:
 @end group
 @end smallexample
 
+@kwindex showenvelope
 @item showenvelope
 @*Type: Boolean
 @*Default: Unset
@@ -3919,6 +4007,7 @@ outputs something on its standard output or error:
 If this variable is set, the @code{print} command will include the
 @acronym{STMP} envelope in its output.
 
+@kwindex nullbodymsg
 @item nullbodymsg
 @*Type: String
 @*Default: Null message body; hope that's ok 
@@ -3930,6 +4019,7 @@ this text, in accordance with the current locale, is displayed.
 
 Unsetting this variable disables the warning.
 
+@kwindex onehop
 @item onehop
 @*Type: Boolean
 @*Default: Unset
@@ -3938,6 +4028,7 @@ Unsetting this variable disables the warning.
 This variable is not used.  It exists for compatibility with other
 @command{mailx} implementations and for future use.
 
+@kwindex outfolder
 @item outfolder
 @*Type: String.
 @*Default: Unset.
@@ -3947,6 +4038,7 @@ Contains the directory in which files created by @code{save},
 @code{write}, etc. commands will be stored. When unset, current
 directory is assumed.
 
+@kwindex page
 @item page
 @*Type: Boolean.
 @*Default: False.
@@ -3955,6 +4047,7 @@ directory is assumed.
 If set to @code{True}, the @code{pipe} command will emit a linefeed
 character after printing each message.
 
+@kwindex prompt
 @item prompt
 @*Type: String.
 @*Default: "? "
@@ -3962,6 +4055,7 @@ character after printing each message.
 
 Contains the command prompt sequence.
 
+@kwindex quiet
 @item quiet
 @*Type: Boolean
 @*Default: Unset
@@ -3970,6 +4064,7 @@ Contains the command prompt sequence.
 This variable is not used.  It exists for compatibility with other
 @command{mailx} implementations and for future use.
 
+@kwindex quit
 @item quit
 @*Type: Boolean.
 @*Default: False, unless started with @option{--quit} (@option{-q}) option.
@@ -3977,6 +4072,7 @@ This variable is not used.  It exists for compatibility with other
 
 When set, causes keyboard interrupts to terminate the program.
 
+@kwindex rc
 @item rc
 @*Type: Boolean.
 @*Default: True, unless started with @option{--norc} (@option{-N}) option.
@@ -3985,6 +4081,7 @@ When set, causes keyboard interrupts to terminate the program.
 When this variable is set, @command{mail} will read the system-wide
 configuration file upon startup. See @ref{Mail Configuration Files}.
 
+@kwindex readonly
 @item readonly
 @*Type: Boolean
 @*Default: False
@@ -3995,6 +4092,7 @@ When set, mailboxes are opened in readonly mode.  In this mode, any
 disabled.  These commands include, but are not limited to: 
 @code{delete}, @code{save} and @code{mbox}.
 
+@kwindex record
 @item record
 @*Type: String.
 @*Default: Unset.
@@ -4002,12 +4100,14 @@ disabled.  These commands include, but are not limited to:
 
 When set, any outgoing message will be saved to the named file.
 
+@kwindex recursivealiases
 @item recursivealiases
 @*Type: Boolean
 @*Default: True
 
 When set, @command{mail} will expand aliases recursively.
 
+@kwindex regex
 @item regex
 @*Type: Boolean.
 @*Default: True.
@@ -4016,6 +4116,7 @@ When set, @command{mail} will expand aliases recursively.
 Setting this to @code{True} enables use of regular expressions in
 @samp{/.../} message specifications.
 
+@kwindex replyprefix
 @item replyprefix
 @*Type: String
 @*Default: @samp{Re: }
@@ -4024,6 +4125,7 @@ Setting this to @code{True} enables use of regular expressions in
 Sets the prefix that will be used when constructing the subject line
 of a reply message.
 
+@kwindex replyregex
 @item replyregex
 @*Type: String
 @*Default: @samp{^re: *}
@@ -4045,6 +4147,7 @@ set replyregex="^(re|odp|aw|ang)(\\[[0-9]+\\])?:[[:blank:]]"
 @noindent
 (Notice the quoting of backslash characters).
 
+@kwindex save
 @item save
 @*Type: Boolean.
 @*Default: True.
@@ -4053,6 +4156,7 @@ set replyregex="^(re|odp|aw|ang)(\\[[0-9]+\\])?:[[:blank:]]"
 When set, the aborted messages will be stored in the user's
 @file{dead.file}. See also @code{appenddeadletter}.
 
+@kwindex screen
 @item screen
 @*Type: Numeric.
 @*Default: Detected at startup by querying the terminal device. If this
@@ -4061,6 +4165,7 @@ fails, the value of environment variable @code{LINES} is used.
 
 This variable contains the number of lines on terminal screen.
 
+@kwindex sendmail
 @item sendmail
 @*Type: String.
 @*Default: sendmail:/usr/lib/sendmail
@@ -4068,6 +4173,7 @@ This variable contains the number of lines on terminal screen.
 
 Contains URL of the mail transport agent.
 
+@kwindex sendwait
 @item sendwait
 @*Type: Boolean
 @*Default: Unset
@@ -4076,6 +4182,7 @@ Contains URL of the mail transport agent.
 This variable is not used.  It exists for compatibility with other
 @command{mailx} implementations and for future use.
 
+@kwindex showto
 @item showto
 @*Type: Boolean
 @*Default: False
@@ -4084,6 +4191,7 @@ This variable is not used.  It exists for compatibility with other
 If the message was sent by the user, print its recipient address in
 the header summary.
 
+@kwindex Sign
 @item Sign
 @*Type: String.
 @*Default: Unset.
@@ -4093,6 +4201,7 @@ Contains the filename holding users signature. The contents of this
 file is appended to the end of a message being composed by @code{~A}
 escape.
 
+@kwindex sign
 @item sign
 @*Type: String.
 @*Default: Unset.
@@ -4102,6 +4211,7 @@ Contains the user's signature. The contents of this variable is appended
 to the end of a message being composed by @code{~a} escape. Use
 @code{Sign} variable, if your signature occupies more than one line.
 
+@kwindex showto
 @item showto
 @*Type: Boolean
 @*Default: unset
@@ -4111,6 +4221,7 @@ If this variable is set, @command{mail} will show @code{To:} addresses
 instead of @code{From:} for all messages that come from the user that
 invoked the program.
 
+@kwindex subject
 @item subject
 @*Type: String.
 @*Default: Unset.
@@ -4119,6 +4230,7 @@ invoked the program.
 Contains default subject line. This will be used when @code{asksub} is
 off.
 
+@kwindex toplines
 @item toplines
 @*Type: Numeric.
 @*Default: 5
@@ -4126,6 +4238,7 @@ off.
 
 Number of lines to be displayed by @code{top} and @code{Top} commands.
 
+@kwindex variable-strict
 @item variable-strict
 @itemx varstrict
 @*Type: Boolean.
@@ -4138,6 +4251,7 @@ variables. Also, if the user is trying to set an unknown variable,
 
 @xref{Setting and Unsetting the Variables}.
 
+@kwindex variable-pretty-print
 @item variable-pretty-print
 @itemx varpp
 @*Type: Boolean.
@@ -4146,6 +4260,7 @@ variables. Also, if the user is trying to set an unknown variable,
 If this variable is set, the listing ouput by @command{set} contains short
 descriptions before each variable. @xref{Setting and Unsetting the Variables}. 
 
+@kwindex verbose
 @item verbose
 @*Type: Boolean.
 @*Default: False.
@@ -4153,6 +4268,7 @@ descriptions before each variable. @xref{Setting and Unsetting the Variables}.
 
 When set, the actual delivery of messages is displayed on the user's terminal.
 
+@kwindex xmailer
 @item xmailer
 @*Type: Boolean.
 @*Default: Set.
diff --git a/mail/from.c b/mail/from.c
index add2643..31e2a92 100644
--- a/mail/from.c
+++ b/mail/from.c
@@ -18,27 +18,220 @@
    MA 02110-1301 USA */
 
 #include "mail.h"
+#include <mu_umaxtostr.h>
 
-/*
- * f[rom] [msglist]
- */
+#define ALIGN_UNDEF -1
+#define ALIGN_RIGHT 0
+#define ALIGN_LEFT  1
 
-int
-mail_from0 (msgset_t *mspec, mu_message_t msg, void *data)
+struct header_call_args
+{
+  msgset_t *mspec;
+  mu_message_t msg;
+  size_t cols_rest;
+  char *buf;
+  size_t size;
+};
+  
+struct header_segm
+{
+  struct header_segm *next;
+  int align;
+  size_t width;
+  void *data;
+  char *(*get) (struct header_call_args *args, void *data);
+};
+
+void
+header_ensure_space (struct header_call_args *args, size_t size)
+{
+  if (size > args->size)
+    {
+      args->buf = xrealloc (args->buf, size);
+      args->size = size;
+    }
+}
+
+static char *
+header_buf_string_len (struct header_call_args *args, const char *str,
+		       size_t len)
+{
+  header_ensure_space (args, len + 1);
+  memcpy (args->buf, str, len);
+  args->buf[len] = 0;
+  return args->buf;
+}
+
+static char *
+header_buf_string (struct header_call_args *args, const char *str)
+{
+  if (!str)
+    return header_buf_string_len (args, "", 0);
+  return header_buf_string_len (args, str, strlen (str));
+}
+
+static void
+format_pad (size_t n)
+{
+  for (; n; n--)
+    fputc (' ', ofile);
+}
+
+static void
+format_headline (struct header_segm *seg, msgset_t *mspec, mu_message_t msg)
+{
+  int screen_cols = util_getcols () - 2;
+  int out_cols = 0;
+  struct header_call_args args;
+
+  args.mspec = mspec;
+  args.msg = msg;
+  args.buf = NULL;
+  args.size = 0;
+  
+  for (; seg; seg = seg->next)
+    {
+      size_t width, len;
+      size_t cols_rest = screen_cols - out_cols;
+      char *p;
+
+      args.cols_rest = cols_rest;
+      p = seg->get (&args, seg->data);
+
+      if (!p)
+	p = "";
+      len = strlen (p);
+      
+      if (seg->width)
+	width = seg->width;
+      else
+	width = len;
+      if (width > cols_rest)
+	width = cols_rest;
+
+      if (len > width)
+	len = width;
+      
+      if (seg->align == ALIGN_RIGHT)
+	{
+	  format_pad (width - len);
+	  fprintf (ofile, "%*.*s", len, len, p);
+	}
+      else
+	{
+	  fprintf (ofile, "%*.*s", len, len, p);
+	  format_pad (width - len);
+	}
+      out_cols += width;
+    }
+
+  fprintf (ofile, "\n");
+  free (args.buf);
+}    
+
+static void
+free_headline (struct header_segm *seg)
+{
+  while (seg)
+    {
+      struct header_segm *next = seg->next;
+      if (seg->data)
+	free (seg->data);
+      free (seg);
+      seg = next;
+    }
+}
+
+
+static char *
+hdr_text (struct header_call_args *args, void *data)
+{
+  return data;
+}
+
+static char *
+hdr_cur (struct header_call_args *args, void *data)
+{
+  if (is_current_message (args->mspec->msg_part[0]))
+    return (char*) data;
+  return " ";
+}
+
+/* %a */
+static char *
+hdr_attr (struct header_call_args *args, void *data)
 {
-  mu_header_t hdr = NULL;
-  mu_envelope_t env;
   mu_attribute_t attr;
-  char *from = NULL, *subj = NULL, *fromp, *subjp;
-  int froml, subjl;
-  char date[80], st[10];
-  int cols = util_getcols () - 6;
-  int cflag;
-  size_t m_size = 0, m_lines = 0;
+  char cflag;
+  
+  mu_message_get_attribute (args->msg, &attr);
+  
+  if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_MBOXED))
+    cflag = 'M';
+  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_PRESERVED))
+    cflag = 'P';
+  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SAVED))
+    cflag = '*';
+  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED))
+    cflag = 'T';
+  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SHOWN))
+    cflag = 'R';
+  else if (mu_attribute_is_recent (attr))
+    cflag = 'N';
+  else if (!mu_attribute_is_read (attr))
+    cflag = 'U';
+  else
+    cflag = ' ';
+  return header_buf_string_len (args, &cflag, 1);
+}
+    
+/* %d */
+static char *
+hdr_date (struct header_call_args *args, void *data)
+{
+  char date[80];
+  mu_header_t hdr;
 
+  mu_message_get_header (args->msg, &hdr);
+  
+  date[0] = 0;
+  if (mailvar_get (NULL, "datefield", mailvar_type_boolean, 0) == 0
+      && mu_header_get_value (hdr, MU_HEADER_DATE,
+			      date, sizeof (date), NULL) == 0)
+    {
+      time_t t;
+      if (mu_parse_date (date, &t, NULL) == 0)
+	strftime (date, sizeof(date), "%a %b %e %H:%M", localtime (&t));
+      else
+	date[0] = 0;
+    }
+
+  if (date[0] == 0)
+    {
+      const char *p;
+      struct tm tm;
+      mu_timezone tz;
+      mu_envelope_t env;
+      
+      mu_message_get_envelope (args->msg, &env);
+      if (mu_envelope_sget_date (env, &p) == 0
+          && mu_parse_ctime_date_time (&p, &tm, &tz) == 0)
+	strftime (date, sizeof(date), "%a %b %e %H:%M", &tm);
+    }
+  return header_buf_string (args, date);
+}
+
+/* %f */
+static char *
+hdr_from (struct header_call_args *args, void *data)
+{
+  char *from = NULL;
+  
   if (mailvar_get (NULL, "fromfield", mailvar_type_boolean, 0) == 0)
     {  
-      mu_message_get_header (msg, &hdr);
+      mu_header_t hdr;
+      
+      mu_message_get_header (args->msg, &hdr);
       if (mu_header_aget_value_unfold (hdr, MU_HEADER_FROM, &from) == 0)
 	{
 	  mu_address_t address = NULL;
@@ -49,7 +242,8 @@ mail_from0 (msgset_t *mspec, mu_message_t msg, void *data)
 	  
 	      if (mu_address_sget_email (address, 1, &email) == 0)
 		{
-		  if (mailvar_get (NULL, "showto", mailvar_type_boolean, 0) == 0
+		  if (mailvar_get (NULL, "showto",
+				   mailvar_type_boolean, 0) == 0
 		      && mail_is_my_name (email))
 		    {
 		      char *tmp;
@@ -86,87 +280,263 @@ mail_from0 (msgset_t *mspec, mu_message_t msg, void *data)
       mu_envelope_t env = NULL;
       const char *sender = "";
       
-      if (mu_message_get_envelope (msg, &env) == 0)
+      if (mu_message_get_envelope (args->msg, &env) == 0)
 	mu_envelope_sget_sender (env, &sender);
       from = strdup (sender);
     }
 
+  header_buf_string (args, from);
+  free (from);
+  return args->buf;
+}
+
+/* %l */
+static char *
+hdr_lines (struct header_call_args *args, void *data)
+{
+  size_t m_lines;
+  char buf[UINTMAX_STRSIZE_BOUND];
+  mu_message_lines (args->msg, &m_lines);
+  
+  return header_buf_string (args, umaxtostr (m_lines, buf));
+}
+
+/* %m */
+static char *
+hdr_number (struct header_call_args *args, void *data)
+{
+  char buf[UINTMAX_STRSIZE_BOUND];
+  return header_buf_string (args, umaxtostr (args->mspec->msg_part[0], buf));
+}
+
+/* %o */
+static char *
+hdr_size (struct header_call_args *args, void *data)
+{
+  size_t m_size;
+  char buf[UINTMAX_STRSIZE_BOUND];
+  mu_message_size (args->msg, &m_size);
+  
+  return header_buf_string (args, umaxtostr (m_size, buf));
+}
+
+/* %s */
+static char *
+hdr_subject (struct header_call_args *args, void *data)
+{
+  mu_header_t hdr;
+  char *subj = NULL;
+  
+  mu_message_get_header (args->msg, &hdr);
   mu_header_aget_value_unfold (hdr, MU_HEADER_SUBJECT, &subj);
   util_rfc2047_decode (&subj);
   
-  mu_message_get_attribute (msg, &attr);
+  header_buf_string (args, subj);
+  free (subj);
+  return args->buf;
+}
+
+/* %S */
+static char *
+hdr_q_subject (struct header_call_args *args, void *data)
+{
+  mu_header_t hdr;
+  char *subj = NULL;
+  size_t len;
+
+  if (args->cols_rest <= 2)
+    return "\"\"";
   
-  if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_MBOXED))
-    cflag = 'M';
-  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_PRESERVED))
-    cflag = 'P';
-  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SAVED))
-    cflag = '*';
-  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_TAGGED))
-    cflag = 'T';
-  else if (mu_attribute_is_userflag (attr, MAIL_ATTRIBUTE_SHOWN))
-    cflag = 'R';
-  else if (mu_attribute_is_recent (attr))
-    cflag = 'N';
-  else if (!mu_attribute_is_read (attr))
-    cflag = 'U';
-  else
-    cflag = ' ';
+  mu_message_get_header (args->msg, &hdr);
+  mu_header_aget_value_unfold (hdr, MU_HEADER_SUBJECT, &subj);
+  if (!subj)
+    return "";
+  util_rfc2047_decode (&subj);
 
-  date[0] = 0;
-  if (mailvar_get (NULL, "datefield", mailvar_type_boolean, 0) == 0
-      && mu_header_get_value (hdr, MU_HEADER_DATE, date, sizeof (date), NULL) == 0)
+  len = strlen (subj);
+  if (len + 2 > args->cols_rest)
+    len = args->cols_rest - 2;
+  header_ensure_space (args, len + 3);
+  args->buf[0] = '"';
+  memcpy (args->buf + 1, subj, len);
+  args->buf[len+1] = '"';
+  args->buf[len+2] = 0;
+  free (subj);
+  return args->buf;
+}
+
+
+static struct header_segm *
+new_header_segment (int align, size_t width,
+		    void *data,
+		    char *(*get) (struct header_call_args *, void *))
+{
+  struct header_segm *seg = xmalloc (sizeof (*seg));
+  seg->next = NULL;
+  seg->align = align;
+  seg->width = width;
+  seg->data = data;
+  seg->get = get;
+  return seg;
+}
+
+struct header_segm *
+compile_headline (const char *str)
+{
+  struct header_segm *head = NULL, *tail = NULL;
+  char *text;
+  int align;
+  size_t width;
+  
+#define ALIGN_STRING (align == ALIGN_UNDEF ? ALIGN_LEFT : ALIGN_RIGHT)
+#define ALIGN_NUMBER (align == ALIGN_UNDEF ? ALIGN_RIGHT : ALIGN_LEFT)
+#define ATTACH(p)				\
+  do						\
+    {						\
+      if (!head)				\
+	head = p;				\
+      else					\
+	tail->next = p;				\
+      tail = p;					\
+    }						\
+  while (0)
+      
+  while (*str)
     {
-      time_t t;
-      if (mu_parse_date (date, &t, NULL) == 0)
+      struct header_segm *seg;
+      size_t len;
+      char *p = strchr (str, '%');
+      if (!p)
+	len = strlen (str);
+      else
+	len = p - str;
+      if (len)
 	{
-	  strftime (date, sizeof(date), "%a %b %e %H:%M", localtime (&t));
+	  text = xmalloc (len + 1);
+	  memcpy (text, str, len);
+	  text[len] = 0;
+	  seg = new_header_segment (ALIGN_LEFT, 0, text, hdr_text);
+	  ATTACH (seg);
+	}
+      if (!p)
+	break;
+
+      str = ++p;
+
+      if (*str == '-')
+	{
+	  str++;
+	  align = ALIGN_LEFT;
+	}
+      else if (*str == '+')
+	{
+	  str++;
+	  align = ALIGN_RIGHT;
 	}
       else
-	date[0] = 0;
-    }
+	align = ALIGN_UNDEF;
+      
+      if (mu_isdigit (*str))
+	width = strtoul (str, (char**)&str, 10);
+      else
+	width = 0;
 
-  if (date[0] == 0)
-    {
-      const char *p;
-      struct tm tm;
-      mu_timezone tz;
+      switch (*str++)
+	{
+	case '%':
+	  seg = new_header_segment (ALIGN_LEFT, 0, xstrdup ("%"), hdr_text);
+	  break;
+	  
+	case 'a': /* Message attributes. */
+	  seg = new_header_segment (ALIGN_STRING, width, NULL, hdr_attr);
+	  break;
 
-      mu_message_get_envelope (msg, &env);
-      if (mu_envelope_sget_date (env, &p) == 0
-          && mu_parse_ctime_date_time (&p, &tm, &tz) == 0)
-	strftime (date, sizeof(date), "%a %b %e %H:%M", &tm);
+	  /* FIXME: %c    The score of the message. */
+	  
+	case 'd': /* Message date */
+	  seg = new_header_segment (ALIGN_STRING, width, NULL, hdr_date);
+	  break;
+	  
+	  /* FIXME: %e    The indenting level in threaded mode. */
+	  
+	case 'f': /* Message sender */
+	  seg = new_header_segment (ALIGN_STRING, width, NULL, hdr_from);
+	  break;
+
+	  /* FIXME: %i    The message thread structure. */
+	  
+	case 'l': /* The number of lines of the message */
+	  seg = new_header_segment (ALIGN_NUMBER, width, NULL, hdr_lines);
+	  break;
+	  
+	case 'm': /* Message number */
+	  seg = new_header_segment (ALIGN_NUMBER, width, NULL, hdr_number);
+	  break;
+	  
+	case 'o': /* The number of octets (bytes) in the message */
+	  seg = new_header_segment (ALIGN_NUMBER, width, NULL, hdr_size);
+	  break;
+	  
+	case 's': /* Message subject (if any) */
+	  seg = new_header_segment (ALIGN_STRING, width, NULL, hdr_subject);
+	  break;
+
+	case 'S': /* Message subject (if any) in double quotes */
+	  seg = new_header_segment (ALIGN_STRING, width, NULL, hdr_q_subject);
+	  break;
+	  
+	  /* FIXME: %t    The position in threaded/sorted order. */
+	  
+	case '>': /* A `>' for the current message, otherwise ` ' */
+	  seg = new_header_segment (ALIGN_STRING, width, xstrdup (">"), hdr_cur);
+	  break;
+	  
+	case '<': /* A `<' for the current message, otherwise ` ' */
+	  seg = new_header_segment (ALIGN_STRING, width, xstrdup ("<"), hdr_cur);
+	  break;
+
+	default:
+	  mu_error (_("unknown escape: %%%c"), str[-1]);
+	  len = str - p;
+	  text = xmalloc (len);
+	  memcpy (text, p, len-1);
+	  text[len-1] = 0;
+	  seg = new_header_segment (ALIGN_STRING, width, text, hdr_text);
+	}
+      ATTACH (seg);
     }
-  
-  mu_message_size (msg, &m_size);
-  mu_message_lines (msg, &m_lines);
-  
-  snprintf (st, sizeof (st), "%3d/%-5d", m_lines, m_size);
-  
-  /* The "From" field will take a third of the screen.
-     Subject will take the rest.
-     FIXME: This is not quite correct that we use fixed sizes
-     18, 16 for the other fields.
-  */
-  froml = cols / 3;
-  subjl = cols - froml - strlen (st) - 16;
-  
-  fromp = from ? from : "";
-  subjp = subj ? subj : fromp;
-  fprintf (ofile, "%c%c%4d %-18.18s %-16.16s %s %.*s\n",
-	   is_current_message (mspec->msg_part[0]) ? '>' : ' ', cflag,
-	   mspec->msg_part[0],
-	   fromp, date, st, (subjl < 0) ? 0 : subjl, subjp);
-  
-  free (from);
-  free (subj);
+  return head;
+#undef ALIGN_STRING
+#undef ALIGN_NUMBER
+#undef ATTACH
+}
+
+/* FIXME: Should it be part of struct mailvar_variable for "headline"? */
+static struct header_segm *mail_header_line;
+
+void
+mail_compile_headline (struct mailvar_variable *var)
+{
+  free_headline (mail_header_line);
+  mail_header_line = compile_headline (var->value.string);
+}
+
+
+/*
+ * f[rom] [msglist]
+ */
 
+int
+mail_from0 (msgset_t *mspec, mu_message_t msg, void *data)
+{
+  format_headline (mail_header_line, mspec, msg);
   return 0;
 }
 
 int
 mail_from (int argc, char **argv)
 {
-  return util_foreach_msg (argc, argv, MSG_NODELETED|MSG_SILENT, mail_from0, NULL);
+  return util_foreach_msg (argc, argv, MSG_NODELETED|MSG_SILENT,
+			   mail_from0, NULL);
 }
 
diff --git a/mail/mail.c b/mail/mail.c
index d633b03..805b0e3 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -287,6 +287,7 @@ static char *default_setup[] = {
   "set recursivealiases",
   "set noinplacealiases",
   "set fromfield",
+  "set headline=\"%>%a%4m %18f %16d %3l/%-5o %s\"",
   
   /* Start in mail reading mode */
   "setq mode=read",
@@ -364,7 +365,7 @@ main (int argc, char **argv)
 
   /* set defaults for execution */
   for (i = 0; i < sizeof (default_setup)/sizeof (default_setup[0]); i++)
-    util_do_command (default_setup[i]);
+    util_do_command ("%s", default_setup[i]);
   util_do_command ("set screen=%d", util_getlines ());
   util_do_command ("set columns=%d", util_getcols ());
   
diff --git a/mail/mail.h b/mail/mail.h
index a600d46..7eeb600 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -45,11 +45,7 @@
 #endif
 #include <sys/wait.h>
 #include <sys/types.h>
-#ifdef HAVE_STDARG_H
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
 #include <signal.h>
 
 #include <confpaths.h>
@@ -200,6 +196,8 @@ extern int mail_folders (int argc, char **argv);
 extern int mail_followup (int argc, char **argv);
 extern int mail_from (int argc, char **argv);
 extern int mail_from0 (msgset_t *mspec, mu_message_t msg, void *data);
+extern void mail_compile_headline (struct mailvar_variable *var);
+
 extern int mail_headers (int argc, char **argv);
 extern int mail_hold (int argc, char **argv);
 extern int mail_help (int argc, char **argv);
diff --git a/mail/mailvar.c b/mail/mailvar.c
index d101ec8..e5cc5ce 100644
--- a/mail/mailvar.c
+++ b/mail/mailvar.c
@@ -130,6 +130,10 @@ struct mailvar_symbol mailvar_tab[] =
     { { "header", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
       N_("run the `headers' command after entering interactive mode") },
+    { { "headline", },
+      MAILVAR_TYPEMASK (mailvar_type_string),
+      N_("format string to use for the header summary"),
+      mail_compile_headline },
     { { "hold", },
       MAILVAR_TYPEMASK (mailvar_type_boolean),
       N_("hold the read or saved messages in the system mailbox") },
diff --git a/mail/util.c b/mail/util.c
index 95ec9b6..2f485ca 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -468,7 +468,7 @@ util_get_homedir ()
 char *
 util_fullpath (const char *inpath)
 {
-  return mu_tilde_expansion(inpath, "/", NULL);
+  return mu_tilde_expansion (inpath, "/", NULL);
 }
 
 char *
@@ -661,7 +661,7 @@ util_slist_to_string (mu_list_t list, const char *delim)
 }
 
 void
-util_strcat(char **dest, const char *str)
+util_strcat (char **dest, const char *str)
 {
   if (!*dest)
     *dest = strdup (str);
@@ -754,26 +754,13 @@ util_save_outgoing (mu_message_t msg, char *savefile)
     }
 }
 
-#ifdef HAVE_STDARG_H
 void
 util_error (const char *format, ...)
-#else
-void
-util_error (va_alist)
-     va_dcl
-#endif
 {
   va_list ap;
 
-#ifdef HAVE_STDARG_H
-  va_start(ap, format);
-#else
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-#endif
-
+  va_start (ap, format);
+  
   vfprintf (stderr, format, ap);
   fprintf (stderr, "\n");
 


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Fri Aug 14 17:01:31 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mc3tz-00084P-5t
	for mharc-commit-mailutils@gnu.org; Fri, 14 Aug 2009 17:01:31 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mc3tx-00083w-2u
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 17:01:29 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mc3tu-00083T-DN
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 17:01:27 -0400
Received: from [199.232.76.173] (port=53320 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mc3tu-00083O-9v
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 17:01:26 -0400
Received: from savannah.gnu.org ([199.232.41.3]:60183 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mc3tt-0007ZV-1f
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 17:01:25 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mc3tq-0008SQ-Mc
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 21:01:22 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mc3tq-0008Rt-Bo
	for commit-mailutils@gnu.org; Fri, 14 Aug 2009 21:01:22 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9b0dee5fa917d5804aa2ca89a186ea8da64578ca
X-Git-Newrev: 1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87
Message-Id: <E1Mc3tq-0008Rt-Bo@cvs.savannah.gnu.org>
Date: Fri, 14 Aug 2009 21:01:22 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-324-g1c0ee63
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Aug 2009 21:01: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=1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87

The branch, master has been updated
       via  1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87 (commit)
      from  9b0dee5fa917d5804aa2ca89a186ea8da64578ca (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 1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Sat Aug 15 00:01:17 2009 +0300

    Mail: bugfixes.
    
    * mail/file.c: Use "headers" instead of non-standard "z."
    * mail/mail.c: Avoid % interpretation in
    the argument to util_cache_command.
    * mail/util.c (_run_and_free): Avoid % interpretation in
    the argument to util_do_command.

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

Summary of changes:
 mail/file.c |    2 +-
 mail/mail.c |    4 ++--
 mail/util.c |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mail/file.c b/mail/file.c
index 803bb86..e565878 100644
--- a/mail/file.c
+++ b/mail/file.c
@@ -121,7 +121,7 @@ mail_file (int argc, char **argv)
       if (mailvar_get (NULL, "header", mailvar_type_boolean, 0) == 0)
 	{
 	  util_do_command ("summary");
-	  util_do_command ("z.");
+	  util_do_command ("headers");
 	}
       return 0;
     }
diff --git a/mail/mail.c b/mail/mail.c
index 805b0e3..fbc08a2 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -137,7 +137,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       break;
 
     case 'E':
-      util_cache_command (&command_list, arg);
+      util_cache_command (&command_list, "%s", arg);
       break;
       
     case 'F':
@@ -499,7 +499,7 @@ main (int argc, char **argv)
       if (mailvar_get (NULL, "header", mailvar_type_boolean, 0) == 0)
 	{
 	  util_do_command ("summary");
-	  util_do_command ("z.");
+	  util_do_command ("headers");
 	}
 
       mailvar_get (&prompt, "prompt", mailvar_type_string, 0);
diff --git a/mail/util.c b/mail/util.c
index 2f485ca..d2f342e 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -1068,7 +1068,7 @@ util_cache_command (mu_list_t *list, const char *fmt, ...)
 static int
 _run_and_free (void *item, void *data)
 {
-  util_do_command ((char *) item);
+  util_do_command ("%s", (char *) item);
   free (item);
   return 0;
 }


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 20 16:40:06 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeEQY-00050Q-9l
	for mharc-commit-mailutils@gnu.org; Thu, 20 Aug 2009 16:40:06 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeEQW-0004yT-LZ
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 16:40:04 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeEQW-0004xa-3k
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 16:40:04 -0400
Received: from [199.232.76.173] (port=46560 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeEQV-0004x6-Ci
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 16:40:03 -0400
Received: from savannah.gnu.org ([199.232.41.3]:55255 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MeEQU-0003Y7-Sm
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 16:40:03 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MeEQT-00077u-Sq
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 20:40:01 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MeEQS-00076s-8x
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 20:40:01 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87
X-Git-Newrev: b9aaf724c6428fb4e0d01950d4d7113671e048e5
Message-Id: <E1MeEQS-00076s-8x@cvs.savannah.gnu.org>
Date: Thu, 20 Aug 2009 20:40:00 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-326-gb9aaf72
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 20:40:05 -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=b9aaf724c6428fb4e0d01950d4d7113671e048e5

The branch, master has been updated
       via  b9aaf724c6428fb4e0d01950d4d7113671e048e5 (commit)
       via  811b38863c06207ab3012c586176a113c1f8def1 (commit)
      from  1c0ee63834fc729e6ed49fcfa6965d8a7cc88f87 (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 b9aaf724c6428fb4e0d01950d4d7113671e048e5
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 20 23:39:45 2009 +0300

    Movemail: allow to copy mailbox ownership when run as root.
    
    * movemail/movemail.c: Implement new configuration keyword
    "mailbox-ownership" (and the --owner command line option).
    * doc/texinfo/programs.texi: Document new movemail features.
    (Ownership): New subsection stub.
    * NEWS: Update

commit 811b38863c06207ab3012c586176a113c1f8def1
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 20 23:34:47 2009 +0300

    Fix in configure.ac
    
    * configure.ac: Use PATH_MAILDIR (without leading underscore).

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

Summary of changes:
 NEWS                      |    6 +-
 configure.ac              |    2 +-
 doc/texinfo/programs.texi |  119 +++++----------
 movemail/movemail.c       |  369 ++++++++++++++++++++++++++++++++++++++-------
 4 files changed, 361 insertions(+), 135 deletions(-)

diff --git a/NEWS b/NEWS
index ed4a90e..43b4403 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU mailutils NEWS -- history of user-visible changes. 2009-08-14
+GNU mailutils NEWS -- history of user-visible changes. 2009-08-20
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 
 2008, 2009 Free Software Foundation, Inc.
 See the end of file for copying conditions.
@@ -27,6 +27,10 @@ exists in the destination mailbox.
 The `--verbose' command line option enables outputting additional
 information.
 
+The `--owner' command line option (and the corresponding
+`mailbox-ownership' configuration file statement) copy mailbox
+ownership, if the utility is run with root privileges.
+
 * Mail
 
 ** The -f option
diff --git a/configure.ac b/configure.ac
index 0258618..f852b92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,7 +335,7 @@ AH_BOTTOM(
 #ifdef MU_CONF_MAILDIR
 # define MU_PATH_MAILDIR MU_CONF_MAILDIR
 #else
-# define MU_PATH_MAILDIR _PATH_MAILDIR "/"
+# define MU_PATH_MAILDIR PATH_MAILDIR "/"
 #endif])
 
 use_dbm=no
diff --git a/doc/texinfo/programs.texi b/doc/texinfo/programs.texi
index 4135911..5cf7ef2 100644
--- a/doc/texinfo/programs.texi
+++ b/doc/texinfo/programs.texi
@@ -4371,13 +4371,15 @@ description of @code{Rmail} interface.
 
 Mailutils version of @command{movemail} is completely
 backward-compatible with its Emacs predecessor, so it should run
-flawlessly with older versions of Emacs. Emacs version 21.4, which is
-being developed at the time of this writing, will contain improved
-@code{Rmail} interface for work with mailutils @command{movemail}.
+flawlessly with older versions of Emacs. Emacs versions
+starting from 22.1 contain improved @code{Rmail} interface and
+are able to take advantage of all new features mailutils
+@command{movemail} provides.
 
 @menu
 * Movemail Configuration::
 * Movemail Options::     Description of the Available Options
+* Ownership::            Setting Destination Mailbox Ownership
 * Summary::              Short Movemail Invocation Summary
 @end menu
 
@@ -4408,6 +4410,31 @@ exists in the destination mailbox.
 Set verbosity level.
 @end deffn
 
+@deffn {Movemail Config} mailbox-ownership @var{method-list}
+Define list of methods for setting ownership of the destination
+mailbox.  The @var{method-list} argument can contain the following
+elements:
+
+@anchor{mailbox-ownership-methods}
+@table @asis
+@item copy-id
+Copy owner UID and GID from the source mailbox. This method works only
+with local mailboxes, i.e.: @samp{mbox} (UNIX mailbox), @samp{maildir}
+and @samp{mh}.
+
+@item copy-name
+Get owner name from the source mailbox URL and obtain UID and GID for
+this user using mailutils authorization methods.
+
+@item set-id=@var{uid}[:@var{gid}]
+Set supplied @var{uid} and @var{gid}. If @var{gid} is not supplied,
+it is read from the @file{/etc/passwd} record for this UID.
+
+@item set-name=@var{user}
+Make destination mailbox owned by @var{user}.
+@end table
+@end deffn
+
 @multitable @columnfractions 0.3 0.6
 @headitem Statement @tab Reference
 @item debug         @tab @xref{Debug Statement}.
@@ -4439,58 +4466,13 @@ If the remote server supports @acronym{TLS} encryption, use
 @option{--tls} to instruct @command{movemail} to initiate encrypted
 connection.
 
-Quite a few options control how @command{movemail} handles mail
-locking (a way of preventing simultaneous access to the source
-mailbox). By default, before accessing mailbox @var{file},
-@command{movemail} will first see if the file named
-@file{@var{file}.lock} (so called @dfn{lock file}) exists. If so, it
-will assume that the mailbox is being used by another program and will
-sleep one second. If @file{@var{file}.lock} file disappears after this
-wait period, the program will proceed. Otherwise, it will repeat this
-action ten times. If after ten wait periods the lock file does not
-disappear, @command{movemail} gives up and exits.
-
-If the lock file does not exist, @command{movemail} will create it,
-thereby indicating to other programs that the mailbox is being used,
-and will proceed to copying messages to the destination file. When
-finished, @command{movemail} closes the mailbox and removes the lock
-file.
-
-Several options control this behavior. To change the default sleep period
-use @option{--lock-retry-timeout}. Its argument is the timeout value
-in seconds.
-
-To change number of retries, use @option{--lock-retry-count}. For
-example, setting @code{rmail-movemail-flags} to
-
-@smallexample
---lock-retry-timeout=2 --lock-retry-count=5
-@end smallexample
-
-@noindent
-instructs @command{movemail} to make five attempts to acquire the lock
-file, with two-second intervals between the attempts.
-
-You may also force @command{movemail} to remove the lock file if it is
-older than a given amount of time (a so called @dfn{stale lock
-file}). To do so, use the following option:
-
-@smallexample
---lock-expire-timeout=@var{seconds}
-@end smallexample
-
-The @option{--lock-expire-timeout} sets the number of seconds after
-which a lock file is considered stale.
+@node Ownership
+@subsection Setting Destination Mailbox Ownership
+@UNREVISED
 
-There are special programs that can be used to lock and unlock
-mailboxes. A common example of such programs is @command{dotlock}. If
-you wish to use such @dfn{external locking program} instead of the
-default mailutils locking mechanism, use option
-@option{--external-locker}. Argument to this option specifies the full
-name of the external program to use.
 
 @node Summary
-@subsection Summary of Movemail Usage
+@subsection Movemail Usage Summary
 
 @smallexample
 movemail [@var{option}...] @var{inbox} @var{destfile} [@var{remote-password}]
@@ -4500,7 +4482,7 @@ The first argument, @var{inbox}, is the @acronym{url} (@pxref{URL}) of
 the source mailbox. The second argument, @var{destfile}, traditionally
 means destination file, i.e. the UNIX mailbox to copy messages
 to. However, mailutils @command{movemail} extends the meaning of this
-parameter. You may actually specify any valid @acronym{url} as
+parameter. You may actually specify any valid @acronym{URL} as
 @var{destfile} parameter.@footnote{Rmail does not use this
 feature}. Finally, optional third argument is a traditional way of
 specifying user passwords for remote (@acronym{POP} or @acronym{IMAP})
@@ -4521,30 +4503,6 @@ Preserve the source mailbox
 @itemx --reverse
 Reverse the sorting order
 
-@item --external-locker=@var{program}
-Use given @var{program} as the external locker program.
-
-@item --lock-expire-timeout=@var{seconds}
-Set number of seconds after which the lock expires
-
-@item --lock-flags=@var{flags}
-Set locker flags. @var{flags} is composed of the following letters:
-@samp{E} -- use external locker program @command{dotlock},
-@samp{R} -- retry 10 times if acquiring of the lock failed (see also
-@option{--lock-retry-count} below), @samp{T} -- remove stale locks
-after 10 minutes (see also @option{--lock-expire-timeout},
-and @samp{P} -- write process @acronym{PID} to the lock file.
-
-@item --lock-retry-count=@var{number}
-Set the maximum number of times to retry acquiring the lockfile
-
-@item --lock-retry-timeout=@var{seconds}
-Set timeout for acquiring the lockfile
-
-@item -m @var{url}
-@itemx --mail-spool @var{URL}
-Use specified URL as a mailspool directory
-
 @item --tls[=@var{bool}]
 Enable (default) or disable TLS support
 
@@ -4552,6 +4510,13 @@ Enable (default) or disable TLS support
 @item --uidl
 Use UIDLs to avoid downloading the same message twice.
 
+@item -P @var{method-list}
+@itemx --owner=@var{method-list}
+Define list of methods for setting ownership of the destination
+mailbox. @xref{mailbox-ownership-methods}, for a description of
+@var{method-list}. This option is useful only when running
+@command{movemail} as root.
+
 @item -v
 @item --verbose
 Increase verbosity level.
diff --git a/movemail/movemail.c b/movemail/movemail.c
index bacfd40..99dc5b0 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <pwd.h>
 #include <grp.h>
 #include <unistd.h>
 #include <mailutils/mailutils.h>
@@ -39,30 +40,74 @@ static char args_doc[] = N_("inbox-url destfile [POP-password]");
 #define OPT_EMACS 256
 
 static struct argp_option options[] = {
-  { "preserve", 'p', NULL, 0, N_("Preserve the source mailbox"), 0 },
+  { "preserve", 'p', NULL, 0, N_("Preserve the source mailbox") },
   { "keep-messages", 0, NULL, OPTION_ALIAS, NULL },
-  { "reverse",  'r', NULL, 0, N_("Reverse the sorting order"), 0 },
+  { "reverse",  'r', NULL, 0, N_("Reverse the sorting order") },
   { "emacs", OPT_EMACS, NULL, 0,
-    N_("Output information used by Emacs rmail interface"), 0 },
-  { "copy-permissions", 'P', NULL, 0,
-    N_("Copy original mailbox permissions and ownership when applicable"),
-    0 },
+    N_("Output information used by Emacs rmail interface") },
   { "uidl", 'u', NULL, 0,
-    N_("Use UIDLs to avoid downloading the same message twice"),
-    0 },
+    N_("Use UIDLs to avoid downloading the same message twice") },
   { "verbose", 'v', NULL, 0,
-    N_("Increase verbosity level"),
-    0 },
+    N_("Increase verbosity level") },
+  { "owner", 'P', N_("MODELIST"), 0,
+    N_("Control mailbox ownership") },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
 static int reverse_order;
 static int preserve_mail; 
 static int emacs_mode;
-static int copy_meta;
 static int uidl_option;
 static int verbose_option;
 
+enum set_ownership_mode
+  {
+    copy_owner_id,
+    copy_owner_name,
+    set_owner_id,
+    set_owner_name
+  };
+#define SET_OWNERSHIP_MAX 4
+
+struct user_id
+{
+  uid_t uid;
+  gid_t gid;
+};
+
+struct set_ownership_method
+{
+  enum set_ownership_mode mode;
+  union
+  {
+    char *name;
+    struct user_id id;
+  } owner;
+};
+
+static struct set_ownership_method so_methods[SET_OWNERSHIP_MAX];
+static int so_method_num;
+
+struct set_ownership_method *
+get_next_so_method ()
+{
+  if (so_method_num == MU_ARRAY_SIZE (so_methods))
+    {
+      mu_error (_("ownership method table overflow"));
+      exit (1);
+    }
+  return so_methods + so_method_num++;
+}
+
+mu_kwd_t method_kwd[] = {
+  { "copy-id", copy_owner_id }, 
+  { "copy-name", copy_owner_name },
+  { "set-name", set_owner_name },
+  { "user", set_owner_name },
+  { "set-id", set_owner_id },
+  { NULL }
+};
+
 static error_t
 parse_opt (int key, char *arg, struct argp_state *state)
 {
@@ -79,7 +124,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       break;
 
     case 'P':
-      copy_meta = 1;
+      mu_argp_node_list_new (&lst, "mailbox-ownership", arg);
       break;
 
     case 'u':
@@ -93,7 +138,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case OPT_EMACS:
       mu_argp_node_list_new (&lst, "emacs", "yes");
       break;
-      
+
     case ARGP_KEY_INIT:
       mu_argp_node_list_init (&lst);
       break;
@@ -118,6 +163,130 @@ static struct argp argp = {
 };
 
 
+static int
+_cb_mailbox_ownership (mu_debug_t debug, const char *str)
+{
+  if (strcmp (str, "clear") == 0)
+    so_method_num = 0;
+  else
+    {
+      int code;
+      char *p;
+      size_t len = strcspn (str, "=");
+      struct set_ownership_method *meth;
+	  
+      if (mu_kwd_xlat_name_len (method_kwd, str, len, &code))
+	{
+	  mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+			       _("Invalid ownership method: %s"),
+			       str);
+	  return 1;
+	}
+      
+      meth = get_next_so_method ();
+      meth->mode = code;
+      switch (meth->mode)
+	{
+	case copy_owner_id:
+	case copy_owner_name:
+	  break;
+	  
+	case set_owner_id:
+	  if (!str[len])
+	    {
+	      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+				   _("Ownership method %s requires value"),
+				   str);
+	      return 1;
+	    }
+	  str += len + 1;
+	  meth->owner.id.uid = strtoul (str, &p, 0);
+	  if (*p)
+	    {
+	      if (*p == ':')
+		{
+		  str = p + 1;
+		  meth->owner.id.gid = strtoul (str, &p, 0);
+		  if (*p)
+		    {
+		      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+					   _("expected gid number, but found %s"),
+					   str);
+		      return 1;
+		    }
+		}
+	      else
+		{
+		  mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+				       _("expected uid number, but found %s"),
+				       str);
+		  return 1;
+		}
+	    }
+	  else
+	    meth->owner.id.gid = (gid_t) -1;
+	  break;
+	  
+	case set_owner_name:
+	  if (!str[len])
+	    {
+	      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+				   _("Ownership method %s requires value"),
+				   str);
+	      return 1;
+	    }
+	  meth->owner.name = mu_strdup (str + len + 1);
+	}
+    }
+  return 0;
+}
+
+static int
+cb_mailbox_ownership (mu_debug_t debug, void *data, mu_config_value_t *val)
+{
+  int i;
+  
+  if (val->type == MU_CFG_STRING)
+    {
+      const char *str = val->v.string;
+      if (!strchr (str, ','))
+	return _cb_mailbox_ownership (debug, str);
+      else
+	{
+	  int argc;
+	  char **argv;
+
+	  if (mu_argcv_get_np (str, strlen (str), ",", NULL, 0,
+			       &argc, &argv, NULL))
+	    {
+	      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
+				   _("cannot parse %s"),
+				   str);
+	      return 1;
+	    }
+
+	  for (i = 0; i < argc; i++)
+	    if (_cb_mailbox_ownership (debug, argv[i]))
+	      return 1;
+
+	  mu_argcv_free (argc, argv);
+	  return 0;
+	}
+    }
+		
+  if (mu_cfg_assert_value_type (val, MU_CFG_LIST, debug))
+    return 1;
+
+  for (i = 0; i < val->v.arg.c; i++)
+    {
+      if (mu_cfg_assert_value_type (&val->v.arg.v[i], MU_CFG_STRING, debug))
+	return 1;
+      if (_cb_mailbox_ownership (debug, val->v.arg.v[i].v.string))
+	return 1;
+    }
+  return 0;
+}
+
 struct mu_cfg_param movemail_cfg_param[] = {
   { "preserve", mu_cfg_bool, &preserve_mail, 0, NULL,
     N_("Do not remove messages from the source mailbox.") },
@@ -128,7 +297,16 @@ struct mu_cfg_param movemail_cfg_param[] = {
   { "uidl", mu_cfg_bool, &uidl_option, 0, NULL,
     N_("Use UIDLs to avoid downloading the same message twice.") },
   { "verbose", mu_cfg_int, &verbose_option, 0, NULL,
-    N_("Increase verbosity level.") },
+    N_("Set verbosity level.") },
+  { "mailbox-ownership", mu_cfg_callback, NULL, 0,
+    cb_mailbox_ownership,
+    N_("Define a list of methods for setting mailbox ownership. Valid "
+       "methods are:\n"
+       " copy-id          get owner UID and GID from the source mailbox\n"
+       " copy-name        get owner name from the source mailbox URL\n"
+       " set-id=UID[:GID] set supplied UID and GID\n"
+       " set-name=USER    make destination mailbox owned by USER"),
+    N_("methods: list") },
   { NULL }
 };
 
@@ -300,29 +478,18 @@ close_mailboxes (void)
   mu_mailbox_close (dest);
   mu_mailbox_close (source);
 }  
-
-static void
-set_permissions (mu_mailbox_t mbox)
+
+static int
+get_mbox_owner_id (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
 {
-  mu_url_t url = NULL;
   const char *s;
-  int rc;
-  uid_t uid;
-  gid_t gid;
-  
-  if (getuid () != 0)
-    {
-      mu_error (_("must be root to use --copy-permissions"));
-      exit (1);
-    }
-  mu_mailbox_get_url (mbox, &url);
-  rc = mu_url_sget_scheme  (url, &s);
+  int rc = mu_url_sget_scheme  (url, &s);
   if (rc)
     die (mbox, _("Cannot get scheme"), rc);
-  if (strcmp (s, "/") == 0
-      || strcmp (s, "mbox") == 0
-      || strcmp (s, "mh") == 0
-      || strcmp (s, "maildir") == 0)
+  if ((strcmp (s, "/") == 0
+       || strcmp (s, "mbox") == 0
+       || strcmp (s, "mh") == 0
+       || strcmp (s, "maildir") == 0))
     {
       struct stat st;
       
@@ -335,33 +502,124 @@ set_permissions (mu_mailbox_t mbox)
 		    mu_strerror (errno));
 	  exit (1);
 	}
-      uid = st.st_uid;
-      gid = st.st_gid;
+      id->uid = st.st_uid;
+      id->gid = st.st_gid;
+      return 0;
     }
-  else
+  else if (verbose_option)
+    mu_diag_output (MU_DIAG_WARNING,
+		    _("ignoring copy-name: not a local mailbox"));
+  return 1;
+}
+
+static int
+get_user_id (const char *name, struct user_id *id)
+{
+  struct mu_auth_data *auth = mu_get_auth_by_name (name);
+  
+  if (!auth)
     {
-      struct mu_auth_data *auth;
-      
-      rc = mu_url_sget_user (url, &s);
-      if (rc)
-	die (mbox, _("Cannot get user"), rc);
-      
-      auth = mu_get_auth_by_name (s);
-      if (!auth)
-	{
-	  mu_error (_("No such user: %s"), s);
-	  exit (1);
-	}
-      else
+      if (verbose_option)
+	mu_diag_output (MU_DIAG_WARNING, _("no such user: %s"), name);
+      return 1;
+    }
+
+  id->uid = auth->uid;
+  id->gid = auth->gid;
+  mu_auth_data_free (auth);
+  return 0;
+}  
+
+static int
+get_mbox_owner_name (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
+{
+  const char *s;
+  int rc = mu_url_sget_user (url, &s);
+  if (rc)
+    /* FIXME */
+    die (mbox, _("Cannot get mailbox owner name"), rc);
+
+  return get_user_id (s, id);
+}
+
+static int
+guess_mbox_owner (mu_mailbox_t mbox, struct user_id *id)
+{
+  mu_url_t url = NULL;
+  int rc;
+  struct set_ownership_method *meth;
+  
+  rc = mu_mailbox_get_url (mbox, &url);
+  if (rc)
+    die (mbox, _("Cannot get url"), rc);
+
+  rc = 1;
+  for (meth = so_methods; rc == 1 && meth < so_methods + so_method_num; meth++)
+    {
+      switch (meth->mode)
 	{
-	  uid = auth->uid;
-	  gid = auth->gid;
+	case copy_owner_id:
+	  rc = get_mbox_owner_id (mbox, url, id);
+	  break;
+	  
+	case copy_owner_name:
+	  rc = get_mbox_owner_name (mbox, url, id);
+	  break;
+	  
+	case set_owner_id:
+	  id->uid = meth->owner.id.uid;
+	  rc = 0;
+	  if (meth->owner.id.gid == (gid_t)-1)
+	    {
+	      struct passwd *pw = getpwuid (id->uid);
+	      if (pw)
+		id->gid = pw->pw_gid;
+	      else
+		{
+		  if (verbose_option)
+		    mu_diag_output (MU_DIAG_WARNING,
+				    _("no user with uid %lu found"),
+				    (unsigned long) id->uid);
+		  rc = 1;
+		}
+	    }
+	  break;
+	  
+	case set_owner_name:
+	  rc = get_user_id (meth->owner.name, id);
+	  break;
 	}
-      mu_auth_data_free (auth);
     }
+  
+  return rc;
+}
 
-  if (mu_switch_to_privs (uid, gid, NULL))
-    exit (1);
+static void
+switch_owner (mu_mailbox_t mbox)
+{
+  struct user_id user_id;
+
+  if (so_method_num == 0)
+    return;
+
+  if (getuid ())
+    {
+      if (verbose_option)
+	mu_diag_output (MU_DIAG_WARNING,
+			_("ignoring mailbox-ownership statement"));
+      return;
+    }
+  
+  if (guess_mbox_owner (mbox, &user_id) == 0)
+    {
+      if (mu_switch_to_privs (user_id.uid, user_id.gid, NULL))
+	exit (1);
+    }
+  else
+    {
+      mu_error (_("no suitable method for setting mailbox ownership"));
+      exit (1);
+    }
 }
 
 static int
@@ -443,8 +701,7 @@ main (int argc, char **argv)
   else
     open_mailbox (&source, source_name, flags, argv[2]);
 
-  if (copy_meta) 
-    set_permissions (source);
+  switch_owner (source);
   
   open_mailbox (&dest, dest_name, MU_STREAM_RDWR | MU_STREAM_CREAT, NULL);
 


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 20 17:58:31 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MeFeR-0002jE-EJ
	for mharc-commit-mailutils@gnu.org; Thu, 20 Aug 2009 17:58:31 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MeFeP-0002ib-Js
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 17:58:29 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MeFeO-0002iP-0h
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 17:58:28 -0400
Received: from [199.232.76.173] (port=55854 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MeFeN-0002iM-N7
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 17:58:27 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54708 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MeFeN-0001j0-3b
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 17:58:27 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MeFeM-0003T4-Gr
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 21:58:26 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MeFeM-0003SX-5i
	for commit-mailutils@gnu.org; Thu, 20 Aug 2009 21:58:26 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b9aaf724c6428fb4e0d01950d4d7113671e048e5
X-Git-Newrev: 5171c0f91ea69eacd76068661db628f46f267c9e
Message-Id: <E1MeFeM-0003SX-5i@cvs.savannah.gnu.org>
Date: Thu, 20 Aug 2009 21:58:26 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-327-g5171c0f
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Aug 2009 21:58: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=5171c0f91ea69eacd76068661db628f46f267c9e

The branch, master has been updated
       via  5171c0f91ea69eacd76068661db628f46f267c9e (commit)
      from  b9aaf724c6428fb4e0d01950d4d7113671e048e5 (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 5171c0f91ea69eacd76068661db628f46f267c9e
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Aug 21 00:52:59 2009 +0300

    Minor fixes.
    
    * .gitignore: Add pathdefs.h
    * examples/Makefile.am (muauth_CPPFLAGS)
    (muemail_CPPFLAGS): New variables.
    * examples/argcv.c (main): Remove unused local.
    * include/mailutils/gsasl.h [USE_GSASL]: Change to WITH_GSASL.
    * include/mailutils/libcfg.h (mu_acl_cfg_init): New prototype.
    * include/mailutils/mu_auth.h (mu_authenticate): Password is const.
    * include/mailutils/python.h: Fix indentation.
    (mu_py_script_data): module_name is const char *.
    * libmu_auth/radius.c: Include radius/debug.h
    * libproto/mailer/smtp.c: Include io.h and secret.h
    * mail/mail.c: Fix indentation.
    * mail/util.c (util_rfc2047_decode): Fix local variable declaration.
    * mailbox/mu_auth.c (mu_authenticate): Password is const.
    * mh/mh.h (mh_alias_get, mh_alias_get_address)
    (mh_alias_get_alias): Name is const.
    * mh/mh_alias.y: Likewise.
    * mh/mh_list.c (print_header_value): Fix improper use of mu_toupper.
    * mh/mh_whatnow.c (invoke): Add typecasts.
    * python/libmu_py/nls.c (api_nls_set_locale): Remove unused automatic.
    * python/libmu_py/sieve.c (_sieve_error_printer): Provide missing
    return value.
    (_sieve_debug_printer): Likewise.

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

Summary of changes:
 .gitignore                  |    1 +
 examples/Makefile.am        |    2 +
 examples/argcv.c            |    3 +-
 examples/pop3client.c       |    1 +
 include/mailutils/gsasl.h   |    5 ++-
 include/mailutils/libcfg.h  |    3 +-
 include/mailutils/mu_auth.h |    4 +-
 include/mailutils/python.h  |   71 ++++++++++++++++++++++++++++--------------
 libmu_auth/radius.c         |    1 +
 libproto/mailer/smtp.c      |    2 +
 mail/mail.c                 |   30 ++++++++++--------
 mail/util.c                 |    2 +-
 mailbox/mu_auth.c           |    4 +-
 mh/mh.h                     |    6 ++--
 mh/mh_alias.y               |   15 +++++----
 mh/mh_list.c                |    5 ++-
 mh/mh_whatnow.c             |    6 ++--
 python/libmu_py/nls.c       |    1 -
 python/libmu_py/sieve.c     |    7 ++--
 19 files changed, 104 insertions(+), 65 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6f60162..3f3f74e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,5 @@ config.status
 configure
 libtool
 m4
+pathdefs.h
 stamp-h1
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 70ef8fe..bf378b5 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -123,12 +123,14 @@ lsf_LDADD = \
  @MU_AUTHLIBS@ \
  ${MU_LIB_MAILUTILS}
 
+muauth_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
 muauth_LDADD = \
  ${MU_APP_LIBRARIES}\
  ${MU_LIB_AUTH}\
  @MU_AUTHLIBS@ \
  ${MU_LIB_MAILUTILS}
 
+muemail_CPPFLAGS = @MU_APP_COMMON_INCLUDES@
 muemail_LDADD = \
  ${MU_APP_LIBRARIES} \
  ${MU_LIB_MAILUTILS}
diff --git a/examples/argcv.c b/examples/argcv.c
index 007f62f..f25c81d 100644
--- a/examples/argcv.c
+++ b/examples/argcv.c
@@ -28,12 +28,11 @@
 #include <mailutils/errno.h>
 
 int
-main(int argc, char **argv)
+main (int argc, char **argv)
 {
   char *delim = "";
   char *comment = "#";
   char buf[512];
-  size_t n = 0;
   
   while (fgets (buf, sizeof buf, stdin))
     {
diff --git a/examples/pop3client.c b/examples/pop3client.c
index c073fe9..a404038 100644
--- a/examples/pop3client.c
+++ b/examples/pop3client.c
@@ -156,6 +156,7 @@ pop_session_str (enum pop_session_status stat)
     case pop_session_logged_in:
       return "logged in";
     }
+  return "unknown";
 }
 
 char *
diff --git a/include/mailutils/gsasl.h b/include/mailutils/gsasl.h
index fbd7094..6067746 100644
--- a/include/mailutils/gsasl.h
+++ b/include/mailutils/gsasl.h
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 
+   2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -32,7 +33,7 @@ int mu_gsasl_module_init (enum mu_gocs_op, void *);
 
 struct mu_gsasl_module_data mu_gsasl_module_data;
 
-#ifdef USE_GSASL
+#ifdef WITH_GSASL
 #include <gsasl.h>
 
 int mu_gsasl_stream_create (mu_stream_t *stream, mu_stream_t transport,
diff --git a/include/mailutils/libcfg.h b/include/mailutils/libcfg.h
index acc2062..79dda00 100644
--- a/include/mailutils/libcfg.h
+++ b/include/mailutils/libcfg.h
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -51,6 +51,7 @@ extern int mu_register_cfg_capa (const char *name,
 extern void mu_libcfg_init (char **cnames);
 extern int mu_parse_config_files (struct mu_cfg_param *param,
 				  void *target_ptr);
+extern void mu_acl_cfg_init (void);
 
 #define __mu_common_cat2__(a,b) a ## b
 #define __mu_common_cat3__(a,b,c) a ## b ## c
diff --git a/include/mailutils/mu_auth.h b/include/mailutils/mu_auth.h
index 7dc7922..5bd76ed 100644
--- a/include/mailutils/mu_auth.h
+++ b/include/mailutils/mu_auth.h
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -99,7 +99,7 @@ extern struct mu_auth_data *
 mu_get_auth_by_uid (uid_t uid);
 
 extern int
-mu_authenticate (struct mu_auth_data *auth_data, char *pass);
+mu_authenticate (struct mu_auth_data *auth_data, const char *pass);
 
 extern int mu_auth_nosupport (struct mu_auth_data **return_data,
 			      const void *key,
diff --git a/include/mailutils/python.h b/include/mailutils/python.h
index e24501d..ca90c5c 100644
--- a/include/mailutils/python.h
+++ b/include/mailutils/python.h
@@ -25,107 +25,128 @@
 extern "C" {
 #endif
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_address_t addr;
 } PyAddress;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_attribute_t attr;
 } PyAttribute;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_authority_t auth;
 } PyAuthority;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_ticket_t ticket;
 } PyTicket;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_wicket_t wicket;
 } PyWicket;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   struct mu_auth_data *auth_data;
 } PyAuthData;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_body_t body;
 } PyBody;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_debug_t dbg;
 } PyDebug;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_envelope_t env;
 } PyEnvelope;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_folder_t folder;
 } PyFolder;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_header_t hdr;
 } PyHeader;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailbox_t mbox;
 } PyMailbox;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailcap_t mc;
 } PyMailcap;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailcap_entry_t entry;
 } PyMailcapEntry;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mailer_t mlr;
 } PyMailer;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_message_t msg;
 } PyMessage;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_mime_t mime;
 } PyMime;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_secret_t secret;
 } PySecret;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_sieve_machine_t mach;
 } PySieveMachine;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_stream_t stm;
 } PyStream;
 
-typedef struct {
+typedef struct
+{
   PyObject_HEAD;
   mu_url_t url;
 } PyUrl;
@@ -186,13 +207,15 @@ extern int PyMessage_Check (PyObject *x);
 extern int PySecret_Check (PyObject *x);
 extern int PyStream_Check (PyObject *x);
 
-typedef struct {
+typedef struct
+{
   char *name;
   PyObject *obj;
 } mu_py_dict;
 
-typedef struct {
-  char *module_name;
+typedef struct
+{
+  const char *module_name;
   mu_py_dict *attrs;
 } mu_py_script_data;
 
diff --git a/libmu_auth/radius.c b/libmu_auth/radius.c
index 4e7e39c..1a63d40 100644
--- a/libmu_auth/radius.c
+++ b/libmu_auth/radius.c
@@ -46,6 +46,7 @@
 #ifdef ENABLE_RADIUS
 
 #include <radius/radius.h>
+#include <radius/debug.h>
 
 static int radius_auth_enabled;
 
diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c
index 1557cc4..c2e9ab2 100644
--- a/libproto/mailer/smtp.c
+++ b/libproto/mailer/smtp.c
@@ -50,6 +50,8 @@
 #include <mailutils/url.h>
 #include <mailutils/tls.h>
 #include <mailutils/md5.h>
+#include <mailutils/io.h>
+#include <mailutils/secret.h>
 #include <mailutils/cctype.h>
 #include <mailutils/cstr.h>
 
diff --git a/mail/mail.c b/mail/mail.c
index fbc08a2..64aad6c 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -38,20 +38,24 @@ static char args_doc[] = N_("[address...]\n-f [OPTION...] [file]\n--file [OPTION
 #define F_OPTION 256
 
 static struct argp_option options[] = {
-  { NULL,     'f', 0,      OPTION_HIDDEN, NULL, 0 },
-  {"file",    F_OPTION,    "FILE",   OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
-
-  {"exist",   'e', 0,      0, N_("Return true if mail exists"), 0},
-  {"byname",  'F', 0,      0, N_("Save messages according to sender"), 0},
-  {"headers", 'H', 0,      0, N_("Write a header summary and exit"), 0},
-  {"ignore",  'i', 0,      0, N_("Ignore interrupts"), 0},
-  {"norc",    'n', 0,      0, N_("Do not read the system mailrc file"), 0},
-  {"nosum",   'N', 0,      0, N_("Do not display initial header summary"), 0},
-  {"print",   'p', 0,      0, N_("Print all mail to standard output"), 0},
-  {"quit",    'q', 0,      0, N_("Cause interrupts to terminate program"), 0},
-  {"read",    'r', 0,      0, N_("Same as -p"), 0},
-  {"subject", 's', N_("SUBJ"), 0, N_("Send a message with a Subject of SUBJ"), 0},
-  {"to",      't', 0,      0, N_("Precede message by a list of addresses"), 0},
+  { NULL,     'f', NULL,      OPTION_HIDDEN, NULL, 0 },
+  {"file",    F_OPTION, "FILE",   OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
+
+  {"exist",   'e', NULL,      0, N_("Return true if mail exists"), 0},
+  {"byname",  'F', NULL,      0, N_("Save messages according to sender"), 0},
+  {"headers", 'H', NULL,      0, N_("Write a header summary and exit"), 0},
+  {"ignore",  'i', NULL,      0, N_("Ignore interrupts"), 0},
+  {"norc",    'n', NULL,      0, N_("Do not read the system mailrc file"), 0},
+  {"nosum",   'N', NULL,      0,
+   N_("Do not display initial header summary"), 0},
+  {"print",   'p', NULL,      0, N_("Print all mail to standard output"), 0},
+  {"read",    'r', NULL,      OPTION_ALIAS },
+  {"quit",    'q', NULL,      0,
+   N_("Cause interrupts to terminate program"), 0},
+  {"subject", 's', N_("SUBJ"), 0,
+   N_("Send a message with the given SUBJECT"), 0},
+  {"to",      't', NULL,      0,
+   N_("Precede message by a list of addresses"), 0},
   {"user",    'u', N_("USER"), 0, N_("Operate on USER's mailbox"), 0},
   {"append",  'a', N_("HEADER: VALUE"), 0,
    N_("Append given header to the message being sent"), 0},
diff --git a/mail/util.c b/mail/util.c
index d2f342e..b6c3ba5 100644
--- a/mail/util.c
+++ b/mail/util.c
@@ -1084,7 +1084,7 @@ void
 util_rfc2047_decode (char **value)
 {
   char locale[32];
-  char *charset = NULL;
+  const char *charset = NULL;
   char *tmp;
   int rc;
 
diff --git a/mailbox/mu_auth.c b/mailbox/mu_auth.c
index 2dc237c..1e6c276 100644
--- a/mailbox/mu_auth.c
+++ b/mailbox/mu_auth.c
@@ -296,7 +296,7 @@ mu_get_auth_by_uid (uid_t uid)
 static mu_list_t mu_authenticate_list, _tmp_authenticate_list;
 
 int
-mu_authenticate (struct mu_auth_data *auth_data, char *pass)
+mu_authenticate (struct mu_auth_data *auth_data, const char *pass)
 {
   if (!auth_data)
     return EINVAL;
@@ -305,7 +305,7 @@ mu_authenticate (struct mu_auth_data *auth_data, char *pass)
              auth_data->name, auth_data->source);
   if (!mu_authenticate_list)
     mu_auth_begin_setup ();
-  return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, pass);
+  return mu_auth_runlist (mu_authenticate_list, NULL, auth_data, (void*) pass);
 }
 
 
diff --git a/mh/mh.h b/mh/mh.h
index 7a24642..8631626 100644
--- a/mh/mh.h
+++ b/mh/mh.h
@@ -335,9 +335,9 @@ void mh_set_reply_regex (const char *str);
 int mh_decode_2047 (char *text, char **decoded_text);
 
 int mh_alias_read (char *name, int fail);
-int mh_alias_get (char *name, mu_list_t *return_list);
-int mh_alias_get_address (char *name, mu_address_t *addr, int *incl);
-int mh_alias_get_alias (char *uname, mu_list_t *return_list);
+int mh_alias_get (const char *name, mu_list_t *return_list);
+int mh_alias_get_address (const char *name, mu_address_t *addr, int *incl);
+int mh_alias_get_alias (const char *uname, mu_list_t *return_list);
 int mh_read_aliases (void);
 int mh_alias_expand (const char *str, mu_address_t *paddr, int *incl);
 
diff --git a/mh/mh_alias.y b/mh/mh_alias.y
index c34e386..06b2cc5 100644
--- a/mh/mh_alias.y
+++ b/mh/mh_alias.y
@@ -225,7 +225,7 @@ ali_list_dup (mu_list_t src)
 }
 
 static int
-ali_member (mu_list_t list, char *name)
+ali_member (mu_list_t list, const char *name)
 {
   mu_iterator_t itr;
   int found = 0;
@@ -252,7 +252,7 @@ ali_member (mu_list_t list, char *name)
 }
 
 int
-aliascmp (char *pattern, char *name)
+aliascmp (const char *pattern, const char *name)
 {
   int len = strlen (pattern);
 
@@ -281,7 +281,7 @@ _insert_list (mu_list_t list, void *prev, mu_list_t new_list)
   return 0;
 }
 
-static int mh_alias_get_internal (char *name, mu_iterator_t start,
+static int mh_alias_get_internal (const char *name, mu_iterator_t start,
 				  mu_list_t *return_list, int *inclusive);
 
 int
@@ -311,7 +311,8 @@ alias_expand_list (mu_list_t name_list, mu_iterator_t orig_itr, int *inclusive)
 /* Look up the named alias. If found, return the list of recipient
    names associated with it */
 static int
-mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list,
+mh_alias_get_internal (const char *name,
+		       mu_iterator_t start, mu_list_t *return_list,
 		       int *inclusive) 
 {
   mu_iterator_t itr;
@@ -349,13 +350,13 @@ mh_alias_get_internal (char *name, mu_iterator_t start, mu_list_t *return_list,
 }
 
 int
-mh_alias_get (char *name, mu_list_t *return_list)
+mh_alias_get (const char *name, mu_list_t *return_list)
 {
   return mh_alias_get_internal (name, NULL, return_list, NULL);
 }
 
 int
-mh_alias_get_address (char *name, mu_address_t *paddr, int *incl)
+mh_alias_get_address (const char *name, mu_address_t *paddr, int *incl)
 {
   mu_iterator_t itr;
   mu_list_t list;
@@ -403,7 +404,7 @@ mh_alias_get_address (char *name, mu_address_t *paddr, int *incl)
 /* Look up the given user name in the aliases. Return the list of
    alias names this user is member of */
 int
-mh_alias_get_alias (char *uname, mu_list_t *return_list)
+mh_alias_get_alias (const char *uname, mu_list_t *return_list)
 {
   mu_iterator_t itr;
   int rc = 1;
diff --git a/mh/mh_list.c b/mh/mh_list.c
index 543ce1d..ac9fc59 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -629,7 +629,10 @@ print_header_value (struct eval_env *env, char *val)
     }
   
   if (env->bvar[B_UPPERCASE])
-    mu_toupper (val);
+    {
+      for (p = val; *p; p++)
+	*p = mu_toupper (*p);
+    }
 
   if (env->bvar[B_COMPRESS])
     for (p = val; *p; p++)
diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c
index ba251af..943af3e 100644
--- a/mh/mh_whatnow.c
+++ b/mh/mh_whatnow.c
@@ -257,13 +257,13 @@ invoke (const char *compname, const char *defval, int argc, char **argv,
       return -1;
     }
 
-  xargv[0] = progname;
+  xargv[0] = (char*) progname;
   for (i = 1; i < argc; i++)
     xargv[i] = argv[i];
   if (extra0)
-    xargv[i++] = extra0;
+    xargv[i++] = (char*) extra0;
   if (extra1)
-    xargv[i++] = extra1;
+    xargv[i++] = (char*) extra1;
   xargv[i++] = NULL;
   rc = mu_spawnvp (xargv[0], xargv, &status);
   free (xargv);
diff --git a/python/libmu_py/nls.c b/python/libmu_py/nls.c
index 8b81310..9b3aba0 100644
--- a/python/libmu_py/nls.c
+++ b/python/libmu_py/nls.c
@@ -32,7 +32,6 @@ api_nls_init (PyObject *self)
 static PyObject *
 api_nls_set_locale (PyObject *self, PyObject *args)
 {
-  int status;
   char *lset;
   const char *locale;
 
diff --git a/python/libmu_py/sieve.c b/python/libmu_py/sieve.c
index 38c1d37..feb5a3a 100644
--- a/python/libmu_py/sieve.c
+++ b/python/libmu_py/sieve.c
@@ -206,7 +206,7 @@ _sieve_error_printer (void *data, const char *fmt, va_list ap)
       PyObject *py_fnc = s->py_error_printer;
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-	return;
+	return 0;
       PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
       if (buf)
 	free (buf);
@@ -237,7 +237,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno,
       PyDict_SetItemString (py_dict, "lineno", PyInt_FromLong (lineno));
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-	return;
+	return 0;
       PyDict_SetItemString (py_dict, "text",
 			    PyString_FromString (buf ? buf : ""));
       if (buf)
@@ -259,6 +259,7 @@ _sieve_parse_error_printer (void *data, const char *filename, int lineno,
 	  Py_DECREF (py_args);
 	}
     }
+  return 0;
 }
 
 static int
@@ -274,7 +275,7 @@ _sieve_debug_printer (void *data, const char *fmt, va_list ap)
       PyObject *py_fnc = s->py_debug_printer;
 
       if (mu_vasnprintf (&buf, &buflen, fmt, ap))
-	return;
+	return 0;
       PyTuple_SetItem (py_args, 0, PyString_FromString (buf ? buf : ""));
       if (buf)
 	free (buf);


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Tue Aug 25 03:32:31 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MfqW7-0004mR-66
	for mharc-commit-mailutils@gnu.org; Tue, 25 Aug 2009 03:32:31 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MfqW4-0004lW-MF
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 03:32:28 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MfqVz-0004je-GQ
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 03:32:28 -0400
Received: from [199.232.76.173] (port=38303 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MfqVz-0004ir-51
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 03:32:23 -0400
Received: from savannah.gnu.org ([199.232.41.3]:39577 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MfqVv-0003kX-I3
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 03:32:21 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MfqVu-0006U3-AI
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 07:32:18 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MfqVt-0006TV-Eh
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 07:32:18 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0c606c74e0195d00bb1410114e7b871c08c2a7f0
X-Git-Newrev: 8619a1cb3b5a4b84b365571b711cf792e12ab620
Message-Id: <E1MfqVt-0006TV-Eh@cvs.savannah.gnu.org>
Date: Tue, 25 Aug 2009 07:32:17 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-329-g8619a1c
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Aug 2009 07:32: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=8619a1cb3b5a4b84b365571b711cf792e12ab620

The branch, master has been updated
       via  8619a1cb3b5a4b84b365571b711cf792e12ab620 (commit)
      from  0c606c74e0195d00bb1410114e7b871c08c2a7f0 (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 8619a1cb3b5a4b84b365571b711cf792e12ab620
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 25 10:31:59 2009 +0300

    Change error messages to comply with the GNU standards.
    
       The string MESSAGE should not begin with a capital letter when it
       follows a program name and/or file name, because that isn't the
       beginning of a sentence.  (The sentence conceptually starts at the
       beginning of the line.)  Also, it should not end with a period.
    
    * include/mailutils/diag.h (mu_diag_funcall): New prototype.
    * mailbox/diag.c: New function.
    
    * comsat/action.c, comsat/comsat.c, comsat/oldcfg.c,
    config/mailutils-config.c, configure.ac, dotlock/dotlock.c,
    frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c,
    guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c, imap4d/bye.c,
    imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/preauth.c,
    imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, lib/mailcap.c,
    lib/tcpwrap.c, libmu_argp/mu_argp.c, libmu_auth/ldap.c,
    libmu_auth/radius.c, libmu_auth/sql.c, libmu_auth/tls.c,
    libmu_cfg/acl.c, libmu_cfg/common.c, libmu_cfg/init.c,
    libmu_cfg/ldap.c, libmu_cfg/sql.c, libmu_sieve/actions.c,
    libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c,
    libmu_sieve/prog.c, libmu_sieve/sieve.l, libproto/imap/folder.c,
    libproto/mbox/mbox.c, maidag/deliver.c, maidag/lmtp.c,
    maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c,
    maidag/script.c, mail/alias.c, mail/cd.c, mailbox/cfg_lexer.l,
    mailbox/cfg_parser.y, mailbox/file_stream.c, mailbox/gocs.c,
    mailbox/msrv.c, mailbox/mutil.c, mailbox/registrar.c,
    messages/messages.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c,
    mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c,
    mh/mh_list.c, mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c,
    mh/mhl.c, mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c,
    mh/scan.c, mh/send.c, mimeview/mimetypes.l, mimeview/mimeview.c,
    movemail/movemail.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c,
    pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c,
    pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c,
    sieve/sieve.c: Fix error messages.

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

Summary of changes:
 comsat/action.c                    |    8 +++---
 comsat/comsat.c                    |   38 ++++++++++++++------------
 comsat/oldcfg.c                    |    2 +-
 config/mailutils-config.c          |    2 +-
 configure.ac                       |    2 +-
 dotlock/dotlock.c                  |   13 ++++-----
 frm/common.c                       |   16 +++++-----
 frm/from.c                         |    4 +-
 guimb/collect.c                    |   14 +++++-----
 guimb/main.c                       |    4 +-
 guimb/util.c                       |    6 ++--
 imap4d/auth_gsasl.c                |    9 +++---
 imap4d/auth_gss.c                  |    6 ++--
 imap4d/bye.c                       |   24 ++++++++--------
 imap4d/close.c                     |    6 +---
 imap4d/imap4d.c                    |   31 +++++++++------------
 imap4d/login.c                     |    6 ++--
 imap4d/preauth.c                   |   26 +++++++++---------
 imap4d/signal.c                    |    4 +-
 imap4d/starttls.c                  |    4 +-
 imap4d/util.c                      |   12 ++++----
 include/mailutils/diag.h           |    3 ++
 lib/mailcap.c                      |    4 +-
 lib/tcpwrap.c                      |    8 +++---
 libmu_argp/mu_argp.c               |    6 ++--
 libmu_auth/ldap.c                  |   21 +++++++-------
 libmu_auth/radius.c                |   10 +++---
 libmu_auth/sql.c                   |   18 ++++++------
 libmu_auth/tls.c                   |    4 +-
 libmu_cfg/acl.c                    |    4 +-
 libmu_cfg/common.c                 |    2 +-
 libmu_cfg/init.c                   |    6 ++--
 libmu_cfg/ldap.c                   |    4 +-
 libmu_cfg/sql.c                    |    4 +-
 libmu_sieve/actions.c              |    2 +-
 libmu_sieve/comparator.c           |    4 +-
 libmu_sieve/extensions/moderator.c |    6 ++--
 libmu_sieve/prog.c                 |    4 +-
 libmu_sieve/sieve.l                |    9 +++---
 libproto/imap/folder.c             |   10 +++---
 libproto/mbox/mbox.c               |   22 +++++++-------
 maidag/deliver.c                   |   20 +++++++-------
 maidag/lmtp.c                      |   14 +++++-----
 maidag/maidag.c                    |   14 +++++-----
 maidag/mailquota.c                 |   16 +++++-----
 maidag/mailtmp.c                   |   12 ++++----
 maidag/script.c                    |    7 +---
 mail/alias.c                       |    4 +-
 mail/cd.c                          |    2 +-
 mailbox/cfg_lexer.l                |    4 +-
 mailbox/cfg_parser.y               |    6 ++--
 mailbox/diag.c                     |   36 ++++++++++++++++++-------
 mailbox/file_stream.c              |    2 +-
 mailbox/gocs.c                     |   20 +++++++-------
 mailbox/msrv.c                     |   16 +++++-----
 mailbox/mutil.c                    |    2 +-
 mailbox/registrar.c                |    4 +-
 messages/messages.c                |   12 ++++----
 mh/folder.c                        |   21 +++++++-------
 mh/forw.c                          |    8 +++---
 mh/inc.c                           |   14 +++++-----
 mh/mark.c                          |    5 ++-
 mh/mh_ctx.c                        |    4 +-
 mh/mh_fmtgram.y                    |    4 +-
 mh/mh_format.c                     |    4 +-
 mh/mh_init.c                       |   52 ++++++++++++++++++------------------
 mh/mh_list.c                       |   24 +++++++++-------
 mh/mh_msgset.c                     |    8 +++---
 mh/mh_whatnow.c                    |    6 ++--
 mh/mh_whom.c                       |    6 ++--
 mh/mhl.c                           |   16 +++++-----
 mh/mhn.c                           |   32 +++++++++++-----------
 mh/pick.c                          |    9 +++---
 mh/refile.c                        |   16 +++++-----
 mh/repl.c                          |   10 +++---
 mh/rmf.c                           |    9 +++---
 mh/scan.c                          |    4 +-
 mh/send.c                          |   36 ++++++++++++------------
 mimeview/mimetypes.l               |    4 +-
 mimeview/mimeview.c                |   10 +++---
 movemail/movemail.c                |   44 +++++++++++++++---------------
 pop3d/apop.c                       |   15 ++++++----
 pop3d/bulletin.c                   |   20 +++++++-------
 pop3d/extra.c                      |   26 +++++++++---------
 pop3d/lock.c                       |    4 +-
 pop3d/logindelay.c                 |   16 ++++++-----
 pop3d/pop3d.c                      |   14 +++++-----
 pop3d/popauth.c                    |   36 +++++++++++++-----------
 pop3d/quit.c                       |    4 +-
 pop3d/signal.c                     |    6 ++--
 pop3d/user.c                       |   13 +++++----
 readmsg/readmsg.c                  |   14 +++++-----
 sieve/sieve.c                      |   31 ++++++++++-----------
 93 files changed, 576 insertions(+), 548 deletions(-)

diff --git a/comsat/action.c b/comsat/action.c
index 727870c..74baf18 100644
--- a/comsat/action.c
+++ b/comsat/action.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2007 Free Software Foundation, Inc.
+   2007, 2009 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
@@ -294,13 +294,13 @@ action_exec (FILE *tty, int line, int argc, char **argv)
 
   if (argc == 0)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: No arguments for exec"), username, line);
+      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: no arguments for exec"), username, line);
       return;
     }
 
   if (argv[0][0] != '/')
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: Not an absolute pathname"),
+      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: not an absolute pathname"),
 	      username, line);
       return;
     }
@@ -328,7 +328,7 @@ action_exec (FILE *tty, int line, int argc, char **argv)
       dup2 (fileno (tty), 2);
       fclose (tty);
       execv (argv[0], argv);
-      mu_diag_output (MU_DIAG_ERROR, _("Cannot execute %s: %s"), argv[0], strerror (errno));
+      mu_diag_output (MU_DIAG_ERROR, _("cannot execute %s: %s"), argv[0], strerror (errno));
       exit (0);
     }
 }
diff --git a/comsat/comsat.c b/comsat/comsat.c
index 1bdbc98..1353eb1 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -247,7 +247,7 @@ comsat_process (char *buffer, size_t rdlen)
   p = strchr (buffer, '@');
   if (!p)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Malformed input: %s"), buffer);
+      mu_diag_output (MU_DIAG_ERROR, _("malformed input: %s"), buffer);
       return;
     }
   *p++ = 0;
@@ -321,8 +321,8 @@ comsat_prefork (int fd, void *data, struct sockaddr *s, int size)
 
 	  delay = overflow_delay_time << (overflow_count + 1);
 	  mu_diag_output (MU_DIAG_NOTICE,
-			 ngettext ("Too many requests: pausing for %u second",
-				   "Too many requests: pausing for %u seconds",
+			 ngettext ("too many requests: pausing for %u second",
+				   "too many requests: pausing for %u seconds",
 				    delay),
 			  delay);
 	  /* FIXME: drain the socket? */
@@ -365,8 +365,8 @@ comsat_connection (int fd, struct sockaddr *sa, int salen,
     {
       char *p = mu_sockaddr_to_astr (sa, salen);
       mu_diag_output (MU_DIAG_INFO,
-		      ngettext ("Received %d byte from %s",
-				"Received %d bytes from %s", rdlen),
+		      ngettext ("received %d byte from %s",
+				"received %d bytes from %s", rdlen),
 		      rdlen, p);
       mu_diag_output (MU_DIAG_INFO, "string: %s", buffer);
       free (p);
@@ -377,7 +377,7 @@ comsat_connection (int fd, struct sockaddr *sa, int salen,
       int rc = mu_udp_server_set_bufsize (srv, rdlen + 1);
       if (rc)
 	{
-	  mu_error (_("Cannot resize buffer: %s"), mu_strerror (rc));
+	  mu_error (_("cannot resize buffer: %s"), mu_strerror (rc));
 	  return 0;
 	}
     }
@@ -418,7 +418,7 @@ notify_user (const char *user, const char *device, const char *path,
     return;
   if ((fp = fopen (device, "w")) == NULL)
     {
-      mu_error (_("Cannot open device %s: %m"), device);
+      mu_error (_("cannot open device %s: %s"), device, mu_strerror (errno));
       return;
     }
 
@@ -434,7 +434,7 @@ notify_user (const char *user, const char *device, const char *path,
   if ((status = mu_mailbox_create (&mbox, path)) != 0
       || (status = mu_mailbox_open (mbox, MU_STREAM_READ|MU_STREAM_QACCESS)) != 0)
     {
-      mu_error (_("Cannot open mailbox %s: %s"),
+      mu_error (_("cannot open mailbox %s: %s"),
 	      path, mu_strerror (status));
       return;
     }
@@ -442,7 +442,7 @@ notify_user (const char *user, const char *device, const char *path,
   status = mu_mailbox_quick_get_message (mbox, qid, &msg);
   if (status)
     {
-      mu_error (_("Cannot get message (mailbox %s, qid %s): %s"),
+      mu_error (_("cannot get message (mailbox %s, qid %s): %s"),
 		path, qid, mu_strerror (status));
       return; /* FIXME: Notify the user, anyway */
     }
@@ -484,7 +484,8 @@ find_user (const char *name, char *tty)
 	  if (strncmp (ftty, PATH_TTY_PFX, strlen (PATH_TTY_PFX)))
 	    {
 	      /* An attempt to break security... */
-	      mu_diag_output (MU_DIAG_ALERT, _("Bad line name in utmp record: %s"), ftty);
+	      mu_diag_output (MU_DIAG_ALERT,
+			      _("bad line name in utmp record: %s"), ftty);
 	      return NOT_HERE;
 	    }
 
@@ -492,7 +493,8 @@ find_user (const char *name, char *tty)
 	    {
 	      if (!S_ISCHR (statb.st_mode))
 		{
-		  mu_diag_output (MU_DIAG_ALERT, _("Not a character device: %s"), ftty);
+		  mu_diag_output (MU_DIAG_ALERT,
+				  _("not a character device: %s"), ftty);
 		  return NOT_HERE;
 		}
 
@@ -525,7 +527,7 @@ change_user (const char *user)
   pw = getpwnam (user);
   if (!pw)
     {
-      mu_diag_output (MU_DIAG_CRIT, _("No such user: %s"), user);
+      mu_diag_output (MU_DIAG_CRIT, _("no such user: %s"), user);
       return 1;
     }
 
@@ -546,7 +548,7 @@ mailbox_path (const char *user)
 
   if (!auth)
     {
-      mu_diag_output (MU_DIAG_ALERT, _("User nonexistent: %s"), user);
+      mu_diag_output (MU_DIAG_ALERT, _("user nonexistent: %s"), user);
       return NULL;
     }
 
@@ -592,7 +594,7 @@ main (int argc, char **argv)
   
       if (argc < 2 || argc > 2)
 	{
-	  mu_error (_("Mailbox URL and message QID are required in test mode"));
+	  mu_error (_("mailbox URL and message QID are required in test mode"));
 	  exit (EXIT_FAILURE);
 	}
 
@@ -605,7 +607,7 @@ main (int argc, char **argv)
 	      struct passwd *pw = getpwuid (getuid ());
 	      if (!pw)
 		{
-		  mu_error (_("Cannot determine user name"));
+		  mu_error (_("cannot determine user name"));
 		  exit (EXIT_FAILURE);
 		}
 	      user = pw->pw_name;
@@ -632,7 +634,7 @@ main (int argc, char **argv)
     {
       if (argv[0][0] != '/')
 	mu_diag_output (MU_DIAG_NOTICE,
-			_("Program name is not absolute; reloading will not "
+			_("program name is not absolute; reloading will not "
 			  "be possible"));
       else
 	{
@@ -650,7 +652,7 @@ main (int argc, char **argv)
       mu_m_server_destroy (&server);
       if (reload)
 	{
-	  mu_diag_output (MU_DIAG_NOTICE, _("Restarting"));
+	  mu_diag_output (MU_DIAG_NOTICE, _("restarting"));
 	  execvp (argv[0], argv);
 	}
     }
diff --git a/comsat/oldcfg.c b/comsat/oldcfg.c
index b4f235f..b59ae72 100644
--- a/comsat/oldcfg.c
+++ b/comsat/oldcfg.c
@@ -45,7 +45,7 @@ convert_config (const char *config_file, FILE *outfile)
   fp = fopen (config_file, "r");
   if (!fp)
     {
-      mu_error (_("Cannot open config file %s: %s"), config_file,
+      mu_error (_("cannot open config file %s: %s"), config_file,
 		mu_strerror (errno));
       return;
     }
diff --git a/config/mailutils-config.c b/config/mailutils-config.c
index 99689b9..e4037d4 100644
--- a/config/mailutils-config.c
+++ b/config/mailutils-config.c
@@ -134,7 +134,7 @@ add_entry (int level, char *ptr)
   int i;
   if (nentry >= sizeof(lib_entry)/sizeof(lib_entry[0]))
     {
-      mu_error (_("Too many arguments"));
+      mu_error (_("too many arguments"));
       exit (1);
     }
   
diff --git a/configure.ac b/configure.ac
index f852b92..513a373 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 
 # Enable silent rules by default:
-test -z "$enable_silent_rules" && AM_DEFAULT_VERBOSITY=0
+AM_SILENT_RULES([yes])
 
 dnl Autobuild stuff
 AB_INIT
diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c
index 882b1de..8d9098b 100644
--- a/dotlock/dotlock.c
+++ b/dotlock/dotlock.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -100,7 +100,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 
     case ARGP_KEY_ARG:
       if (file)
-	argp_error (state, _("Only one FILE can be specified"));
+	argp_error (state, _("only one FILE can be specified"));
       file = arg;
       break;
 
@@ -178,7 +178,7 @@ main (int argc, char *argv[])
   if ((err = mu_locker_create (&locker, file, flags)))
     {
       if (debug)
-	fprintf (stderr, _("Creating locker failed: %s\n"), mu_strerror (err));
+	mu_diag_funcall (MU_DIAG_ERROR, "mu_locker_create", NULL, err);
       return MU_DL_EX_ERROR;
     }
 
@@ -201,10 +201,9 @@ main (int argc, char *argv[])
   mu_locker_destroy (&locker);
 
   if (debug && err)
-    fprintf (stderr,
-	     unlock ? _("Unlocking the file %s failed: %s\n") :
-	              _("Locking the file %s failed: %s\n"),
-	     file, mu_strerror (err));
+    mu_error (unlock ? _("unlocking the file %s failed: %s") :
+	      _("locking the file %s failed: %s"),
+	      file, mu_strerror (err));
 
   switch (err)
     {
diff --git a/frm/common.c b/frm/common.c
index 4cd4f71..7e0ed3e 100644
--- a/frm/common.c
+++ b/frm/common.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007, 2009 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
@@ -385,7 +385,7 @@ rfc2047_decode_wrapper (const char *buf, size_t buflen)
   if (rc)
     {
       if (frm_debug)
-	mu_error (_("Cannot decode line `%s': %s"),
+	mu_error (_("cannot decode line `%s': %s"),
 		  buf, mu_strerror (rc));
       return strdup (buf);
     }
@@ -528,7 +528,7 @@ frm_abort (mu_mailbox_t *mbox)
     {
       mu_url_t url;
       
-      mu_error (_("Could not close mailbox `%s': %s"),
+      mu_error (_("could not close mailbox `%s': %s"),
 		mu_url_to_string (url), mu_strerror (status));
       exit (3);
     }
@@ -556,10 +556,10 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total)
   if (status != 0)
     {
       if (mailbox_name)
-	mu_error (_("Could not create mailbox `%s': %s"),
+	mu_error (_("could not create mailbox `%s': %s"),
 		  mailbox_name,  mu_strerror (status));
       else
-	mu_error (_("Could not create default mailbox: %s"),
+	mu_error (_("could not create default mailbox: %s"),
 		  mu_strerror (status));
       exit (3);
     }
@@ -578,7 +578,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total)
     *total = 0;
   else if (status != 0)
     {
-      mu_error (_("Could not open mailbox `%s': %s"),
+      mu_error (_("could not open mailbox `%s': %s"),
 		mu_url_to_string (url), mu_strerror (status));
       frm_abort (&mbox);
     }
@@ -598,7 +598,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total)
       status = mu_mailbox_scan (mbox, 1, total);
       if (status != 0)
 	{
-	  mu_error (_("Could not scan mailbox `%s': %s."),
+	  mu_error (_("could not scan mailbox `%s': %s."),
 		    mu_url_to_string (url), mu_strerror (status));
 	  frm_abort (&mbox);
 	}
@@ -608,7 +608,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total)
       
       if ((status = mu_mailbox_close (mbox)) != 0)
 	{
-	  mu_error (_("Could not close mailbox `%s': %s"),
+	  mu_error (_("could not close mailbox `%s': %s"),
 		    mu_url_to_string (url), mu_strerror (status));
 	  exit (3);
 	}
diff --git a/frm/from.c b/frm/from.c
index a969f58..aac7bd6 100644
--- a/frm/from.c
+++ b/frm/from.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009 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
@@ -125,7 +125,7 @@ main (int argc, char **argv)
 
   if (argc - c > 1)
     {
-      mu_error (_("Too many arguments"));
+      mu_error (_("too many arguments"));
       exit (1);
     }
   else if (argc - c > 0)
diff --git a/guimb/collect.c b/guimb/collect.c
index 8839d98..4b94c62 100644
--- a/guimb/collect.c
+++ b/guimb/collect.c
@@ -33,7 +33,7 @@ collect_open_default ()
       int rc = mu_construct_user_mailbox_url (&default_mailbox, user_name);
       if (rc)
 	{
-	  util_error (_("Cannot construct default mailbox URL: %s"),
+	  util_error (_("cannot construct default mailbox URL: %s"),
                       mu_strerror (rc));
 	  exit (1);
 	}
@@ -41,7 +41,7 @@ collect_open_default ()
   if (mu_mailbox_create (&mbox, default_mailbox) != 0
       || mu_mailbox_open (mbox, MU_STREAM_RDWR) != 0)
     {
-      util_error (_("Cannot open default mailbox %s: %s"),
+      util_error (_("cannot open default mailbox %s: %s"),
 		  default_mailbox, mu_strerror (errno));
       exit (1);
     }
@@ -85,7 +85,7 @@ collect_append_file (char *name)
       fp = fopen (name, "r");
       if (!fp)
 	{
-	  util_error (_("Cannot open input file %s: %s"), name, strerror (errno));
+	  util_error (_("cannot open input file %s: %s"), name, strerror (errno));
 	  return -1;
 	}
     }
@@ -113,7 +113,7 @@ collect_create_mailbox ()
   if (mu_mailbox_create (&mbox, temp_filename) != 0
       || mu_mailbox_open (mbox, MU_STREAM_READ) != 0)
     {
-      util_error (_("Cannot create temp mailbox %s: %s"),
+      util_error (_("cannot create temp mailbox %s: %s"),
 		  temp_filename, strerror (errno));
       unlink (temp_filename);
       exit (1);
@@ -124,7 +124,7 @@ collect_create_mailbox ()
 
   if (nmesg == 0)
     {
-      util_error (_("Input format not recognized"));
+      util_error (_("input format not recognized"));
       exit (1);
     }
 }
@@ -149,8 +149,8 @@ collect_output ()
       || mu_mailbox_open (outbox, MU_STREAM_RDWR|MU_STREAM_CREAT) != 0)
     {
       mu_mailbox_destroy (&outbox);
-      fprintf (stderr, _("Cannot open output mailbox %s: %s\n"),
-	       default_mailbox, strerror (errno));
+      mu_error (_("cannot open output mailbox %s: %s"),
+		default_mailbox, strerror (errno));
       return 1;
     }
 
diff --git a/guimb/main.c b/guimb/main.c
index a06ed54..24aa041 100644
--- a/guimb/main.c
+++ b/guimb/main.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   2004, 2005, 2007, 2008, 2009 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
@@ -43,7 +43,7 @@ append_arg (char *arg)
       g_argv = realloc (g_argv, g_size * sizeof (g_argv[0]));
       if (!g_argv)
 	{
-	  util_error (_("Not enough memory"));
+	  util_error (_("not enough memory"));
 	  exit (1);
 	}
     }
diff --git a/guimb/util.c b/guimb/util.c
index 463d368..06c90d1 100644
--- a/guimb/util.c
+++ b/guimb/util.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2007 Free Software Foundation, Inc.
+   2007, 2009 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
@@ -51,14 +51,14 @@ util_get_sender (int msgno)
       if (mu_envelope_sget_sender (env, &buffer)
 	  || mu_address_create (&addr, buffer))
 	{
-	  util_error (_("Cannot determine sender name (msg %d)"), msgno);
+	  util_error (_("cannot determine sender name (msg %d)"), msgno);
 	  return NULL;
 	}
     }
 
   if (mu_address_aget_email (addr, 1, &email))
     {
-      util_error (_("Cannot determine sender name (msg %d)"), msgno);
+      util_error (_("cannot determine sender name (msg %d)"), msgno);
       mu_address_destroy (&addr);
       return NULL;
     }
diff --git a/imap4d/auth_gsasl.c b/imap4d/auth_gsasl.c
index 27afcc5..f170f81 100644
--- a/imap4d/auth_gsasl.c
+++ b/imap4d/auth_gsasl.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2007, 2008, 
+   2009 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
@@ -280,14 +281,14 @@ callback (Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
       if (mu_gsasl_module_data.anon_user)
 	{
 	  char **username = gsasl_callback_hook_get (ctx);
-	  mu_diag_output (MU_DIAG_INFO, _("Anonymous user %s logged in"),
+	  mu_diag_output (MU_DIAG_INFO, _("anonymous user %s logged in"),
 			  gsasl_property_get (sctx, GSASL_ANONYMOUS_TOKEN));
 	  *username = strdup (mu_gsasl_module_data.anon_user);
 	}
       else
 	{
 	  mu_diag_output (MU_DIAG_ERR,
-			  _("Attempt to log in as anonymous user denied"));
+			  _("attempt to log in as anonymous user denied"));
 	}
       break;
       
@@ -300,7 +301,7 @@ callback (Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop)
       
     default:
 	rc = GSASL_NO_CALLBACK;
-	mu_error (_("Unsupported callback property %d"), prop);
+	mu_error (_("unsupported callback property %d"), prop);
 	break;
     }
 
diff --git a/imap4d/auth_gss.c b/imap4d/auth_gss.c
index 5fd54c4..98f8a77 100644
--- a/imap4d/auth_gss.c
+++ b/imap4d/auth_gss.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2003, 2004, 
-   2007 Free Software Foundation, Inc.
+   2007, 2009 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
@@ -254,7 +254,7 @@ auth_gssapi (struct imap4d_command *command,
   if ((mech & SUPPORTED_P_MECH) == 0)
     {
       mu_diag_output (MU_DIAG_NOTICE,
-	      _("Client requested unsupported protection mechanism (%d)"),
+	      _("client requested unsupported protection mechanism (%d)"),
 	      mech);
       gss_release_buffer (&min_stat, &outbuf);
       maj_stat = gss_delete_sec_context (&min_stat, &context, &outbuf);
@@ -267,7 +267,7 @@ auth_gssapi (struct imap4d_command *command,
   *username = malloc (outbuf.length - 4 + 1);
   if (!*username)
     {
-      mu_diag_output (MU_DIAG_NOTICE, _("Not enough memory"));
+      mu_diag_output (MU_DIAG_NOTICE, _("not enough memory"));
       gss_release_buffer (&min_stat, &outbuf);
       maj_stat = gss_delete_sec_context (&min_stat, &context, &outbuf);
       gss_release_buffer (&min_stat, &outbuf);
diff --git a/imap4d/bye.c b/imap4d/bye.c
index 801644c..0a59aa5 100644
--- a/imap4d/bye.c
+++ b/imap4d/bye.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -41,55 +41,55 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
     {
     case ERR_NO_MEM:
       util_out (RESP_BYE, "Server terminating: no more resources.");
-      mu_diag_output (MU_DIAG_ERROR, _("Out of memory"));
+      mu_diag_output (MU_DIAG_ERROR, _("not enough memory"));
       break;
 
     case ERR_TERMINATE:
       status = EX_OK;
       util_out (RESP_BYE, "Server terminating on request.");
-      mu_diag_output (MU_DIAG_NOTICE, _("Terminating on request"));
+      mu_diag_output (MU_DIAG_NOTICE, _("terminating on request"));
       break;
 
     case ERR_SIGNAL:
-      mu_diag_output (MU_DIAG_ERROR, _("Quitting on signal"));
+      mu_diag_output (MU_DIAG_ERROR, _("quitting on signal"));
       exit (status);
 
     case ERR_TIMEOUT:
       status = EX_TEMPFAIL;
       util_out (RESP_BYE, "Session timed out");
       if (state == STATE_NONAUTH)
-        mu_diag_output (MU_DIAG_INFO, _("Session timed out for no user"));
+        mu_diag_output (MU_DIAG_INFO, _("session timed out for no user"));
       else
-	mu_diag_output (MU_DIAG_INFO, _("Session timed out for user: %s"), auth_data->name);
+	mu_diag_output (MU_DIAG_INFO, _("session timed out for user: %s"), auth_data->name);
       break;
 
     case ERR_NO_OFILE:
       status = EX_IOERR;
-      mu_diag_output (MU_DIAG_INFO, _("Write error on control stream"));
+      mu_diag_output (MU_DIAG_INFO, _("write error on control stream"));
       break;
 
     case ERR_NO_IFILE:
       status = EX_IOERR;
-      mu_diag_output (MU_DIAG_INFO, _("Read error on control stream"));
+      mu_diag_output (MU_DIAG_INFO, _("read error on control stream"));
       break;
 
     case ERR_MAILBOX_CORRUPTED:
       status = EX_OSERR;
-      mu_diag_output (MU_DIAG_ERROR, _("Mailbox modified by third party"));
+      mu_diag_output (MU_DIAG_ERROR, _("mailbox modified by third party"));
       break;
       
     case OK:
       status = EX_OK;
       util_out (RESP_BYE, "Session terminating.");
       if (state == STATE_NONAUTH)
-	mu_diag_output (MU_DIAG_INFO, _("Session terminating"));
+	mu_diag_output (MU_DIAG_INFO, _("session terminating"));
       else
-	mu_diag_output (MU_DIAG_INFO, _("Session terminating for user: %s"), auth_data->name);
+	mu_diag_output (MU_DIAG_INFO, _("session terminating for user: %s"), auth_data->name);
       break;
 
     default:
       util_out (RESP_BYE, "Quitting (reason unknown)");
-      mu_diag_output (MU_DIAG_ERROR, _("Quitting (numeric reason %d)"), reason);
+      mu_diag_output (MU_DIAG_ERROR, _("quitting (numeric reason %d)"), reason);
       break;
     }
 
diff --git a/imap4d/close.c b/imap4d/close.c
index 294d12a..fd45d06 100644
--- a/imap4d/close.c
+++ b/imap4d/close.c
@@ -35,8 +35,7 @@ imap4d_close0 (struct imap4d_command *command, imap4d_tokbuf_t tok,
       status = mu_mailbox_flush (mbox, expunge);
       if (status)
 	{
-	  mu_diag_output (MU_DIAG_ERROR,
-		  _("flushing mailbox failed: %s"), mu_strerror (status));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_flush", NULL, status);
 	  msg = "flushing mailbox failed";
 	}
     }
@@ -46,8 +45,7 @@ imap4d_close0 (struct imap4d_command *command, imap4d_tokbuf_t tok,
   status = mu_mailbox_close (mbox);
   if (status)
     {
-      mu_diag_output (MU_DIAG_ERROR,
-		      _("closing mailbox failed: %s"), mu_strerror (status));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_close", NULL, status);
       msg = "closing mailbox failed";
     }
   mu_mailbox_destroy (&mbox);
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index dc5cc90..1f8cb64 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -185,7 +185,7 @@ cb_mode (mu_debug_t debug, void *data, mu_config_value_t *val)
   home_dir_mode = strtoul (val->v.string, &p, 8);
   if (p[0] || (home_dir_mode & ~0777))
     mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-                         _("Invalid mode specification: %s"),
+                         _("invalid mode specification: %s"),
 			 val->v.string);
   return 0;
 }
@@ -257,8 +257,7 @@ cb_preauth (mu_debug_t debug, void *data, mu_config_value_t *val)
 
       if (rc)
 	{
-	  mu_cfg_format_error (debug, MU_DEBUG_ERROR,
-			       _("cannot create URL: %s"), mu_strerror (rc));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_url_create", val->v.string, rc);
 	  return 1;
 	}
       rc = mu_url_parse (url);
@@ -368,9 +367,8 @@ imap4d_session_setup0 ()
       if (rc)
 	{
 	  free (real_homedir);
-	  mu_diag_output (MU_DIAG_ERR,
-			  _("Error expanding %s: %s"),
-			  modify_homedir, mu_strerror (rc));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_vartab_expand",
+			   modify_homedir, rc);
 	  return 1;
 	}
     }
@@ -392,7 +390,7 @@ imap4d_session_setup0 ()
   util_chdir (imap4d_homedir);
   namespace_init_session (imap4d_homedir);
   mu_diag_output (MU_DIAG_INFO,
-		  _("User `%s' logged in (source: %s)"), auth_data->name,
+		  _("user `%s' logged in (source: %s)"), auth_data->name,
 		  auth_data->source);
   return 0;
 }
@@ -403,7 +401,7 @@ imap4d_session_setup (char *username)
   auth_data = mu_get_auth_by_name (username);
   if (auth_data == NULL)
     {
-      mu_diag_output (MU_DIAG_INFO, _("User `%s': nonexistent"), username);
+      mu_diag_output (MU_DIAG_INFO, _("user `%s' nonexistent"), username);
       return 1;
     }
   return imap4d_session_setup0 ();
@@ -416,9 +414,7 @@ get_client_address (int fd, struct sockaddr_in *pcs)
 
   if (getpeername (fd, (struct sockaddr *) pcs, &len) < 0)
     {
-      mu_diag_output (MU_DIAG_ERROR,
-		      _("Cannot obtain IP address of client: %s"),
-		      strerror (errno));
+      mu_diag_funcall (MU_DIAG_ERROR, "getpeername", NULL, errno);
       return 1;
     }
   return 0;
@@ -442,7 +438,7 @@ imap4d_mainloop (int fd, FILE *infile, FILE *outfile)
     {
       if (debug_mode)
 	{
-	  mu_diag_output (MU_DIAG_INFO, _("Started in debugging mode"));
+	  mu_diag_output (MU_DIAG_INFO, _("started in debugging mode"));
 	  text = "IMAP4rev1 Debugging mode";
 	}
       else
@@ -586,20 +582,19 @@ main (int argc, char **argv)
 	{
 	  if (errno == 0 || errno == ENOENT)
             {
-               mu_error (_("%s: No such group"), "mail");
+               mu_error (_("%s: no such group"), "mail");
                exit (EX_CONFIG);
             }
           else
             {
-	       mu_error (_("Error getting mail group: %s"), 
-                         mu_strerror (errno));
-	       exit (EX_OSERR);
+	      mu_diag_funcall (MU_DIAG_ERROR, "getgrnam", "mail", errno);
+	      exit (EX_OSERR);
             }
 	}
 
       if (setgid (gr->gr_gid) == -1)
 	{
-	  mu_error (_("Error setting mail group: %s"), mu_strerror (errno));
+	  mu_error (_("error setting mail group: %s"), mu_strerror (errno));
 	  exit (EX_OSERR);
 	}
     }
@@ -644,7 +639,7 @@ main (int argc, char **argv)
     }
 
   if (status)
-    mu_error (_("Main loop status: %s"), mu_strerror (status));	  
+    mu_error (_("main loop status: %s"), mu_strerror (status));	  
   /* Close the syslog connection and exit.  */
   closelog ();
 
diff --git a/imap4d/login.c b/imap4d/login.c
index fb7a774..4528fe7 100644
--- a/imap4d/login.c
+++ b/imap4d/login.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2006,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -50,7 +50,7 @@ imap4d_login (struct imap4d_command *command, imap4d_tokbuf_t tok)
 
   if (auth_data == NULL)
     {
-      mu_diag_output (MU_DIAG_INFO, _("User `%s': nonexistent"), username);
+      mu_diag_output (MU_DIAG_INFO, _("user `%s' nonexistent"), username);
       return util_finish (command, RESP_NO, "User name or passwd rejected");
     }
 
@@ -58,7 +58,7 @@ imap4d_login (struct imap4d_command *command, imap4d_tokbuf_t tok)
   openlog (MU_LOG_TAG (), LOG_PID, mu_log_facility);
   if (rc)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Login failed: %s"), username);
+      mu_diag_output (MU_DIAG_INFO, _("login failed: %s"), username);
       return util_finish (command, RESP_NO, "User name or passwd rejected");
     }
 
diff --git a/imap4d/preauth.c b/imap4d/preauth.c
index 06eb231..b1b44d0 100644
--- a/imap4d/preauth.c
+++ b/imap4d/preauth.c
@@ -260,7 +260,7 @@ ident_decrypt (const char *file, const char *name)
   if (size != 24)
     {
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Incorrect length of IDENT DES packet"));
+		      _("incorrect length of IDENT DES packet"));
       free (buf);
       return NULL;
     }
@@ -269,7 +269,7 @@ ident_decrypt (const char *file, const char *name)
   if (fd < 0)
     {
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Cannot open file %s: %s"),
+		      _("cannot open file %s: %s"),
 		      file, mu_strerror (errno));
       return NULL;
     }
@@ -310,13 +310,13 @@ ident_decrypt (const char *file, const char *name)
       auth_data = mu_get_auth_by_uid (uid);
       if (!auth_data)
 	{
-	  mu_diag_output (MU_DIAG_ERROR, _("No user with UID %u"), uid);
+	  mu_diag_output (MU_DIAG_ERROR, _("no user with UID %u"), uid);
 	  return NULL;
 	}
       return auth_data->name;
     }
   else
-    mu_diag_output (MU_DIAG_ERROR, _("Failed to decrypt IDENT reply"));
+    mu_diag_output (MU_DIAG_ERROR, _("failed to decrypt IDENT reply"));
   return NULL;
 }
 
@@ -334,13 +334,13 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
 
   if (!srv_sa || !clt_sa)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Not enough data for IDENT preauth"));
+      mu_diag_output (MU_DIAG_ERROR, _("not enough data for IDENT preauth"));
       return NULL;
     }
   if (srv_sa->sa_family != AF_INET)
     {
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Invalid address family (%d) for IDENT preauth"),
+		      _("invalid address family (%d) for IDENT preauth"),
 		      srv_sa->sa_family);
       return NULL;
     }
@@ -354,7 +354,7 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
 			     MU_STREAM_RDWR | MU_STREAM_NO_CHECK);
   if (rc)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Cannot create TCP stream: %s"),
+      mu_diag_output (MU_DIAG_INFO, _("cannot create TCP stream: %s"),
 		      mu_strerror (rc));
       return NULL;
     }
@@ -362,7 +362,7 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
   rc = mu_stream_open (stream);
   if (rc)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Cannot open TCP stream to %s:%d: %s"),
+      mu_diag_output (MU_DIAG_INFO, _("cannot open TCP stream to %s:%d: %s"),
 		      hostaddr, ident_port, mu_strerror (rc));
       return NULL;
     }
@@ -377,7 +377,7 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
   mu_stream_destroy (&stream, NULL);
   if (rc)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Cannot read answer from %s:%d: %s"),
+      mu_diag_output (MU_DIAG_INFO, _("cannot read answer from %s:%d: %s"),
 		      hostaddr, ident_port, mu_strerror (rc));
       return NULL;
     }
@@ -386,14 +386,14 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
   name = ident_extract_username (buf);
   if (!name)
     mu_diag_output (MU_DIAG_INFO,
-		    _("Malformed IDENT response: `%s', from %s:%d"),
+		    _("malformed IDENT response: `%s', from %s:%d"),
 		    buf, hostaddr, ident_port);
   else if (is_des_p (name))
     {
       if (!ident_keyfile)
 	{
 	  mu_diag_output (MU_DIAG_ERROR,
-			  _("Keyfile not specified in config; "
+			  _("keyfile not specified in config; "
 			    "use `ident-keyfile FILE'"));
 	  name = NULL;
 	}
@@ -403,7 +403,7 @@ do_preauth_ident (struct sockaddr *clt_sa, struct sockaddr *srv_sa)
   else if (ident_encrypt_only)
     {
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Refusing unencrypted ident reply from %s:%d"),
+		      _("refusing unencrypted ident reply from %s:%d"),
 		      hostaddr, ident_port);
       name = NULL;
     }
@@ -485,7 +485,7 @@ imap4d_preauth_setup (int fd)
   if (getpeername (fd, (struct sockaddr *) &clt_sa, &clt_len) == -1)
     {
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Cannot obtain IP address of client: %s"),
+		      _("cannot obtain IP address of client: %s"),
 		      strerror (errno));
       pclt_sa = NULL;
       clt_len = 0;
diff --git a/imap4d/signal.c b/imap4d/signal.c
index 607b059..d883e08 100644
--- a/imap4d/signal.c
+++ b/imap4d/signal.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2007, 
-   2008 Free Software Foundation, Inc.
+   2008, 2009 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
@@ -49,7 +49,7 @@ imap4d_master_signal (int signo)
 RETSIGTYPE
 imap4d_child_signal (int signo)
 {
-  mu_diag_output (MU_DIAG_CRIT, _("Got signal `%s'"), strsignal (signo));
+  mu_diag_output (MU_DIAG_CRIT, _("got signal `%s'"), strsignal (signo));
 
   switch (signo)
     {
diff --git a/imap4d/starttls.c b/imap4d/starttls.c
index 0aed6d8..e2dfbd6 100644
--- a/imap4d/starttls.c
+++ b/imap4d/starttls.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2008, 2009 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
@@ -62,7 +62,7 @@ imap4d_starttls (struct imap4d_command *command, imap4d_tokbuf_t tok)
     }
   else
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Session terminated"));
+      mu_diag_output (MU_DIAG_ERROR, _("session terminated"));
       util_bye ();
       exit (EX_OK);
     }
diff --git a/imap4d/util.c b/imap4d/util.c
index a5bc309..8350de0 100644
--- a/imap4d/util.c
+++ b/imap4d/util.c
@@ -695,7 +695,7 @@ util_localname ()
 	}
       if (status || name == NULL)
 	{
-	  mu_diag_output (MU_DIAG_CRIT, _("Cannot find out my own hostname"));
+	  mu_diag_output (MU_DIAG_CRIT, _("cannot find out my own hostname"));
 	  exit (EX_OSERR);
 	}
 
@@ -853,8 +853,8 @@ util_wait_input (int timeout)
   status = mu_stream_wait (istream, &wflags, &tv);
   if (status)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Cannot poll input stream: %s"),
-	      mu_strerror(status));
+      mu_diag_output (MU_DIAG_ERROR, _("cannot poll input stream: %s"),
+		      mu_strerror(status));
       return -1;
     }
   return wflags & MU_STREAM_READY_RD;
@@ -887,7 +887,7 @@ imap4d_init_tls_server ()
     {
       const char *p;
       mu_stream_strerror (stream, &p);
-      mu_diag_output (MU_DIAG_ERROR, _("Cannot open TLS stream: %s"), p);
+      mu_diag_output (MU_DIAG_ERROR, _("cannot open TLS stream: %s"), p);
       return 0;
     }
 
@@ -1231,12 +1231,12 @@ check_input_err (int rc, size_t sz)
 	p = mu_strerror (rc);
       
       mu_diag_output (MU_DIAG_INFO,
-		      _("Error reading from input file: %s"), p);
+		      _("error reading from input file: %s"), p);
       imap4d_bye (ERR_NO_IFILE);
     }
   else if (sz == 0)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Unexpected eof on input"));
+      mu_diag_output (MU_DIAG_INFO, _("unexpected eof on input"));
       imap4d_bye (ERR_NO_IFILE);
     }
 }
diff --git a/include/mailutils/diag.h b/include/mailutils/diag.h
index d35b3da..c738f5e 100644
--- a/include/mailutils/diag.h
+++ b/include/mailutils/diag.h
@@ -54,6 +54,9 @@ int mu_diag_stderr_printer (void *, mu_log_level_t, const char *);
 
 int mu_diag_level_to_syslog (mu_log_level_t level);
 const char *mu_diag_level_to_string (mu_log_level_t level);
+
+void mu_diag_funcall (mu_log_level_t level, const char *func,
+		      const char *arg, int err);
   
 #ifdef __cplusplus
 }
diff --git a/lib/mailcap.c b/lib/mailcap.c
index 5a43329..f99d512 100644
--- a/lib/mailcap.c
+++ b/lib/mailcap.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009 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
@@ -442,7 +442,7 @@ create_filter (char *cmd, int outfd, int *infd)
 	dup2 (outfd, 1);
 
       execvp (argv[0], argv);
-      mu_error (_("Cannot execute `%s': %s"), cmd, mu_strerror (errno));
+      mu_error (_("cannot execute `%s': %s"), cmd, mu_strerror (errno));
       _exit (127);
     }
 
diff --git a/lib/tcpwrap.c b/lib/tcpwrap.c
index a611427..a6504ad 100644
--- a/lib/tcpwrap.c
+++ b/lib/tcpwrap.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2003, 2004, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 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
@@ -46,7 +46,7 @@ mu_tcp_wrapper_cb_hosts_allow_syslog (mu_debug_t debug, void *data,
     return 1;
   if (mu_string_to_syslog_priority (val->v.string, &allow_severity))
     mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-			 _("Unknown syslog priority `%s'"), 
+			 _("unknown syslog priority `%s'"), 
 			 val->v.string);
   return 0;
 }
@@ -59,7 +59,7 @@ mu_tcp_wrapper_cb_hosts_deny_syslog (mu_debug_t debug, void *data,
     return 1;
   if (mu_string_to_syslog_priority (val->v.string, &deny_severity))
     mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-			 _("Unknown syslog priority `%s'"), 
+			 _("unknown syslog priority `%s'"), 
 			 val->v.string);
   return 0;
 }
@@ -138,7 +138,7 @@ mu_tcp_wrapper_prefork (int fd, void *data, struct sockaddr *sa, int salen)
       && !mu_tcpwrapper_access (fd))
     {
       char *p = mu_sockaddr_to_astr (sa, salen);
-      mu_error (_("Access from %s blocked by TCP wrappers."), p);
+      mu_error (_("access from %s blocked by TCP wrappers"), p);
       free (p);
       return 1;
     }
diff --git a/libmu_argp/mu_argp.c b/libmu_argp/mu_argp.c
index 69ce307..2172e82 100644
--- a/libmu_argp/mu_argp.c
+++ b/libmu_argp/mu_argp.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007 Free Software Foundation, Inc.
+   2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -91,7 +91,7 @@ mu_build_argp (const struct argp *template, char **capa)
   ap = calloc (n + 1, sizeof (*ap));
   if (!ap)
     {
-      mu_error (_("Out of memory"));
+      mu_error (_("not enough memory"));
       abort ();
     }
 
@@ -126,7 +126,7 @@ mu_build_argp (const struct argp *template, char **capa)
   argp = malloc (sizeof (*argp));
   if (!argp)
     {
-      mu_error (_("Out of memory"));
+      mu_error (_("not enough memory"));
       abort ();
     }
 
diff --git a/libmu_auth/ldap.c b/libmu_auth/ldap.c
index f6616b4..74c4e02 100644
--- a/libmu_auth/ldap.c
+++ b/libmu_auth/ldap.c
@@ -101,11 +101,11 @@ _mu_conn_setup (LDAP **pld)
     {
       if (ber_set_option (NULL, LBER_OPT_DEBUG_LEVEL, &ldap_param.debug)
 	  != LBER_OPT_SUCCESS )
-	mu_error (_("Cannot set LBER_OPT_DEBUG_LEVEL %d"), ldap_param.debug);
+	mu_error (_("cannot set LBER_OPT_DEBUG_LEVEL %d"), ldap_param.debug);
 
       if (ldap_set_option (NULL, LDAP_OPT_DEBUG_LEVEL, &ldap_param.debug)
 	  != LDAP_OPT_SUCCESS )
-	mu_error (_("Could not set LDAP_OPT_DEBUG_LEVEL %d"),
+	mu_error (_("could not set LDAP_OPT_DEBUG_LEVEL %d"),
 		  ldap_param.debug);
     }
 
@@ -114,7 +114,7 @@ _mu_conn_setup (LDAP **pld)
       rc = ldap_url_parse (ldap_param.url, &ludlist);
       if (rc != LDAP_URL_SUCCESS)
 	{
-	  mu_error (_("Cannot parse LDAP URL(s)=%s (%d)"),
+	  mu_error (_("cannot parse LDAP URL(s)=%s (%d)"),
 		    ldap_param.url, rc);
 	  return 1;
 	}
@@ -136,7 +136,7 @@ _mu_conn_setup (LDAP **pld)
 	      
 	      if (ldap_dn2domain (lud->lud_dn, &domain) || !domain)
 		{
-		  mu_error (_("DNS SRV: Cannot convert DN=\"%s\" into a domain"),
+		  mu_error (_("DNS SRV: cannot convert DN=\"%s\" into a domain"),
 			    lud->lud_dn );
 		  goto dnssrv_free;
 		}
@@ -144,7 +144,7 @@ _mu_conn_setup (LDAP **pld)
 	      rc = ldap_domain2hostlist (domain, &hostlist);
 	      if (rc)
 		{
-		  mu_error (_("DNS SRV: Cannot convert domain=%s into a hostlist"),
+		  mu_error (_("DNS SRV: cannot convert domain=%s into a hostlist"),
 			    domain);
 		  goto dnssrv_free;
 		}
@@ -152,7 +152,7 @@ _mu_conn_setup (LDAP **pld)
 	      rc = mu_argcv_get (hostlist, " ", NULL, &hostcnt, &hosts);
 	      if (rc)
 		{
-		  mu_error (_("DNS SRV: Could not parse hostlist=\"%s\": %s"),
+		  mu_error (_("DNS SRV: could not parse hostlist=\"%s\": %s"),
 			    hostlist, mu_strerror (rc));
 		  goto dnssrv_free;
 		}
@@ -235,13 +235,14 @@ _mu_conn_setup (LDAP **pld)
       
       ber_memvfree ((void **)urls);
     }
-  
-  mu_error ("INFO: Constructed LDAP URI: %s", ldapuri ? ldapuri : "<DEFAULT>");
+
+  mu_diag_output (MU_DIAG_INFO,
+		  "constructed LDAP URI: %s", ldapuri ? ldapuri : "<DEFAULT>");
 
   rc = ldap_initialize (&ld, ldapuri);
   if (rc != LDAP_SUCCESS)
     {
-      mu_error (_("Cannot create LDAP session handle for URI=%s (%d): %s"),
+      mu_error (_("cannot create LDAP session handle for URI=%s (%d): %s"),
 		ldapuri, rc, ldap_err2string (rc));
 
       free (ldapuri);
@@ -408,7 +409,7 @@ get_quota (mu_off_t *pquota, const char *str)
       break;
 	      
     default:
-      mu_error (_("Invalid value for quota: %s"), str);
+      mu_error (_("invalid value for quota: %s"), str);
     }
 }
 
diff --git a/libmu_auth/radius.c b/libmu_auth/radius.c
index 1a63d40..96a34de 100644
--- a/libmu_auth/radius.c
+++ b/libmu_auth/radius.c
@@ -69,7 +69,7 @@ get_attribute (int *pattr, char *name)
   grad_dict_attr_t *attr = grad_attr_name_to_dict (name);
   if (!attr)
     {
-      mu_error (_("Radius attribute %s not defined"), name);
+      mu_error (_("RADIUS attribute %s not defined"), name);
       return 1;
     }
   *pattr = attr->value;
@@ -100,7 +100,7 @@ parse_pairlist (grad_avp_t **plist, char *input)
 
   if ((rc = mu_argcv_get (input, ",", NULL, &argc, &argv)))
     {
-      mu_error (_("Cannot parse input `%s': %s"), input, mu_strerror (rc));
+      mu_error (_("cannot parse input `%s': %s"), input, mu_strerror (rc));
       return 1;
     }
 
@@ -214,7 +214,7 @@ mu_radius_module_init (enum mu_gocs_op op, void *data)
 
   if (grad_dict_init ())
     {
-      mu_error (_("Cannot read radius dictionaries"));
+      mu_error (_("cannot read radius dictionaries"));
       return 1;
     }
 
@@ -342,7 +342,7 @@ decode_reply (grad_request_t *reply, const char *user_name, char *password,
     uid = p->avp_lvalue;
   else
     {
-      mu_error (_("Radius did not return UID for `%s'"),  user_name);
+      mu_error (_("radius server did not return UID for `%s'"),  user_name);
       return -1;
     }
 
@@ -351,7 +351,7 @@ decode_reply (grad_request_t *reply, const char *user_name, char *password,
     gid = p->avp_lvalue;
   else
     {
-      mu_error (_("Radius did not return GID for `%s'"),  user_name);
+      mu_error (_("radius server did not return GID for `%s'"),  user_name);
       return -1;
     }
 
diff --git a/libmu_auth/sql.c b/libmu_auth/sql.c
index 2f2b85d..36f82d2 100644
--- a/libmu_auth/sql.c
+++ b/libmu_auth/sql.c
@@ -175,7 +175,7 @@ get_field (mu_sql_connection_t conn, const char *id, char **ret, int mandatory)
   if (rc)
     {
       if (mandatory || rc != MU_ERR_NOENT)
-	mu_error (_("Cannot get SQL field `%s' (`%s'): %s"),
+	mu_error (_("cannot get SQL field `%s' (`%s'): %s"),
 		  id, name ? *name : id, mu_strerror (rc));
     }
   else if (!*ret)
@@ -220,14 +220,14 @@ decode_tuple_new (mu_sql_connection_t conn, int n,
   uid = strtoul (suid, &p, 0);
   if (*p)
     {
-      mu_error (_("Invalid value for uid: %s"), suid);
+      mu_error (_("invalid value for uid: %s"), suid);
       return MU_ERR_FAILURE;
     }
 
   gid = strtoul (sgid, &p, 0);
   if (*p)
     {
-      mu_error (_("Invalid value for gid: %s"), sgid);
+      mu_error (_("invalid value for gid: %s"), sgid);
       return MU_ERR_FAILURE;
     }
   
@@ -271,7 +271,7 @@ decode_tuple_new (mu_sql_connection_t conn, int n,
 	      break;
 	      
 	    default:
-	      mu_error (_("Invalid value for quota: %s"), squota);
+	      mu_error (_("invalid value for quota: %s"), squota);
 	      free (mailbox_name);
 	      return MU_ERR_FAILURE;
 	    }
@@ -373,7 +373,7 @@ mu_auth_sql_by_name (struct mu_auth_data **return_data,
 
   if (status)
     {
-      mu_error (_("Cannot store SQL result: %s"),
+      mu_error (_("cannot store SQL result: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -457,7 +457,7 @@ mu_auth_sql_by_uid (struct mu_auth_data **return_data,
 
   if (status)
     {
-      mu_error (_("Cannot store SQL result: %s"),
+      mu_error (_("cannot store SQL result: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -533,7 +533,7 @@ mu_sql_getpass (const char *username, char **passwd)
 
   if (status)
     {
-      mu_error (_("Cannot store SQL result: %s"),
+      mu_error (_("cannot store SQL result: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -543,7 +543,7 @@ mu_sql_getpass (const char *username, char **passwd)
   status = mu_sql_get_column (conn, 0, 0, &sql_pass);
   if (status)
     {
-      mu_error (_("Cannot get password from SQL: %s"),
+      mu_error (_("cannot get password from SQL: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_release_result (conn);
@@ -616,7 +616,7 @@ mu_sql_module_init (enum mu_gocs_op op, void *data)
   mu_sql_module_config.interface = mu_sql_interface_index (cfg->interface);
   if (mu_sql_module_config.interface == 0)
     {
-      mu_error (_("Unknown SQL interface `%s'"), cfg->interface);
+      mu_error (_("unknown SQL interface `%s'"), cfg->interface);
       return 1;
     }
 
diff --git a/libmu_auth/tls.c b/libmu_auth/tls.c
index e7560a3..e4efe64 100644
--- a/libmu_auth/tls.c
+++ b/libmu_auth/tls.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -102,7 +102,7 @@ mu_check_tls_environment (void)
 	}
       if ((st.st_mode & S_IRWXG) || (st.st_mode & S_IRWXO))
 	{
-	  mu_error (_("Wrong permissions on %s. Set 0600"),
+	  mu_error (_("wrong permissions on %s (set 0600)"),
 		    mu_tls_module_config.ssl_key);
 	  return 0;
 	}
diff --git a/libmu_cfg/acl.c b/libmu_cfg/acl.c
index dd79ad5..b1d0866 100644
--- a/libmu_cfg/acl.c
+++ b/libmu_cfg/acl.c
@@ -1,5 +1,5 @@
 /* This file is part of GNU Mailutils
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 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
@@ -76,7 +76,7 @@ parse_address (mu_debug_t err, const char *str, struct netdef *nd)
     }
   else if (inet_aton (str, &in.sin_addr) == 0)
     {
-      mu_cfg_format_error (err, MU_DEBUG_ERROR, _("Invalid IPv4: %s"), str);
+      mu_cfg_format_error (err, MU_DEBUG_ERROR, _("invalid IPv4: %s"), str);
       return 1;
     }
   in.sin_port = 0;
diff --git a/libmu_cfg/common.c b/libmu_cfg/common.c
index 15a40f0..f794596 100644
--- a/libmu_cfg/common.c
+++ b/libmu_cfg/common.c
@@ -137,7 +137,7 @@ cb_facility (mu_debug_t debug, void *data, mu_config_value_t *val)
   if (mu_string_to_syslog_facility (val->v.string, &logging_settings.facility))
     {
       mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-                           _("Unknown syslog facility `%s'"), 
+                           _("unknown syslog facility `%s'"), 
 			   val->v.string);
       return 1;
     }
diff --git a/libmu_cfg/init.c b/libmu_cfg/init.c
index 61c9fb6..5cd627b 100644
--- a/libmu_cfg/init.c
+++ b/libmu_cfg/init.c
@@ -1,5 +1,5 @@
 /* This file is part of GNU Mailutils
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 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
@@ -74,7 +74,7 @@ mu_libcfg_init (char **cnames)
 	{
 	  struct mu_cfg_capa *cp = find_cfg_capa (cnames[i]);
 	  if (!cp)
-	    mu_error (_("Requested unknown configuration group `%s'"),
+	    mu_error (_("unknown configuration group requested `%s'"),
 		      cnames[i]);
 	  else
 	    mu_config_register_section (NULL, cp->name, NULL,
@@ -132,7 +132,7 @@ mu_parse_config_files (struct mu_cfg_param *param, void *target)
 			    flags, target);
       if (rc)
 	{
-	  mu_error (_("Errors parsing file %s: %s"), mu_load_rcfile,
+	  mu_error (_("errors parsing file %s: %s"), mu_load_rcfile,
 		    mu_strerror (rc));
 	  return rc;
 	}
diff --git a/libmu_cfg/ldap.c b/libmu_cfg/ldap.c
index 1b5e374..cf3a1a8 100644
--- a/libmu_cfg/ldap.c
+++ b/libmu_cfg/ldap.c
@@ -1,5 +1,5 @@
 /* This file is part of GNU Mailutils
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 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
@@ -32,7 +32,7 @@ _cb2_field_map (mu_debug_t debug, const char *arg, void *data)
   int rc = mutil_parse_field_map (arg, &ldap_settings.field_map, &err);
   if (rc)
     /* FIXME: this message may be misleading */
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Error near element %d: %s"),
+    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("error near element %d: %s"),
 			 err, mu_strerror (rc));
   return 0;
 }
diff --git a/libmu_cfg/sql.c b/libmu_cfg/sql.c
index 714cf3f..f21e309 100644
--- a/libmu_cfg/sql.c
+++ b/libmu_cfg/sql.c
@@ -1,5 +1,5 @@
 /* This file is part of GNU Mailutils
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 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
@@ -48,7 +48,7 @@ _cb2_field_map (mu_debug_t debug, const char *arg, void *data)
   int rc = mutil_parse_field_map (arg, &sql_settings.field_map, &err);
   if (rc)
     /* FIXME: this message may be misleading */
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Error near element %d: %s"),
+    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("error near element %d: %s"),
 			 err, mu_strerror (rc));
   return 0;
 }
diff --git a/libmu_sieve/actions.c b/libmu_sieve/actions.c
index ae0bf21..b3e56d8 100644
--- a/libmu_sieve/actions.c
+++ b/libmu_sieve/actions.c
@@ -439,7 +439,7 @@ sieve_action_redirect (mu_sieve_machine_t mach, mu_list_t args, mu_list_t tags)
   msg = mu_sieve_get_message (mach);
   if (check_redirect_loop (msg))
     {
-      mu_sieve_error (mach, _("%d: Redirection loop detected"),
+      mu_sieve_error (mach, _("%d: redirection loop detected"),
 		   mu_sieve_get_message_num (mach));
       goto end;
     }
diff --git a/libmu_sieve/comparator.c b/libmu_sieve/comparator.c
index 352c31b..92de9af 100644
--- a/libmu_sieve/comparator.c
+++ b/libmu_sieve/comparator.c
@@ -169,11 +169,11 @@ _regex_compile (void *item, void *data)
       if (errbuf)
 	{
 	  regerror (rc, preg, errbuf, size);
-	  mu_sv_compile_error (&mu_sieve_locus, _("Regex error: %s"), errbuf);
+	  mu_sv_compile_error (&mu_sieve_locus, _("regex error: %s"), errbuf);
 	  free (errbuf);
 	}
       else
-	mu_sv_compile_error (&mu_sieve_locus, _("Regex error"));
+	mu_sv_compile_error (&mu_sieve_locus, _("regex error"));
       return rc;
     }
 
diff --git a/libmu_sieve/extensions/moderator.c b/libmu_sieve/extensions/moderator.c
index cf7f19f..acbf0e5 100644
--- a/libmu_sieve/extensions/moderator.c
+++ b/libmu_sieve/extensions/moderator.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -80,7 +80,7 @@ moderator_filter_message (mu_sieve_machine_t mach, mu_list_t tags,
       rc = mu_sieve_machine_inherit (mach, &newmach);
       if (rc)
 	{
-	  mu_sieve_error (mach, _("Cannot initialize sieve machine: %s"),
+	  mu_sieve_error (mach, _("cannot initialize sieve machine: %s"),
 			  mu_strerror (rc));
 	  return 1;
 	}
@@ -234,7 +234,7 @@ moderator_message_get_part (mu_sieve_machine_t mach,
     }
   else
     {
-      mu_sieve_error (mach, _("No Content-Type header found"));
+      mu_sieve_error (mach, _("no Content-Type header found"));
       return 1;
     }
   return 0;
diff --git a/libmu_sieve/prog.c b/libmu_sieve/prog.c
index f7b69dd..79141ae 100644
--- a/libmu_sieve/prog.c
+++ b/libmu_sieve/prog.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2004, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -37,7 +37,7 @@ mu_sv_code (sieve_op_t *op)
 					     sizeof mu_sieve_machine->prog[0]);
       if (!newprog)
 	{
-	  mu_sv_compile_error (&mu_sieve_locus, _("out of memory!"));
+	  mu_sv_compile_error (&mu_sieve_locus, _("not enough memory"));
 	  return 1;
 	}
       mu_sieve_machine->prog = newprog;
diff --git a/libmu_sieve/sieve.l b/libmu_sieve/sieve.l
index 8322049..c66b872 100644
--- a/libmu_sieve/sieve.l
+++ b/libmu_sieve/sieve.l
@@ -152,7 +152,8 @@ push_source (const char *name)
   if (!fp)
     {
       mu_sv_compile_error (&mu_sieve_locus, 
-                           _("cannot open `%s': %s"), name, strerror (errno));
+                           _("cannot open file `%s': %s"),
+			   name, strerror (errno));
       return 1;
     }
 
@@ -506,7 +507,7 @@ line_add (char *text, size_t len)
   s = malloc (len + 1);
   if (!s)
     {
-      yyerror (_("Not enough memory"));
+      yyerror (_("not enough memory"));
       exit (1);
     }
   memcpy (s, text, len);
@@ -570,7 +571,7 @@ multiline_begin ()
       multiline_delimiter = strdup (".");
       if (!multiline_delimiter)
 	{
-	  yyerror (_("Not enough memory"));
+	  yyerror (_("not enough memory"));
 	  exit (1);
 	}
     }
@@ -625,7 +626,7 @@ ident (const char *text)
   yylval.string = strdup (text);
   if (!yylval.string)
     {
-      yyerror (_("Not enough memory"));
+      yyerror (_("not enough memory"));
       exit (1);
     }
 }
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c
index 9857f69..56dac5d 100644
--- a/libproto/imap/folder.c
+++ b/libproto/imap/folder.c
@@ -2342,7 +2342,7 @@ imap_parse (f_imap_t f_imap)
       if (!tag)
 	{
 	  /* Just in case */
-	  mu_error (_("No tag in response: %s %s"), response, remainder);
+	  mu_error (_("no tag in response: %s %s"), response, remainder);
 	  status = MU_ERR_FAILURE;
 	}
       /* Is the response untagged ?  */
@@ -2482,18 +2482,18 @@ imap_parse (f_imap_t f_imap)
 		{
 		  /* Not sure why we would get an untagged ok...but we do... */
 		  /* Still should we be verbose about is ? */
-		  mu_error (_("Untagged OK: %s"), remainder);
+		  mu_error (_("untagged OK response: %s"), remainder);
 		}
 	    }
 	  else if (mu_c_strcasecmp (response, "NO") == 0)
 	    {
 	      /* This does not mean failure but rather a strong warning.  */
-	      mu_error (_("Untagged NO: %s"), remainder);
+	      mu_error (_("untagged NO response: %s"), remainder);
 	    }
 	  else if (mu_c_strcasecmp (response, "BAD") == 0)
 	    {
 	      /* We're dead, protocol/syntax error.  */
-	      mu_error (_("Untagged BAD: %s"), remainder);
+	      mu_error (_("untagged BAD response: %s"), remainder);
 	    }
 	  else if (mu_c_strcasecmp (response, "PREAUTH") == 0)
 	    {
@@ -2591,7 +2591,7 @@ imap_parse (f_imap_t f_imap)
 	  else /* NO and BAD */
 	    {
 	      status = EINVAL;
-	      mu_error (_("NO/Bad Tagged: %s %s %s"),
+	      mu_error (_("NO or BAD tagged response: %s %s %s"),
 			tag, response, remainder);
 	    }
 	}
diff --git a/libproto/mbox/mbox.c b/libproto/mbox/mbox.c
index 2d8fbdb..c129dc0 100644
--- a/libproto/mbox/mbox.c
+++ b/libproto/mbox/mbox.c
@@ -351,7 +351,7 @@ mbox_is_updated (mu_mailbox_t mailbox)
       mu_observable_notify (mailbox->observable, MU_EVT_MAILBOX_CORRUPT,
 			    mailbox);
       /* And be verbose.  ? */
-      mu_error (_("* BAD : Mailbox corrupted, shrank in size"));
+      mu_diag_output (MU_DIAG_EMERG, _("mailbox corrupted, shrank in size"));
       /* FIXME: should I crash.  */
       return 0;
     }
@@ -466,7 +466,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
     {
       if (tmpmboxname)
 	free (tmpmboxname);
-      mu_error (_("Failed to create temporary file when expunging"));
+      mu_error (_("failed to create temporary file when expunging"));
       return errno;
     }
 
@@ -532,7 +532,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
       mu_mailbox_destroy (&tmpmailbox);
       remove (tmpmboxname);
       free (tmpmboxname);
-      mu_error (_("Failed to grab the lock: %s"), mu_strerror (status));
+      mu_error (_("failed to grab the lock: %s"), mu_strerror (status));
       return status;
     }
 
@@ -584,7 +584,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 	      status = mbox_get_message (mailbox, i + 1, &msg);
 	      if (status != 0)
 		{
-		  mu_error (_("Error expunging:%d: %s"), __LINE__,
+		  mu_error (_("error expunging:%d: %s"), __LINE__,
 			    mu_strerror (status));
 		  goto bailout0;
 		}
@@ -593,7 +593,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 					 &total, 1, (i == save_imapbase));
 	  if (status != 0)
 	    {
-	      mu_error (_("Error expunging:%d: %s"), __LINE__,
+	      mu_error (_("error expunging:%d: %s"), __LINE__,
 		        mu_strerror (status));
 	      goto bailout0;
 	    }
@@ -616,7 +616,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 		  || (status = mu_stream_write (tmpmailbox->stream, buffer, n,
 					     total, &n) != 0))
 		{
-		  mu_error (_("Error expunging:%d: %s"), __LINE__,
+		  mu_error (_("error expunging:%d: %s"), __LINE__,
 			    mu_strerror (status));
 		  goto bailout0;
 		}
@@ -628,7 +628,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 	  status = mu_stream_write (tmpmailbox->stream, "\n", 1, total, &n);
 	  if (status != 0)
 	    {
-	      mu_error (_("Error expunging:%d: %s"), __LINE__,
+	      mu_error (_("error expunging:%d: %s"), __LINE__,
 		        mu_strerror (status));
 	      goto bailout0;
 	    }
@@ -658,7 +658,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 				       total, &n);
 		if (status != 0)
 		  {
-		    mu_error (_("Error expunging:%d: %s"), __LINE__,
+		    mu_error (_("error expunging:%d: %s"), __LINE__,
 			      mu_strerror (status));
 		    goto bailout0;
 		  }
@@ -669,7 +669,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 	else if (len < 0)
 	  {
 	    /* Corrupted mailbox.  */
-	    mu_error (_("Error expunging:%d: %s"), __LINE__,
+	    mu_error (_("error expunging:%d: %s"), __LINE__,
 		      mu_strerror (status));
 	    goto bailout0;
 	  }
@@ -690,7 +690,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
 	  status = mu_stream_write (mailbox->stream, buffer, n, offset, &n);
 	  if (status != 0)
 	    {
-	      mu_error (_("Error expunging:%d: %s"), __LINE__,
+	      mu_error (_("error expunging:%d: %s"), __LINE__,
 		        mu_strerror (status));
 	      goto bailout;
 	    }
@@ -704,7 +704,7 @@ mbox_expunge0 (mu_mailbox_t mailbox, int remove_deleted)
   status = mu_stream_truncate (mailbox->stream, total + marker);
   if (status != 0)
     {
-      mu_error (_("Error expunging:%d: %s"), __LINE__,
+      mu_error (_("error expunging:%d: %s"), __LINE__,
 	        mu_strerror (status));
       goto bailout;
     }
diff --git a/maidag/deliver.c b/maidag/deliver.c
index 0bf750e..5424f8f 100644
--- a/maidag/deliver.c
+++ b/maidag/deliver.c
@@ -49,7 +49,7 @@ mda (mu_mailbox_t mbx, char *username)
   
   if ((status = mu_mailbox_get_message (mbx, 1, &msg)) != 0)
     {
-      maidag_error (_("Cannot get message from the temporary mailbox: %s"),
+      maidag_error (_("cannot get message from the temporary mailbox: %s"),
 		    mu_strerror (status));
       return EX_TEMPFAIL;
     }
@@ -156,7 +156,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
   status = mu_mailbox_open (mbox, MU_STREAM_APPEND|MU_STREAM_CREAT);
   if (status != 0)
     {
-      maidag_error (_("Cannot open mailbox %s: %s"), 
+      maidag_error (_("cannot open mailbox %s: %s"), 
                     path, mu_strerror (status));
       return EX_TEMPFAIL;
     }
@@ -173,7 +173,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
 
       if (status)
 	{
-	  maidag_error (_("Cannot lock mailbox `%s': %s"), path,
+	  maidag_error (_("cannot lock mailbox `%s': %s"), path,
 		        mu_strerror (status));
 	  exit_code = EX_TEMPFAIL;
 	  return EX_TEMPFAIL;
@@ -189,7 +189,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
       
       if ((status = mu_mailbox_get_size (mbox, &mbsize)))
 	{
-	  maidag_error (_("Cannot get size of mailbox %s: %s"),
+	  maidag_error (_("cannot get size of mailbox %s: %s"),
 			path, mu_strerror (status));
 	  if (status == ENOSYS)
 	    mbsize = 0; /* Try to continue anyway */
@@ -215,7 +215,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
 	default:
 	  if ((status = mu_message_size (msg, &msg_size)))
 	    {
-	      maidag_error (_("Cannot get message size (input message %s): %s"),
+	      maidag_error (_("cannot get message size (input message %s): %s"),
 			    path, mu_strerror (status));
 	      exit_code = EX_UNAVAILABLE;
 	      failed++;
@@ -243,7 +243,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
       status = mu_mailbox_append_message (mbox, msg);
       if (status)
 	{
-	  maidag_error (_("Error writing to mailbox %s: %s"),
+	  maidag_error (_("error writing to mailbox %s: %s"),
 		        path, mu_strerror (status));
 	  failed++;
 	}
@@ -252,7 +252,7 @@ deliver_to_user (mu_mailbox_t mbox, mu_message_t msg,
 	  status = mu_mailbox_sync (mbox);
 	  if (status)
 	    {
-	      maidag_error (_("Error flushing mailbox %s: %s"),
+	      maidag_error (_("error flushing mailbox %s: %s"),
 			    path, mu_strerror (status));
 	      failed++;
 	    }
@@ -341,14 +341,14 @@ deliver_url (mu_url_t url, mu_message_t msg, const char *name, char **errp)
       status = mu_url_create (&url, auth->mailbox);
       if (status)
 	{
-	  maidag_error (_("Cannot create URL for %s: %s"),
+	  maidag_error (_("cannot create URL for %s: %s"),
 			auth->mailbox, mu_strerror (status));
 	  return exit_code = EX_UNAVAILABLE;
 	}
       status = mu_url_parse (url);
       if (status)
 	{
-	  maidag_error (_("Error parsing URL %s: %s"),
+	  maidag_error (_("error parsing URL %s: %s"),
 			auth->mailbox, mu_strerror (status));
 	  return exit_code = EX_UNAVAILABLE;
 	}
@@ -358,7 +358,7 @@ deliver_url (mu_url_t url, mu_message_t msg, const char *name, char **errp)
 
   if (status)
     {
-      maidag_error (_("Cannot open mailbox %s: %s"),
+      maidag_error (_("cannot open mailbox %s: %s"),
 		    mu_url_to_string (url),
 		    mu_strerror (status));
       mu_url_destroy (&url);
diff --git a/maidag/lmtp.c b/maidag/lmtp.c
index c52b333..386debe 100644
--- a/maidag/lmtp.c
+++ b/maidag/lmtp.c
@@ -48,7 +48,7 @@ lmtp_reply (FILE *fp, char *code, char *enh, char *fmt, ...)
   
   if (!str)
     {
-      mu_error (_("Not enough memory"));
+      mu_error (_("not enough memory"));
       exit (EX_TEMPFAIL);
     }
 
@@ -176,7 +176,7 @@ add_default_domain (char *str, int len, char **pret)
   *pret = malloc (len + 1 + strlen (lhlo_domain) + 1);
   if (!*pret)
     {
-      mu_error (_("Not enough memory"));
+      mu_error (_("not enough memory"));
       exit (EX_SOFTWARE);
     }
   memcpy (*pret, str, len);
@@ -343,7 +343,7 @@ dot_deliver (void *item, void *cbdata)
   
   if ((status = mu_mailbox_get_message (mbox, 1, &msg)) != 0)
     {
-      mu_error (_("Cannot get message from the temporary mailbox: %s"),
+      mu_error (_("cannot get message from the temporary mailbox: %s"),
 		mu_strerror (status));
       lmtp_reply (out, "450", "4.1.0",
 		  "%s: temporary failure, try again later",
@@ -591,7 +591,7 @@ lmtp_set_privs ()
       gidset = calloc (size, sizeof (gidset[0]));
       if (!gidset)
 	{
-	  mu_error (_("Not enough memory"));
+	  mu_error (_("not enough memory"));
 	  return EX_UNAVAILABLE;
 	}
       if (mu_list_get_iterator (lmtp_groups, &itr) == 0)
@@ -607,7 +607,7 @@ lmtp_set_privs ()
       free (gidset);
       if (rc)
 	{
-	  mu_error(_("setgroups failed: %s"), mu_strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "setgroups", NULL, errno);
 	  return EX_UNAVAILABLE;
 	}
     }
@@ -616,14 +616,14 @@ lmtp_set_privs ()
       struct group *gr = getgrnam ("mail");
       if (gr == NULL)
 	{
-	  mu_error (_("Error getting group `mail'"));
+	  mu_diag_funcall (MU_DIAG_ERROR, "getgrnam", "mail", errno);
 	  return EX_UNAVAILABLE;
 	}
       gid = gr->gr_gid;
     }
   if (setgid (gid) == -1)
     {
-      mu_error (_("Error setting mail group"));
+      mu_diag_funcall (MU_DIAG_ERROR, "setgid", "mail", errno);
       return EX_UNAVAILABLE;
     }
   return 0;
diff --git a/maidag/maidag.c b/maidag/maidag.c
index 6ca71a0..1744e03 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -222,7 +222,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case 'l':
       script_handler = script_lang_handler (arg);
       if (!script_handler)
-	argp_error (state, _("Unknown or unsupported language: %s"),
+	argp_error (state, _("unknown or unsupported language: %s"),
 		    arg);
       break;
       
@@ -291,7 +291,7 @@ cb2_group (mu_debug_t debug, const char *gname, void *data)
     mu_list_create (plist);
   group = getgrnam (gname);
   if (!group)
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Unknown group: %s"), gname);
+    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("unknown group: %s"), gname);
   else
     mu_list_append (*plist, (void*)group->gr_gid);
   return 0;
@@ -334,7 +334,7 @@ cb2_forward_file_checks (mu_debug_t debug, const char *name, void *data)
     str = name;
 
   if (mu_kwd_xlat_name_ci (forward_checks, str, &val))
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Unknown keyword: %s"),
+    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("unknown keyword: %s"),
 			 name);
   else
     {
@@ -361,7 +361,7 @@ cb_script_language (mu_debug_t debug, void *data, mu_config_value_t *val)
   if (!script_handler)
     {
       mu_cfg_format_error (debug, MU_DEBUG_ERROR,
-			   _("Unsupported language: %s"),
+			   _("unsupported language: %s"),
 			   val->v.string);
       return 1;
     }
@@ -556,7 +556,7 @@ main (int argc, char *argv[])
     {
       if (argc)
 	{
-	  mu_error (_("Too many arguments"));
+	  mu_error (_("too many arguments"));
 	  return EX_USAGE;
 	}
       return maidag_lmtp_server ();
@@ -576,13 +576,13 @@ main (int argc, char *argv[])
 	      
 	      if (!current_uid)
 		{
-		  mu_error (_("Cannot get username"));
+		  mu_error (_("cannot get username"));
 		  return EX_UNAVAILABLE;
 		}
 	      
 	      if (argc > 0 && strcmp (auth->name, argv[0]))
 		{
-		  mu_error (_("Recipients given when running as non-root"));
+		  mu_error (_("recipients given when running as non-root"));
 		  return EX_USAGE;
 		}
 	      s_argv[0] = auth->name;
diff --git a/maidag/mailquota.c b/maidag/mailquota.c
index d5f29d7..f5c5f7b 100644
--- a/maidag/mailquota.c
+++ b/maidag/mailquota.c
@@ -62,7 +62,7 @@ get_size (char *str, mu_off_t *size, char **endp)
 int
 fail_retrieve_quota (char *name, mu_off_t *quota)
 {
-  mu_error (_("No quota retrieving mechanism"));
+  mu_error (_("no quota retrieving mechanism"));
   return RETR_FAILURE;
 }
 
@@ -81,7 +81,7 @@ dbm_retrieve_quota (char *name, mu_off_t *quota)
   
   if (mu_dbm_open (quotadbname, &db, MU_STREAM_READ, 0600))
     {
-      mu_error (_("Cannot open %s: %s"), quotadbname, mu_strerror (errno));
+      mu_error (_("cannot open file %s: %s"), quotadbname, mu_strerror (errno));
       return RETR_FAILURE;
     }
   
@@ -112,8 +112,8 @@ dbm_retrieve_quota (char *name, mu_off_t *quota)
       unlimited = 1;
   else if (MU_DATUM_SIZE (contentd) > sizeof(buffer)-1)
     {
-      mu_error (ngettext ("Mailbox quota for `%s' is too big: %d digit",
-			  "Mailbox quota for `%s' is too big: %d digits",
+      mu_error (ngettext ("mailbox quota for `%s' is too big: %d digit",
+			  "mailbox quota for `%s' is too big: %d digits",
 			  MU_DATUM_SIZE (contentd)),
 		name, MU_DATUM_SIZE (contentd));
       *quota = groupquota;
@@ -127,7 +127,7 @@ dbm_retrieve_quota (char *name, mu_off_t *quota)
       *quota = strtoul (buffer, &p, 0);
       if (get_size (buffer, quota, &p))
 	{
-	  mu_error (_("Bogus mailbox quota for `%s' (near `%s')"), name, p);
+	  mu_error (_("bogus mailbox quota for `%s' (near `%s')"), name, p);
 	  *quota = groupquota;
 	}
     }
@@ -205,7 +205,7 @@ sql_retrieve_quota (char *name, mu_off_t *quota)
 
   if (status)
     {
-      mu_error (_("Cannot store SQL result: %s"),
+      mu_error (_("cannot store SQL result: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -224,7 +224,7 @@ sql_retrieve_quota (char *name, mu_off_t *quota)
       status = mu_sql_get_column (conn, 0, 0, &tmp);
       if (status)
 	{
-	  mu_error (_("Cannot retrieve mailbox quota from SQL: %s"),
+	  mu_error (_("cannot retrieve mailbox quota from SQL: %s"),
 		    (status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 		    mu_strerror (status));
 	  rc = RETR_FAILURE;
@@ -237,7 +237,7 @@ sql_retrieve_quota (char *name, mu_off_t *quota)
 	  
 	  if (get_size (tmp, quota, &p))
 	    {
-	      mu_error (_("Bogus mailbox quota for `%s' (near `%s')"),
+	      mu_error (_("bogus mailbox quota for `%s' (near `%s')"),
 			name, p);
 	      *quota = groupquota;
 	    }
diff --git a/maidag/mailtmp.c b/maidag/mailtmp.c
index 162bf6e..5aead7d 100644
--- a/maidag/mailtmp.c
+++ b/maidag/mailtmp.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005, 
-   2007 Free Software Foundation, Inc.
+   2007, 2009 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
@@ -44,7 +44,7 @@ mail_tmp_begin (struct mail_tmp **pmtmp, const char *from)
 				       MU_STREAM_RDWR)))
     {
       free (mtmp);
-      maidag_error (_("Unable to open temporary file: %s"),
+      maidag_error (_("unable to open temporary file: %s"),
 		    mu_strerror (status));
       return status;
     }
@@ -94,7 +94,7 @@ mail_tmp_add_line (struct mail_tmp *mtmp, char *buf, size_t buflen)
 	    }
 	  else
 	    {
-	      maidag_error (_("Cannot determine sender address"));
+	      maidag_error (_("cannot determine sender address"));
 	      return EINVAL;
 	    }
 	  if (auth)
@@ -112,7 +112,7 @@ mail_tmp_add_line (struct mail_tmp *mtmp, char *buf, size_t buflen)
       
   if (status)
     {
-      maidag_error (_("Error writing temporary file: %s"), 
+      maidag_error (_("error writing temporary file: %s"), 
                     mu_strerror (status));
       mu_stream_destroy (&mtmp->stream, mu_stream_get_owner (mtmp->stream));
     }
@@ -149,7 +149,7 @@ mail_tmp_finish (struct mail_tmp *mtmp, mu_mailbox_t *mbox)
       || (status = mu_mailbox_open (*mbox, MU_STREAM_READ))
       || (status = mu_mailbox_set_stream (*mbox, mtmp->stream)))
     {
-      maidag_error (_("Error opening temporary file: %s"), 
+      maidag_error (_("error opening temporary file: %s"), 
                     mu_strerror (status));
       mu_stream_destroy (&mtmp->stream, mu_stream_get_owner (mtmp->stream));
       return status;
@@ -159,7 +159,7 @@ mail_tmp_finish (struct mail_tmp *mtmp, mu_mailbox_t *mbox)
   if (status)
     {
       errno = status;
-      maidag_error (_("Error creating temporary message: %s"),
+      maidag_error (_("error creating temporary message: %s"),
 		    mu_strerror (status));
       mu_stream_destroy (&mtmp->stream, mu_stream_get_owner (mtmp->stream));
       return status;
diff --git a/maidag/script.c b/maidag/script.c
index 8bd6aba..1a981b0 100644
--- a/maidag/script.c
+++ b/maidag/script.c
@@ -126,12 +126,9 @@ apply_script (void *item, void *data)
   if (stat (progfile, &st))
     {
       if (debug_level > 2)
-	mu_diag_output (MU_DIAG_DEBUG, _("cannot stat %s: %s"),
-			progfile, mu_strerror (errno));
+	mu_diag_funcall (MU_DIAG_DEBUG, "stat", progfile, errno);
       else if (errno != ENOENT)
-	mu_diag_output (MU_DIAG_NOTICE, _("cannot stat %s: %s"),
-			progfile, mu_strerror (errno));
-      
+	mu_diag_funcall (MU_DIAG_NOTICE, "stat", progfile, errno);
       free (progfile);
       return 0;
     }
diff --git a/mail/alias.c b/mail/alias.c
index 613c17a..ea9519c 100644
--- a/mail/alias.c
+++ b/mail/alias.c
@@ -160,14 +160,14 @@ alias_expand (const char *name)
       int status = mu_list_create (&list);
       if (status)
 	{
-	  mu_error (_("Cannot create list: %s"), mu_strerror (status));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_list_create", NULL, status);
 	  return NULL;
 	}
       status = mu_list_create (&origlist);
       if (status)
 	{
 	  mu_list_destroy (&origlist);
-	  mu_error (_("Cannot create list: %s"), mu_strerror (status));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_list_create", NULL, status);
 	  return NULL;
 	}
       mu_list_set_comparator (list, string_comp);
diff --git a/mail/cd.c b/mail/cd.c
index b88f46e..1ebf69d 100644
--- a/mail/cd.c
+++ b/mail/cd.c
@@ -37,7 +37,7 @@ mail_cd (int argc, char **argv)
 
   if (chdir (dir))
     {
-      mu_error (_("cannot change to `%s': %s"), dir, mu_strerror (errno));
+      mu_diag_funcall (MU_DIAG_ERROR, "chdir", dir, errno);
       return 1;
     }
   return 0;
diff --git a/mailbox/cfg_lexer.l b/mailbox/cfg_lexer.l
index 293af03..7d87d7e 100644
--- a/mailbox/cfg_lexer.l
+++ b/mailbox/cfg_lexer.l
@@ -340,7 +340,7 @@ mu_get_config (const char *file, const char *progname,
     }
 
   if (flags & MU_PARSE_CONFIG_VERBOSE)
-    mu_error (_("Info: parsing file `%s'"), file);
+    mu_diag_output (MU_DIAG_INFO, _("parsing file `%s'"), file);
 
   mu_cfg_set_lex_debug ();
   
@@ -357,7 +357,7 @@ mu_get_config (const char *file, const char *progname,
   mu_cfg_destroy_tree (&parse_tree);
 
   if (flags & MU_PARSE_CONFIG_VERBOSE)
-    mu_error (_("Info: finished parsing file `%s'"), file);
+    mu_diag_output (MU_DIAG_INFO, _("finished parsing file `%s'"), file);
   
   return rc == 0 ? 0 : MU_ERR_FAILURE;
 }
diff --git a/mailbox/cfg_parser.y b/mailbox/cfg_parser.y
index 25bf878..559609f 100644
--- a/mailbox/cfg_parser.y
+++ b/mailbox/cfg_parser.y
@@ -1,6 +1,6 @@
 %{
 /* cfg_parser.y -- general-purpose configuration file parser 
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 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
@@ -273,7 +273,7 @@ vallist : vlist
 		val.v.arg.v = mu_alloc (n * sizeof (val.v.arg.v[0]));
 		if (!val.v.arg.v)
 		  {
-		    mu_cfg_perror (&mu_cfg_locus, _("Not enough memory"));
+		    mu_cfg_perror (&mu_cfg_locus, _("not enough memory"));
 		    abort();
 		  }
 		
@@ -294,7 +294,7 @@ vlist   : value
 	      int rc = mu_list_create (&$$);
 	      if (rc)
 		{
-		  mu_cfg_perror (&mu_cfg_locus, _("Cannot create list: %s"),
+		  mu_cfg_perror (&mu_cfg_locus, _("cannot create list: %s"),
 				 mu_strerror (rc));
 		  abort ();
 		}
diff --git a/mailbox/diag.c b/mailbox/diag.c
index 1af7a71..1efe746 100644
--- a/mailbox/diag.c
+++ b/mailbox/diag.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2005, 2007,
+   2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -125,30 +126,30 @@ mu_diag_level_to_string (mu_log_level_t level)
   switch (level)
     {
     case MU_DIAG_EMERG:
-      return _("Emergency");
+      return _("emergency");
       
     case MU_DIAG_ALERT:
-      return _("Alert");
+      return _("alert");
 	
     case MU_DIAG_CRIT:
-      return _("Critical");
+      return _("critical");
       
     case MU_DIAG_ERROR:
-      return _("Error");
+      return _("error");
       
     case MU_DIAG_WARNING:
-      return _("Warning");
+      return _("warning");
       
     case MU_DIAG_NOTICE:
-      return _("Notice");
+      return _("notice");
       
     case MU_DIAG_INFO:
-      return _("Info");
+      return _("info");
       
     case MU_DIAG_DEBUG:
-      return _("Debug");
+      return _("debug");
     }
-  return _("Unknown");
+  return _("unknown");
 }
 
 int
@@ -161,3 +162,18 @@ mu_diag_stderr_printer (void *data, mu_log_level_t level, const char *buf)
   fputs (buf, stderr);
   return 0;
 }
+
+void
+mu_diag_funcall (mu_log_level_t level, const char *func,
+		 const char *arg, int err)
+{
+  if (err)
+    /* TRANSLATORS: First %s stands for function name, second for its
+       arguments, third one for the actual error message. */
+    mu_diag_output (level, _("%s(%s) failed: %s"), func, arg ? arg : "",
+		    mu_strerror (err));
+  else
+    /* TRANSLATORS: First %s stands for function name, second for its
+       arguments. */
+    mu_diag_output (level, _("%s(%s) failed"), func, arg ? arg : "");
+}
diff --git a/mailbox/file_stream.c b/mailbox/file_stream.c
index e4d1ebf..b773768 100644
--- a/mailbox/file_stream.c
+++ b/mailbox/file_stream.c
@@ -522,7 +522,7 @@ _file_open (mu_stream_t stream)
 	      || filebuf.st_nlink != 1
 	      || (fdbuf.st_mode & S_IFMT) != S_IFREG))
 	{
-	  mu_error (_("%s must be a plain file with one link\n"), filename);
+	  mu_error (_("%s must be a plain file with one link"), filename);
 	  close (fd);
 	  return EINVAL;
 	}
diff --git a/mailbox/gocs.c b/mailbox/gocs.c
index 3ca250b..220f1db 100644
--- a/mailbox/gocs.c
+++ b/mailbox/gocs.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -58,7 +58,7 @@ mu_gocs_mailbox_init (enum mu_gocs_op op, void *data)
 	{
 	  rc = mu_set_mail_directory (p->mail_spool);
 	  if (rc)
-	    mu_error (_("Cannot set mail directory name to `%s': %s"),
+	    mu_error (_("cannot set mail directory name to `%s': %s"),
 		      p->mail_spool, mu_strerror (rc));
 	  free (p->mail_spool);
 	  p->mail_spool = NULL;
@@ -67,7 +67,7 @@ mu_gocs_mailbox_init (enum mu_gocs_op op, void *data)
 	{
 	  rc = mu_set_mailbox_pattern (p->mailbox_pattern);
 	  if (rc)
-	    mu_error (_("Cannot set mailbox pattern to `%s': %s"),
+	    mu_error (_("cannot set mailbox pattern to `%s': %s"),
 		      p->mailbox_pattern, mu_strerror (rc));
 	  free (p->mailbox_pattern);
 	  p->mailbox_pattern = NULL;
@@ -75,7 +75,7 @@ mu_gocs_mailbox_init (enum mu_gocs_op op, void *data)
       if (p->mailbox_type)
 	{
 	  if (mu_registrar_set_default_scheme (p->mailbox_type))
-	    mu_error (_("Invalid mailbox type: %s"), p->mailbox_type);
+	    mu_error (_("invalid mailbox type: %s"), p->mailbox_type);
 	  free (p->mailbox_type);
 	  p->mailbox_type = NULL;
 	}
@@ -117,7 +117,7 @@ mu_gocs_locking_init (enum mu_gocs_op op, void *data)
 	      break;
 	      
 	    default:
-	      mu_error (_("Invalid lock flag `%c'"), *s);
+	      mu_error (_("invalid lock flag `%c'"), *s);
 	    }
 	}
       mu_locker_set_default_flags (flags, mu_locker_assign);
@@ -168,7 +168,7 @@ mu_gocs_source_email_init (enum mu_gocs_op op, void *data)
   if (p->address)
     {
       if ((rc = mu_set_user_email (p->address)) != 0)
-	mu_error (_("Invalid email address `%s': %s"),
+	mu_error (_("invalid email address `%s': %s"),
 		  p->address, mu_strerror (rc));
       free (p->address);
       p->address = NULL;
@@ -177,7 +177,7 @@ mu_gocs_source_email_init (enum mu_gocs_op op, void *data)
   if (p->domain)
     {
       if ((rc = mu_set_user_email_domain (p->domain)) != 0)
-	mu_error (_("Invalid email domain `%s': %s"),
+	mu_error (_("invalid email domain `%s': %s"),
 		  p->domain, mu_strerror (rc));
 
       free (p->domain);
@@ -198,7 +198,7 @@ mu_gocs_mailer_init (enum mu_gocs_op op, void *data)
   if (p->mailer)
     {
       if ((rc = mu_mailer_set_url_default (p->mailer)) != 0)
-	mu_error (_("Invalid mailer URL `%s': %s"),
+	mu_error (_("invalid mailer URL `%s': %s"),
 		  p->mailer, mu_strerror (rc));
       free (p->mailer);
       p->mailer = NULL;
@@ -268,7 +268,7 @@ mu_gocs_register (const char *capa, mu_gocs_init_fp init)
   for (i = 0; _gocs_table[i].name; i++)
     if (i == MAX_GOCS-1)
       {
-	mu_error (_("Gocs table overflow"));
+	mu_error (_("gocs table overflow"));
 	abort ();
       }
   _gocs_table[i].name = capa;
@@ -385,7 +385,7 @@ _gocs_flush (void *item, void *data)
 
   if (initfun (mu_gocs_op_set, s->data))
     {
-      mu_error (_("Initialization of GOCS `%s' failed"), s->capa);
+      mu_error (_("initialization of GOCS `%s' failed"), s->capa);
       return 1;
     }
   
diff --git a/mailbox/msrv.c b/mailbox/msrv.c
index 29c2a0f..a318371 100644
--- a/mailbox/msrv.c
+++ b/mailbox/msrv.c
@@ -400,7 +400,7 @@ mu_m_server_set_default_address (mu_m_server_t srv, struct sockaddr *sa,
 {
   if (salen > sizeof srv->defaddr.s)
     {
-      mu_error (_("Unhandled sockaddr size"));
+      mu_error (_("unhandled sockaddr size"));
       abort ();
     }
   memcpy (&srv->defaddr.s.s_sa, sa, salen);
@@ -522,7 +522,7 @@ mu_m_server_begin (mu_m_server_t msrv)
 	 first three one, in, out, err   */
       if (daemon (0, 0) < 0)
 	{
-	  mu_error (_("Failed to become a daemon: %s"), mu_strerror (errno));
+	  mu_error (_("failed to become a daemon: %s"), mu_strerror (errno));
 	  exit (EXIT_FAILURE);
 	}
     }
@@ -534,7 +534,7 @@ mu_m_server_begin (mu_m_server_t msrv)
 	break;
 	
       case EINVAL:
-	mu_error (_("%s: Invalid name for a pidfile"), msrv->pidfile);
+	mu_error (_("%s: invalid name for a pidfile"), msrv->pidfile);
 	break;
 	
       default:
@@ -614,7 +614,7 @@ _open_conn (void *item, void *data)
     {
       mu_ip_server_get_sockaddr (tcpsrv, &addr.sa, &addrlen);
       p = mu_sockaddr_to_astr (&addr.sa, addrlen);
-      mu_error (_("Cannot open connection on %s: %s"), p, mu_strerror (rc));
+      mu_error (_("cannot open connection on %s: %s"), p, mu_strerror (rc));
       free (p);
       return 0;
     }
@@ -626,7 +626,7 @@ _open_conn (void *item, void *data)
     {
       mu_ip_server_get_sockaddr (tcpsrv, &addr.sa, &addrlen);
       p = mu_sockaddr_to_astr (&addr.sa, addrlen);
-      mu_error (_("Cannot add connection %s: %s"), p, mu_strerror (rc));
+      mu_error (_("cannot add connection %s: %s"), p, mu_strerror (rc));
       free (p);
       mu_ip_server_shutdown (tcpsrv);
       mu_ip_server_destroy (&tcpsrv);
@@ -646,7 +646,7 @@ mu_m_server_run (mu_m_server_t msrv)
   MU_ASSERT (mu_server_count (msrv->server, &count));
   if (count == 0)
     {
-      mu_error (_("No servers configured: exiting"));
+      mu_error (_("no servers configured: exiting"));
       exit (1);
     }
   if (msrv->ident)
@@ -670,7 +670,7 @@ mu_m_server_check_acl (mu_m_server_t msrv, struct sockaddr *s, int salen)
       if (rc)
 	{
 	  char *p = mu_sockaddr_to_astr (s, salen);
-	  mu_error (_("Access from %s blocked: cannot check ACLs: %s"),
+	  mu_error (_("access from %s blocked: cannot check ACLs: %s"),
 		    p, mu_strerror (rc));
 	  free (p);
 	  return 1;
@@ -693,7 +693,7 @@ mu_m_server_check_acl (mu_m_server_t msrv, struct sockaddr *s, int salen)
 	case mu_acl_result_deny:
 	  {
 	    char *p = mu_sockaddr_to_astr (s, salen);
-	    mu_error (_("Access from %s blocked."), p);
+	    mu_error (_("access from %s blocked"), p);
 	    free (p);
 	    return 1;
 	  }
diff --git a/mailbox/mutil.c b/mailbox/mutil.c
index c79366e..67ff755 100644
--- a/mailbox/mutil.c
+++ b/mailbox/mutil.c
@@ -614,7 +614,7 @@ mu_tempfile (const char *tmpdir, char **namep)
 
   if (fd == -1)
     {
-      mu_error (_("Cannot open temporary file: %s"), mu_strerror (errno));
+      mu_error (_("cannot open temporary file: %s"), mu_strerror (errno));
       free (filename);
       return -1;
     }
diff --git a/mailbox/registrar.c b/mailbox/registrar.c
index 4d0766c..aa17fea 100644
--- a/mailbox/registrar.c
+++ b/mailbox/registrar.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006,
-   2007 Free Software Foundation, Inc.
+   2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -104,7 +104,7 @@ mu_registrar_get_list (mu_list_t *plist)
 
   if (!warned)
     {
-      mu_error (_("Program uses mu_registrar_get_list(), which is deprecated"));
+      mu_error (_("program uses mu_registrar_get_list(), which is deprecated"));
       warned = 1;
     }
   return _registrar_get_list (plist);
diff --git a/messages/messages.c b/messages/messages.c
index 66c9e75..23c3058 100644
--- a/messages/messages.c
+++ b/messages/messages.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   2004, 2005, 2007, 2008, 2009 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
@@ -142,10 +142,10 @@ messages_count (const char *box)
   if (status != 0)
     {
       if (box)
-	mu_error (_("Could not create mailbox `%s': %s"),
+	mu_error (_("could not create mailbox `%s': %s"),
 		  box, mu_strerror (status));
       else
-	mu_error (_("Could not create default mailbox: %s"),
+	mu_error (_("could not create default mailbox: %s"),
 		  mu_strerror (status));
       return -1;
     }
@@ -156,7 +156,7 @@ messages_count (const char *box)
   status =  mu_mailbox_open (mbox, MU_STREAM_READ);
   if (status != 0)
     {
-      mu_error (_("Could not open mailbox `%s': %s"),
+      mu_error (_("could not open mailbox `%s': %s"),
 		box, mu_strerror (status));
       return -1;
     }
@@ -164,7 +164,7 @@ messages_count (const char *box)
   status = mu_mailbox_messages_count (mbox, &count);
   if (status != 0)
     {
-      mu_error (_("Could not count messages in mailbox `%s': %s"),
+      mu_error (_("could not count messages in mailbox `%s': %s"),
 		box, mu_strerror (status));
       return -1;
     }
@@ -177,7 +177,7 @@ messages_count (const char *box)
   status = mu_mailbox_close (mbox);
   if (status != 0)
     {
-      mu_error (_("Could not close `%s': %s"),
+      mu_error (_("could not close `%s': %s"),
 		box, mu_strerror (status));
       return -1;
     }
diff --git a/mh/folder.c b/mh/folder.c
index 9a20f69..0e6ad01 100644
--- a/mh/folder.c
+++ b/mh/folder.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 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
@@ -151,7 +151,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
 	  char *p;
 	  pack_start = strtoul (arg, &p, 10);
 	  if (*p)
-	    argp_error (state, _("Invalid number"));
+	    argp_error (state, _("invalid number"));
 	}
       break;
       
@@ -327,7 +327,7 @@ _scan (const char *name, size_t depth)
 
   if (!dir)
     {
-      mu_error (_("Cannot scan folder %s: %s"), name, strerror (errno));
+      mu_error (_("cannot scan folder %s: %s"), name, strerror (errno));
       return;
     }
 
@@ -362,7 +362,7 @@ _scan (const char *name, size_t depth)
 	{
 	  asprintf (&p, "%s/%s", name, entry->d_name);
 	  if (stat (p, &st) < 0)
-	    mu_error (_("Cannot stat %s: %s"), p, strerror (errno));
+	    mu_diag_funcall (MU_DIAG_ERROR, "stat", p, errno);
 	  else if (S_ISDIR (st.st_mode))
 	    {
 	      info.others++;
@@ -531,15 +531,16 @@ action_list ()
 static void
 get_stack (int *pc, char ***pv)
 {
+  int status;
   const char *stack = mh_global_context_get ("Folder-Stack", NULL);
   if (!stack)
     {
       *pc = 0;
       *pv = NULL;
     }
-  else if (mu_argcv_get (stack, NULL, "#", pc, pv))
+  else if ((status = mu_argcv_get (stack, NULL, "#", pc, pv)) != 0)
     {
-      mu_error (_("Cannot split line %s"), stack);
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_argcv_get", stack, status);
       exit (1);
     }
 }
@@ -722,7 +723,7 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i)
     return;
   
   start = i - 1;
-  mu_error (_("Rolling back changes..."));
+  mu_error (_("rolling back changes..."));
   while (--i >= 0)
     if (pack_rename (pack_tab + i, 1))
       {
@@ -737,7 +738,7 @@ roll_back (const char *folder_name, struct pack_tab *pack_tab, size_t i)
 	mu_error (_("You will have to fix it manually."));
 	exit (1);
       }
-  mu_error (_("Folder `%s' restored successfully"), folder_name);
+  mu_error (_("folder `%s' restored successfully"), folder_name);
 }
 
 struct fixup_data
@@ -846,7 +847,7 @@ action_pack ()
   /* Allocate pack table */
   if (mu_mailbox_messages_count (mbox, &count))
     {
-      mu_error (_("Cannot read input mailbox: %s"), mu_strerror (errno));
+      mu_error (_("cannot read input mailbox: %s"), mu_strerror (errno));
       return 1;
     }
   pack_tab = xcalloc (count, sizeof pack_tab[0]); /* Never freed. No use to
@@ -968,7 +969,7 @@ main (int argc, char **argv)
     }
   else if (argc - index > 1)
     {
-      mu_error (_("Too many arguments"));
+      mu_error (_("too many arguments"));
       exit (1);
     }
   
diff --git a/mh/forw.c b/mh/forw.c
index 977c347..a3da894 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 2003, 2005, 2006, 2007, 
-   2008 Free Software Foundation, Inc.
+   2008, 2009 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
@@ -158,7 +158,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, NULL, 0);
       if (!width)
 	{
-	  argp_error (state, _("Invalid width"));
+	  argp_error (state, _("invalid width"));
 	  exit (1);
 	}
       break;
@@ -206,7 +206,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
     case ARG_INPLACE:
     case ARG_WHATNOWPROC:
     case ARG_NOWHATNOWPROC:
-      argp_error (state, _("Option is not yet implemented"));
+      argp_error (state, _("option is not yet implemented"));
       exit (1);
       
     case ARG_LICENSE:
@@ -340,7 +340,7 @@ finish_draft ()
 				   MU_STREAM_WRITE|MU_STREAM_CREAT)) != 0
       || (rc = mu_stream_open (stream)))
     {
-      mu_error (_("Cannot open output file `%s': %s"),
+      mu_error (_("cannot open output file `%s': %s"),
 		wh_env.file, mu_strerror (rc));
       exit (1);
     }
diff --git a/mh/inc.c b/mh/inc.c
index 3ebd4ae..c022ae1 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003,
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 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
@@ -133,7 +133,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, NULL, 0);
       if (!width)
 	{
-	  argp_error (state, _("Invalid width"));
+	  argp_error (state, _("invalid width"));
 	  exit (1);
 	}
       break;
@@ -196,7 +196,7 @@ main (int argc, char **argv)
     {
       if ((rc = mu_mailbox_create_default (&input, NULL)) != 0)
 	{
-	  mu_error (_("Cannot create default mailbox: %s"),
+	  mu_error (_("cannot create default mailbox: %s"),
 		    mu_strerror (rc));
 	  exit (1);
 	}
@@ -205,7 +205,7 @@ main (int argc, char **argv)
     }
   else if ((rc = mu_mailbox_create_default (&input, input_file)) != 0)
     {
-      mu_error (_("Cannot create mailbox %s: %s"),
+      mu_error (_("cannot create mailbox %s: %s"),
 		input_file, mu_strerror (rc));
       exit (1);
     }
@@ -214,7 +214,7 @@ main (int argc, char **argv)
     {
       mu_url_t url;
       mu_mailbox_get_url (input, &url);
-      mu_error (_("Cannot open mailbox %s: %s"),
+      mu_error (_("cannot open mailbox %s: %s"),
 		mu_url_to_string (url),
 		mu_strerror (errno));
       exit (1);
@@ -222,14 +222,14 @@ main (int argc, char **argv)
 
   if ((rc = mu_mailbox_messages_count (input, &total)) != 0)
     {
-      mu_error (_("Cannot read input mailbox: %s"), mu_strerror (errno));
+      mu_error (_("cannot read input mailbox: %s"), mu_strerror (errno));
       exit (1);
     }
 
   output = mh_open_folder (append_folder, 1);
   if ((rc = mu_mailbox_messages_count (output, &lastmsg)) != 0)
     {
-      mu_error (_("Cannot read output mailbox: %s"),
+      mu_error (_("cannot read output mailbox: %s"),
 		mu_strerror (errno));
       exit (1);
     }
diff --git a/mh/mark.c b/mh/mark.c
index 78f8260..53b8cc5 100644
--- a/mh/mark.c
+++ b/mh/mark.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2006, 2007, 2008,
+   2009 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
@@ -68,7 +69,7 @@ add_sequence (char *name)
 {
   if (!seq_list && mu_list_create (&seq_list))
     {
-      mu_error (_("Cannot create sequence list"));
+      mu_error (_("cannot create sequence list"));
       exit (1);
     }
   mu_list_append (seq_list, name);
diff --git a/mh/mh_ctx.c b/mh/mh_ctx.c
index 6d3bb56..c7b1a0e 100644
--- a/mh/mh_ctx.c
+++ b/mh/mh_ctx.c
@@ -141,7 +141,7 @@ mh_context_write (mh_context_t *ctx)
   fp = fopen (ctx->name, "w");
   if (!fp)
     {
-      mu_error (_("Cannot open context file %s: %s"),
+      mu_error (_("cannot open context file %s: %s"),
 		ctx->name, strerror (errno));
       return MU_ERR_FAILURE;
     }
@@ -180,7 +180,7 @@ mh_context_set_value (mh_context_t *ctx, const char *name, const char *value)
       int rc;
       if ((rc = mu_header_create (&ctx->header, NULL, 0, NULL)) != 0)
 	{
-	  mu_error (_("Cannot create context %s: %s"),
+	  mu_error (_("cannot create context %s: %s"),
 		    ctx->name,
 		    mu_strerror (rc));
 	  return 1;
diff --git a/mh/mh_fmtgram.y b/mh/mh_fmtgram.y
index 845fd12..d1b0841 100644
--- a/mh/mh_fmtgram.y
+++ b/mh/mh_fmtgram.y
@@ -638,7 +638,7 @@ mh_code_builtin (mh_builtin_t *bp, int argtype)
 	    }
 	  else
 	    {
-	      mu_error (_("Missing argument for %s"), bp->name);
+	      mu_error (_("missing argument for %s"), bp->name);
 	      return 0;
 	    }
 	}
@@ -647,7 +647,7 @@ mh_code_builtin (mh_builtin_t *bp, int argtype)
 	  switch (bp->argtype)
 	    {
 	    case mhtype_none:
-	      mu_error (_("Extra arguments to %s"), bp->name);
+	      mu_error (_("extra arguments to %s"), bp->name);
 	      return 0;
 	      
 	    case mhtype_num:
diff --git a/mh/mh_format.c b/mh/mh_format.c
index 520a073..04552ad 100644
--- a/mh/mh_format.c
+++ b/mh/mh_format.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 
-   2005, 2006, 2007 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2009 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
@@ -1814,7 +1814,7 @@ builtin_rcpt (struct mh_machine *mach)
   int rc = mh_decode_rcpt_flag (strobj_ptr (&mach->arg_str));
   if (rc == RCPT_NONE)
     {
-      mu_error (_("Invalid recipient mask"));
+      mu_error (_("invalid recipient mask"));
       /* try to continue anyway */
     }
   mach->arg_num = rc & rcpt_mask;
diff --git a/mh/mh_init.c b/mh/mh_init.c
index fff162d..820d6f6 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -69,14 +69,14 @@ mh_read_formfile (char *name, char **pformat)
 
   if (stat (name, &st))
     {
-      mu_error (_("Cannot stat format file %s: %s"), name, strerror (errno));
+      mu_error (_("cannot stat format file %s: %s"), name, strerror (errno));
       return -1;
     }
   
   fp = fopen (name, "r");
   if (!fp)
     {
-      mu_error (_("Cannot open format file %s: %s"), name, strerror (errno));
+      mu_error (_("cannot open format file %s: %s"), name, strerror (errno));
       return -1;
     }
 
@@ -111,7 +111,7 @@ mh_read_formfile (char *name, char **pformat)
 void
 mh_err_memory (int fatal)
 {
-  mu_error (_("Not enough memory"));
+  mu_error (_("not enough memory"));
   if (fatal)
     abort ();
 }
@@ -127,7 +127,7 @@ mh_get_my_name (char *name)
       struct passwd *pw = getpwuid (getuid ());
       if (!pw)
 	{
-	  mu_error (_("Cannot determine my username"));
+	  mu_error (_("cannot determine my username"));
 	  return;
 	}
       name = pw->pw_name;
@@ -230,13 +230,13 @@ make_dir_hier (const char *p, mode_t perm)
 	{
 	  if (errno != ENOENT)
 	    {
-	      mu_error (_("Cannot create directory %s: error accessing name component %s: %s"),
+	      mu_error (_("cannot create directory %s: error accessing name component %s: %s"),
 
 			p, dir, strerror (errno));
 	      rc = 1;
 	    }
 	  else if ((rc = mkdir (dir, perm)))
-	    mu_error (_("Cannot create directory %s: error creating name component %s: %s"),
+	    mu_error (_("cannot create directory %s: error creating name component %s: %s"),
 		      p, dir, mu_strerror (rc));
 	}
       *q = '/';
@@ -261,7 +261,7 @@ mh_makedir (const char *p)
     {
       rc = mkdir (p, perm);
       if (rc)
-	mu_error (_("Cannot create directory %s: %s"),
+	mu_error (_("cannot create directory %s: %s"),
 		  p, strerror (errno));
     }
 
@@ -284,14 +284,14 @@ mh_check_folder (const char *pathname, int confirm)
     {
       if (errno == ENOENT)
 	{
-	  if (!confirm || mh_getyn (_("Create folder \"%s\""), p))
+	  if (!confirm || mh_getyn (_("create folder \"%s\""), p))
 	    return mh_makedir (p);
 	  else
 	    return 1;
 	}
       else
 	{
-	  mu_error (_("Cannot stat %s: %s"), p, strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", p, errno);
 	  return 1;
 	}
     }
@@ -382,7 +382,7 @@ mh_audit_open (char *name, mu_mailbox_t mbox)
       asprintf (&p, "%s/%s", mu_folder_directory (), namep);
       if (!p)
 	{
-	  mu_error (_("Not enough memory"));
+	  mu_error (_("not enough memory"));
 	  exit (1);
 	}
       free (namep);
@@ -392,7 +392,7 @@ mh_audit_open (char *name, mu_mailbox_t mbox)
   fp = fopen (namep, "a");
   if (!fp)
     {
-      mu_error (_("Cannot open audit file %s: %s"), namep, strerror (errno));
+      mu_error (_("cannot open audit file %s: %s"), namep, strerror (errno));
       free (namep);
       return NULL;
     }
@@ -435,7 +435,7 @@ mh_open_folder (const char *folder, int create)
     
   if (mu_mailbox_create_default (&mbox, name))
     {
-      mu_error (_("Cannot create mailbox %s: %s"),
+      mu_error (_("cannot create mailbox %s: %s"),
 		name, strerror (errno));
       exit (1);
     }
@@ -445,7 +445,7 @@ mh_open_folder (const char *folder, int create)
   
   if (mu_mailbox_open (mbox, flags))
     {
-      mu_error (_("Cannot open mailbox %s: %s"), name, strerror (errno));
+      mu_error (_("cannot open mailbox %s: %s"), name, strerror (errno));
       exit (1);
     }
 
@@ -523,7 +523,7 @@ mh_iterate (mu_mailbox_t mbox, mh_msgset_t *msgset,
       num = msgset->list[i];
       if ((rc = mu_mailbox_get_message (mbox, num, &msg)) != 0)
 	{
-	  mu_error (_("Cannot get message %d: %s"), num, mu_strerror (rc));
+	  mu_error (_("cannot get message %d: %s"), num, mu_strerror (rc));
 	  return 1;
 	}
 
@@ -539,9 +539,9 @@ mh_spawnp (const char *prog, const char *file)
   int argc, i, rc, status;
   char **argv, **xargv;
 
-  if (mu_argcv_get (prog, "", "#", &argc, &argv))
+  if ((rc = mu_argcv_get (prog, "", "#", &argc, &argv)) != 0)
     {
-      mu_error (_("Cannot split line %s"), prog);
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_argcv_get", prog, rc);
       mu_argcv_free (argc, argv);
       return 1;
     }
@@ -593,7 +593,7 @@ mh_file_copy (const char *from, const char *to)
   if ((rc = mu_file_stream_create (&in, from, MU_STREAM_READ)) != 0
       || (rc = mu_stream_open (in)))
     {
-      mu_error (_("Cannot open input file `%s': %s"),
+      mu_error (_("cannot open input file `%s': %s"),
 		from, mu_strerror (rc));
       free (buffer);
       return 1;
@@ -602,7 +602,7 @@ mh_file_copy (const char *from, const char *to)
   if ((rc = mu_file_stream_create (&out, to, MU_STREAM_RDWR|MU_STREAM_CREAT)) != 0
       || (rc = mu_stream_open (out)))
     {
-      mu_error (_("Cannot open output file `%s': %s"),
+      mu_error (_("cannot open output file `%s': %s"),
 		to, mu_strerror (rc));
       free (buffer);
       mu_stream_close (in);
@@ -616,7 +616,7 @@ mh_file_copy (const char *from, const char *to)
     {
       if ((rc = mu_stream_sequential_write (out, buffer, rdsize)) != 0)
 	{
-	  mu_error (_("Write error on `%s': %s"),
+	  mu_error (_("write error on `%s': %s"),
 		    to, mu_strerror (rc));
 	  break;
 	}
@@ -642,20 +642,20 @@ _file_to_message (const char *file_name)
 
   if (stat (file_name, &st) < 0)
     {
-      mu_error (_("Cannot stat file %s: %s"), file_name, strerror (errno));
+      mu_error (_("cannot stat file %s: %s"), file_name, strerror (errno));
       return NULL;
     }
   
   if ((rc = mu_file_stream_create (&instream, file_name, MU_STREAM_READ)))
     {
-      mu_error (_("Cannot create input stream (file %s): %s"),
+      mu_error (_("cannot create input stream (file %s): %s"),
 		file_name, mu_strerror (rc));
       return NULL;
     }
   
   if ((rc = mu_stream_open (instream)))
     {
-      mu_error (_("Cannot open input stream (file %s): %s"),
+      mu_error (_("cannot open input stream (file %s): %s"),
 		file_name, mu_strerror (rc));
       mu_stream_destroy (&instream, mu_stream_get_owner (instream));
       return NULL;
@@ -749,7 +749,7 @@ mh_real_install (char *name, int automode)
   fp = fopen (name, "w");
   if (!fp)
     {
-      mu_error (_("Cannot open file %s: %s"), name, mu_strerror (errno));
+      mu_error (_("cannot open file %s: %s"), name, mu_strerror (errno));
       exit (1);
     }
   fprintf (fp, "Path: %s\n", mhdir);
@@ -785,7 +785,7 @@ mh_install (char *name, int automode)
 	}
       else
 	{
-	  mu_error(_("Cannot stat %s: %s"), name, mu_strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", name, errno);
 	  exit (1);
 	}
     }
@@ -982,7 +982,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname)
     {
       rc = mu_mailbox_uidnext (mbox, &uid);
       if (rc)
-	mu_error (_("Cannot obtain sequence number for the new message: %s"),
+	mu_error (_("cannot obtain sequence number for the new message: %s"),
 		  mu_strerror (rc));
     }
   else
@@ -994,7 +994,7 @@ mh_draft_message (const char *name, const char *msgspec, char **pname)
       argv[1] = NULL;
       rc = mh_msgset_parse (mbox, &msgset, 1, argv, "cur");
       if (rc)
-	mu_error (_("Invalid message number: %s"), msgspec);
+	mu_error (_("invalid message number: %s"), msgspec);
       else if (msgset.count > 1)
 	mu_error (_("only one message at a time!"));
       else
diff --git a/mh/mh_list.c b/mh/mh_list.c
index ac9fc59..99f369e 100644
--- a/mh/mh_list.c
+++ b/mh/mh_list.c
@@ -132,13 +132,15 @@ parse_cleartext (locus_t *loc, mu_list_t formlist, char *str)
 static void
 parse_component (locus_t *loc, mu_list_t formlist, char *compname, char *str)
 {
+  int rc;
   mhl_stmt_t *stmt = stmt_alloc (stmt_component);
   stmt->v.component.name = compname;
-  if (mu_list_create (&stmt->v.component.format))
+  if ((rc = mu_list_create (&stmt->v.component.format)) != 0)
     {
-      mu_error (_("%s:%d: cannot create list"),
+      mu_error ("%s:%d: mu_list_create: %s",
 		loc->filename,
-		loc->line);
+		loc->line,
+		mu_strerror (rc));
       exit (1); /* FIXME */
     }
   parse_variable (loc, stmt->v.component.format, str);
@@ -148,17 +150,18 @@ parse_component (locus_t *loc, mu_list_t formlist, char *compname, char *str)
 static void
 parse_variable (locus_t *loc, mu_list_t formlist, char *str)
 {
-  int i;
+  int i, rc;
   int argc;
   char **argv;
   mh_format_t fmt;
   
-  if (mu_argcv_get (str, ",=", NULL, &argc, &argv))
+  if ((rc = mu_argcv_get (str, ",=", NULL, &argc, &argv)) != 0)
     {
-      mu_error (_("%s:%d: cannot split string %s"),
+      mu_error ("%s:%d: mu_argcv_get(%s): %s",
 		loc->filename,
 		loc->line,
-		str);
+		str,
+		mu_strerror (rc));
       exit (1);
     }
 
@@ -257,18 +260,19 @@ mhl_format_compile (char *name)
   char *buf = NULL;
   size_t n = 0;
   locus_t loc;
+  int rc;
   
   fp = fopen (name, "r");
   if (!fp)
     {
-      mu_error (_("Cannot open file %s: %s"), name, mu_strerror (errno));
+      mu_error (_("cannot open file %s: %s"), name, mu_strerror (errno));
       return NULL;
     }
 
-  if (mu_list_create (&formlist))
+  if ((rc = mu_list_create (&formlist)) != 0)
     {
       fclose (fp);
-      mu_error (_("Cannot create list"));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_list_create", NULL, rc);
       return NULL;
     }
 
diff --git a/mh/mh_msgset.c b/mh/mh_msgset.c
index 07d74ff..a5f3dfa 100644
--- a/mh/mh_msgset.c
+++ b/mh/mh_msgset.c
@@ -40,7 +40,7 @@ _expand (size_t *msgcnt, size_t **msglist, size_t inc)
 static void
 msgset_abort (const char *arg)
 {
-  mu_error (_("Bad message list `%s'"), arg);
+  mu_error (_("bad message list `%s'"), arg);
   exit (1);
 }
 
@@ -62,7 +62,7 @@ msgset_last (mu_mailbox_t mbox, size_t *pnum)
   rc = mu_mailbox_messages_count (mbox, &count);
   if (rc)
     {
-      mu_error (_("Cannot get last message: %s"), mu_strerror (rc));
+      mu_error (_("cannot get last message: %s"), mu_strerror (rc));
       exit (1);
     }
   *pnum = count;
@@ -162,7 +162,7 @@ msgset_preproc_part (mu_mailbox_t mbox, char *arg, char **rest)
 	rc = mu_mailbox_get_message (mbox, num, &msg);
 	if (rc)
 	  {
-	    mu_error (_("Cannot get message %d: %s"), num, mu_strerror (rc));
+	    mu_error (_("cannot get message %d: %s"), num, mu_strerror (rc));
 	    exit (1);
 	  }
 	*rest = arg + strlen (p->name);
@@ -603,7 +603,7 @@ mh_msgset_negate (mu_mailbox_t mbox, mh_msgset_t *msgset)
   list = realloc (list, sizeof (list[0]) * msgno);
   if (!list)
     {
-      mu_error (_("Not enough memory"));
+      mu_error (_("not enough memory"));
       abort ();
     }
   mh_msgset_free (msgset);
diff --git a/mh/mh_whatnow.c b/mh/mh_whatnow.c
index 943af3e..f8f5646 100644
--- a/mh/mh_whatnow.c
+++ b/mh/mh_whatnow.c
@@ -223,17 +223,17 @@ check_exit_status (const char *progname, int status)
     {
       if (WEXITSTATUS (status))
 	{
-	  mu_error (_("Command `%s' exited with status %d"),
+	  mu_error (_("command `%s' exited with status %d"),
 		    progname, WEXITSTATUS(status));
 	  return 1;
 	}
       return 0;
     }
   else if (WIFSIGNALED (status))
-    mu_error (_("Command `%s' terminated on signal %d"),
+    mu_error (_("command `%s' terminated on signal %d"),
 	      progname, WTERMSIG (status));
   else
-    mu_error (_("Command `%s' terminated abnormally"), progname);
+    mu_error (_("command `%s' terminated abnormally"), progname);
   return 1;
 }
 
diff --git a/mh/mh_whom.c b/mh/mh_whom.c
index b91d0ad..71d567c 100644
--- a/mh/mh_whom.c
+++ b/mh/mh_whom.c
@@ -35,7 +35,7 @@ addrcp (mu_list_t *list, char *addr, int isbcc)
   p->isbcc = isbcc;
   if (!*list && (rc = mu_list_create (list)))
     {
-      mu_error (_("Cannot create list: %s"), mu_strerror (rc));
+      mu_error (_("cannot create list: %s"), mu_strerror (rc));
       exit (1);
     }
   mu_list_append (*list, p);
@@ -212,7 +212,7 @@ mh_whom (const char *filename, int check)
       if (rc == ENOENT)
 	mu_error ("%s: %s", filename, mu_strerror (rc));
       else
-	mu_error ("%s: %s (%s)", filename, _("Malformed message"),
+	mu_error ("%s: %s (%s)", filename, _("malformed message"),
 		  mu_strerror (rc));
       rc = -1;
     }
@@ -238,7 +238,7 @@ mh_whom (const char *filename, int check)
 
       if (count == 0)
 	{
-	  mu_error(_("No recipients"));
+	  mu_error(_("no recipients"));
 	  rc = -1;
 	}
     }
diff --git a/mh/mhl.c b/mh/mhl.c
index ebc2380..e17acf8 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2008, 2009 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
@@ -110,7 +110,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, NULL, 0);
       if (!width)
 	{
-	  argp_error (state, _("Invalid width"));
+	  argp_error (state, _("invalid width"));
 	  exit (1);
 	}
       break;
@@ -119,7 +119,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       length = strtoul (arg, NULL, 0);
       if (!length)
 	{
-	  argp_error (state, _("Invalid length"));
+	  argp_error (state, _("invalid length"));
 	  exit (1);
 	}
       break;
@@ -163,13 +163,13 @@ open_output ()
 
   if (rc)
     {
-      mu_error (_("Cannot create output stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot create output stream: %s"), mu_strerror (rc));
       exit (1);
     }
 
   if ((rc = mu_stream_open (output)))
     {
-      mu_error (_("Cannot open output stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot open output stream: %s"), mu_strerror (rc));
       exit (1);
     }
   return output;
@@ -188,13 +188,13 @@ list_message (char *name, mu_stream_t output)
     rc = mu_file_stream_create (&input, name, MU_STREAM_READ);
   if (rc)
     {
-      mu_error (_("Cannot create input stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot create input stream: %s"), mu_strerror (rc));
       return;
     }
 
   if ((rc = mu_stream_open (input)))
     {
-      mu_error (_("Cannot open input stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot open input stream: %s"), mu_strerror (rc));
       mu_stream_destroy (&input, mu_stream_get_owner (input));
       return;
     }
@@ -202,7 +202,7 @@ list_message (char *name, mu_stream_t output)
   msg = mh_stream_to_message (input);
   if (!msg)
     {
-      mu_error (_("Input stream %s is not a message (%s)"),
+      mu_error (_("input stream %s is not a message (%s)"),
 		name, mu_strerror (rc));
       mu_stream_close (input);
       mu_stream_destroy (&input, mu_stream_get_owner (input));
diff --git a/mh/mhn.c b/mh/mhn.c
index 7d6d409..f5a1111 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -548,7 +548,7 @@ msg_part_parse (char *str)
 	  str = endp;
 	  break;
 	default:
-	  mu_error (_("Malformed part specification (near %s)"), endp);
+	  mu_error (_("malformed part specification (near %s)"), endp);
 	  exit (1);
 	}
       msg_part_incr (p);
@@ -1280,14 +1280,14 @@ mhn_exec (mu_stream_t *str, const char *cmd, int flags)
   int rc = mu_prog_stream_create (str, cmd, MU_STREAM_WRITE);
   if (rc)
     {
-      mu_error (_("Cannot create proc stream (command %s): %s"),
+      mu_error (_("cannot create proc stream (command %s): %s"),
 		cmd, mu_strerror (rc));
     }
   else
     {
       rc = mu_stream_open (*str);
       if (rc)
-	mu_error (_("Cannot open proc stream (command %s): %s"),
+	mu_error (_("cannot open proc stream (command %s): %s"),
 		  cmd, mu_strerror (rc));
     }
   return rc;
@@ -1328,14 +1328,14 @@ mhn_run_command (mu_message_t msg, msg_part_t part,
       
       if (mu_argcv_get (cmd, "", "#", &argc, &argv))
 	{
-	  mu_error (_("Cannot parse command line `%s'"), cmd);
+	  mu_error (_("cannot parse command line `%s'"), cmd);
 	  return ENOSYS;
 	}
 
       rc = mu_file_stream_create (&tmp, tempfile, MU_STREAM_RDWR);
       if (rc)
 	{
-	  mu_error (_("Cannot create temporary stream (file %s): %s"),
+	  mu_error (_("cannot create temporary stream (file %s): %s"),
 		    tempfile, mu_strerror (rc));
 	  mu_argcv_free (argc, argv);
 	  return rc;
@@ -1343,7 +1343,7 @@ mhn_run_command (mu_message_t msg, msg_part_t part,
       rc = mu_stream_open (tmp);
       if (rc)
 	{
-	  mu_error (_("Cannot open temporary stream (file %s): %s"),
+	  mu_error (_("cannot open temporary stream (file %s): %s"),
 		    tempfile, mu_strerror (rc));
 	  mu_stream_destroy (&tmp, mu_stream_get_owner (tmp));
 	  mu_argcv_free (argc, argv);
@@ -1469,13 +1469,13 @@ mhn_show ()
   rc = mu_stdio_stream_create (&ostr, stdout, 0);
   if (rc)
     {
-      mu_error (_("Cannot create output stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot create output stream: %s"), mu_strerror (rc));
       exit (1);
     }
   rc = mu_stream_open (ostr);
   if (rc)
     {
-      mu_error (_("Cannot open output stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot open output stream: %s"), mu_strerror (rc));
       exit (1);
     }
   
@@ -1685,7 +1685,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding,
   rc = mu_file_stream_create (&out, name, MU_STREAM_WRITE|MU_STREAM_CREAT);
   if (rc)
     {
-      mu_error (_("Cannot create output stream (file %s): %s"),
+      mu_error (_("cannot create output stream (file %s): %s"),
 		name, mu_strerror (rc));
       free (name);
       return rc;
@@ -1693,7 +1693,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding,
   rc = mu_stream_open (out);
   if (rc)
     {
-      mu_error (_("Cannot open output stream (file %s): %s"),
+      mu_error (_("cannot open output stream (file %s): %s"),
 		name, mu_strerror (rc));
       free (name);
       mu_stream_destroy (&out, mu_stream_get_owner (out));
@@ -2113,7 +2113,7 @@ edit_extern (char *cmd, struct compose_env *env, mu_message_t *msg, int level)
   
   if ((rc = mu_header_create (&hdr2, NULL, 0, NULL)) != 0)
     {
-      mu_error (_("Cannot create header: %s"),
+      mu_error (_("cannot create header: %s"),
 		mu_strerror (rc));
       return 1;
     }
@@ -2319,14 +2319,14 @@ edit_mime (char *cmd, struct compose_env *env, mu_message_t *msg, int level)
       rc = mu_file_stream_create (&in, cmd, MU_STREAM_READ);
       if (rc)
 	{
-	  mu_error (_("Cannot create input stream (file %s): %s"),
+	  mu_error (_("cannot create input stream (file %s): %s"),
 		    cmd, mu_strerror (rc));
 	  return rc;
 	}
       rc = mu_stream_open (in);
       if (rc)
 	{
-	  mu_error (_("Cannot open input stream (file %s): %s"),
+	  mu_error (_("cannot open input stream (file %s): %s"),
 		    cmd, mu_strerror (rc));
 	  mu_stream_destroy (&in, mu_stream_get_owner (in));
 	  return rc;
@@ -2364,7 +2364,7 @@ edit_mime (char *cmd, struct compose_env *env, mu_message_t *msg, int level)
   rc = mu_stream_open (fstr);
   if (rc)
     {
-      mu_error (_("Cannot open filter stream: %s"),
+      mu_error (_("cannot open filter stream: %s"),
 		mu_strerror (rc));
       return rc;
     }
@@ -2712,7 +2712,7 @@ mhn_compose ()
   rc = mu_file_stream_create (&stream, name, MU_STREAM_RDWR|MU_STREAM_CREAT);
   if (rc)
     {
-      mu_error (_("Cannot create output stream (file %s): %s"),
+      mu_error (_("cannot create output stream (file %s): %s"),
 		name, mu_strerror (rc));
       free (name);
       return rc;
@@ -2720,7 +2720,7 @@ mhn_compose ()
   rc = mu_stream_open (stream);
   if (rc)
     {
-      mu_error (_("Cannot open output stream (file %s): %s"),
+      mu_error (_("cannot open output stream (file %s): %s"),
 		name, mu_strerror (rc));
       free (name);
       mu_stream_destroy (&stream, mu_stream_get_owner (stream));
diff --git a/mh/pick.c b/mh/pick.c
index 3b8a04d..db1cb86 100644
--- a/mh/pick.c
+++ b/mh/pick.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2006, 2007, 2008,
+   2009 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
@@ -136,7 +137,7 @@ add_sequence (char *name)
 {
   if (!seq_list && mu_list_create (&seq_list))
     {
-      mu_error (_("Cannot create sequence list"));
+      mu_error (_("cannot create sequence list"));
       exit (1);
     }
   mu_list_append (seq_list, name);
@@ -263,7 +264,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       s = state->argv[state->next - 1];
       if (memcmp (s, "--", 2))
 	{
-	  argp_error (state, _("Invalid option -- %s"), s);
+	  argp_error (state, _("invalid option -- %s"), s);
 	  exit (1);
 	}
       p = strchr (s, '=');
@@ -276,7 +277,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
 	{
 	  if (state->next == state->argc)
 	    {
-	      mu_error (_("Invalid option -- %s"), s);
+	      mu_error (_("invalid option -- %s"), s);
 	      exit (1);
 	    }
 	  p = state->argv[state->next++];
diff --git a/mh/refile.c b/mh/refile.c
index aa81604..d78b2e7 100644
--- a/mh/refile.c
+++ b/mh/refile.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 2002, 2003, 2004, 2005, 2006, 
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -73,7 +73,7 @@ add_folder (const char *folder)
 {
   if (!folder_name_list && mu_list_create (&folder_name_list))
     {
-      mu_error (_("Cannot create folder list"));
+      mu_error (_("cannot create folder list"));
       exit (1);
     }
   mu_list_append (folder_name_list, strdup (folder));
@@ -86,19 +86,19 @@ open_folders ()
 
   if (!folder_name_list)
     {
-      mu_error (_("No folder specified"));
+      mu_error (_("no folder specified"));
       exit (1);
     }
 
   if (mu_list_create (&folder_mbox_list))
     {
-      mu_error (_("Cannot create folder list"));
+      mu_error (_("cannot create folder list"));
       exit (1);
     }
 
   if (mu_list_get_iterator (folder_name_list, &itr))
     {
-      mu_error (_("Cannot create iterator"));
+      mu_error (_("cannot create iterator"));
       exit (1);
     }
 
@@ -123,7 +123,7 @@ enumerate_folders (void (*f) (void *, mu_mailbox_t), void *data)
 
   if (mu_list_get_iterator (folder_mbox_list, &itr))
     {
-      mu_error (_("Cannot create iterator"));
+      mu_error (_("cannot create iterator"));
       exit (1);
     }
 
@@ -197,7 +197,7 @@ refile_folder (void *data, mu_mailbox_t mbox)
   rc = mu_mailbox_append_message (mbox, msg);
   if (rc)
     {
-      mu_error (_("Error appending message: %s"), mu_strerror (rc));
+      mu_error (_("error appending message: %s"), mu_strerror (rc));
       exit (1);
     }
 }
@@ -257,7 +257,7 @@ main (int argc, char **argv)
       
       if (argc > 0)
 	{
-	  mu_error (_("Both message set and source file given"));
+	  mu_error (_("both message set and source file given"));
 	  exit (1);
 	}
       msg = mh_file_to_message (mu_folder_directory (), source_file);
diff --git a/mh/repl.c b/mh/repl.c
index 52d3ec8..c972684 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 2002, 2003, 2005, 2006, 2007, 
-   2008 Free Software Foundation, Inc.
+   2008, 2009 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
@@ -213,7 +213,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, NULL, 0);
       if (!width)
 	{
-	  argp_error (state, _("Invalid width"));
+	  argp_error (state, _("invalid width"));
 	  exit (1);
 	}
       break;
@@ -314,7 +314,7 @@ make_draft (mu_mailbox_t mbox, int disp, struct mh_whatnow_env *wh)
   rc = mu_mailbox_get_message (mbox, msgset.list[0], &msg);
   if (rc)
     {
-      mu_error (_("Cannot read message %s: %s"),
+      mu_error (_("cannot read message %s: %s"),
 		mu_umaxtostr (0, msgset.list[0]),
 		mu_strerror (rc));
       exit (1);
@@ -335,14 +335,14 @@ make_draft (mu_mailbox_t mbox, int disp, struct mh_whatnow_env *wh)
 			       MU_STREAM_WRITE|MU_STREAM_CREAT);
       if (rc)
 	{
-	  mu_error (_("Cannot create draft file stream %s: %s"),
+	  mu_error (_("cannot create draft file stream %s: %s"),
 		    wh->file, mu_strerror (rc));
 	  exit (1);
 	}
 
       if ((rc = mu_stream_open (str)))
 	{
-	  mu_error (_("Cannot open draft file %s: %s"),
+	  mu_error (_("cannot open draft file %s: %s"),
 		    wh->file, mu_strerror (rc));
 	  exit (1);
 	}	  
diff --git a/mh/rmf.c b/mh/rmf.c
index 806e9c7..828d737 100644
--- a/mh/rmf.c
+++ b/mh/rmf.c
@@ -1,5 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2006, 2007, 2008,
+   2009 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
@@ -123,7 +124,7 @@ rmf (const char *name)
 
   if (!dir)
     {
-      mu_error (_("Cannot scan folder %s: %s"), name, strerror (errno));
+      mu_error (_("cannot scan folder %s: %s"), name, strerror (errno));
       return 1;
     }
 
@@ -142,7 +143,7 @@ rmf (const char *name)
       asprintf (&p, "%s/%s", name, entry->d_name);
       if (stat (p, &st) < 0)
 	{
-	  mu_error (_("Cannot stat %s: %s"), p, strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", p, errno);
 	}
       else if (S_ISDIR (st.st_mode))
 	{
@@ -159,7 +160,7 @@ rmf (const char *name)
 	{
 	  if (unlink (p))
 	    {
-	      mu_error (_("Cannot unlink %s: %s"), p, strerror (errno));
+	      mu_error (_("cannot unlink %s: %s"), p, strerror (errno));
 	      failures++;
 	    }
 	}
diff --git a/mh/scan.c b/mh/scan.c
index 04df758..77274b3 100644
--- a/mh/scan.c
+++ b/mh/scan.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 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
@@ -120,7 +120,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, NULL, 0);
       if (!width)
 	{
-	  argp_error (state, _("Invalid width"));
+	  argp_error (state, _("invalid width"));
 	  exit (1);
 	}
       break;
diff --git a/mh/send.c b/mh/send.c
index 7563b24..6bae7b1 100644
--- a/mh/send.c
+++ b/mh/send.c
@@ -146,7 +146,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       split_size = strtoul (arg, &p, 10);
       if (*p)
 	{
-	  argp_error (state, "%s: %s", arg, _("Invalid number"));
+	  argp_error (state, "%s: %s", arg, _("invalid number"));
 	  exit (1);
 	}
       break;
@@ -222,7 +222,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       split_interval = strtoul (arg, &p, 10);
       if (*p)
 	{
-	  argp_error (state, "%s: %s", arg, _("Invalid number"));
+	  argp_error (state, "%s: %s", arg, _("invalid number"));
 	  exit (1);
 	}
       break;
@@ -247,7 +247,7 @@ opt_handler (int key, char *arg, void *unused, struct argp_state *state)
       width = strtoul (arg, &p, 10);
       if (*p)
 	{
-	  argp_error (state, _("Invalid number"));
+	  argp_error (state, _("invalid number"));
 	  exit (1);
 	}
       break;
@@ -299,7 +299,7 @@ check_file (char *name)
   if (!mesg_list && mu_list_create (&mesg_list))
     {
       free (file_name);
-      mu_error (_("Cannot create message list"));
+      mu_error (_("cannot create message list"));
       return 1;
     }
   elt = xmalloc (sizeof *elt);
@@ -332,7 +332,7 @@ read_mts_profile ()
       mu_set_user_email_domain (p);
     }
   else if ((rc = mu_get_host_name (&hostname)))
-    mu_error (_("Cannot get system host name: %s"), mu_strerror (rc));
+    mu_error (_("cannot get system host name: %s"), mu_strerror (rc));
 
   if ((p = mh_context_get_value (mts_profile, "localdomain", NULL)))
     {
@@ -349,7 +349,7 @@ read_mts_profile ()
       free (newdomain);
       if (rc)
 	{
-	  mu_error (_("Cannot set user mail domain: %s"), mu_strerror (rc));
+	  mu_error (_("cannot set user mail domain: %s"), mu_strerror (rc));
 	  exit (1);
 	}
     }
@@ -364,7 +364,7 @@ read_mts_profile ()
       rc = mu_get_user_email_domain (&domain);
       if (rc)
 	{
-	  mu_error (_("Cannot get user email: %s"), mu_strerror (rc));
+	  mu_error (_("cannot get user email: %s"), mu_strerror (rc));
 	  exit (1);
 	}
       len = strlen (p) + 1 + strlen (domain) + 1;
@@ -376,7 +376,7 @@ read_mts_profile ()
       rc = mu_set_user_email (newemail);
       if (rc)
 	{
-	  mu_error (_("Cannot set user email (%s): %s"),
+	  mu_error (_("cannot set user email (%s): %s"),
 		    newemail, mu_strerror (rc));
 	  exit (1);
 	}
@@ -399,7 +399,7 @@ open_mailer ()
   status = mu_mailer_create (&mailer, url);
   if (status)
     {
-      mu_error (_("Cannot create mailer `%s'"), url);
+      mu_error (_("cannot create mailer `%s'"), url);
       return NULL;
     }
 
@@ -414,7 +414,7 @@ open_mailer ()
   status = mu_mailer_open (mailer, MU_STREAM_RDWR);
   if (status)
     {
-      mu_error (_("Cannot open mailer `%s'"), url);
+      mu_error (_("cannot open mailer `%s'"), url);
       return NULL;
     }
   return mailer;
@@ -542,7 +542,7 @@ fix_fcc (mu_message_t msg)
       if (need_fixup)
 	{
 	  mu_header_set_value (hdr, MU_HEADER_FCC, fcc, 1);
-	  WATCH ((_("fixed fcc: %s"), fcc));
+	  WATCH ((_("Fixed fcc: %s"), fcc));
 	}
       free (fcc);
     }	  
@@ -584,7 +584,7 @@ fix_dcc (mu_message_t msg)
       else
 	bcc = dcc;
 
-      WATCH ((_("fixed bcc: %s"), bcc));
+      WATCH ((_("Fixed bcc: %s"), bcc));
       mu_header_set_value (hdr, MU_HEADER_BCC, bcc, 1);
       free (bcc);
     }
@@ -607,12 +607,12 @@ backup_file (const char *file_name)
       new_name[0] = ',';
       strcpy (new_name + 1, file_name);
     }
-  WATCH ((_("renaming %s to %s"), file_name, new_name));
+  WATCH ((_("Renaming %s to %s"), file_name, new_name));
 
   if (unlink (new_name) && errno != ENOENT)
-    mu_error (_("Cannot unlink file `%s': %s"), new_name, mu_strerror (errno));
+    mu_error (_("cannot unlink file `%s': %s"), new_name, mu_strerror (errno));
   else if (rename (file_name, new_name))
-    mu_error (_("Cannot rename `%s' to `%s': %s"),
+    mu_error (_("cannot rename `%s' to `%s': %s"),
 	      file_name, new_name, mu_strerror (errno));
   free (new_name);
 }
@@ -694,7 +694,7 @@ _action_send (void *item, void *data)
     rc = mu_mailer_send_message (mailer, msg, NULL, NULL);
   if (rc)
     {
-      mu_error(_("Cannot send message: %s"), mu_strerror (rc));
+      mu_error(_("cannot send message: %s"), mu_strerror (rc));
       return 1;
     }
 
@@ -725,7 +725,7 @@ do_send (int argc, char **argv)
   
   if (background && daemon (0, 0) < 0)
     {
-      mu_error(_("Cannot switch to background: %s"), mu_strerror (errno));
+      mu_error (_("cannot switch to background: %s"), mu_strerror (errno));
       return 1;
     }
 
@@ -764,7 +764,7 @@ main (int argc, char **argv)
 
       if (stat (xargv[0], &st))
 	{
-	  mu_error(_("Cannot stat %s: %s"), xargv[0], mu_strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", xargv[0], errno);
 	  return 1;
 	}
 
diff --git a/mimeview/mimetypes.l b/mimeview/mimetypes.l
index d66bb66..c15f1dc 100644
--- a/mimeview/mimetypes.l
+++ b/mimeview/mimetypes.l
@@ -1,6 +1,6 @@
 %{
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009 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
@@ -147,7 +147,7 @@ mimetypes_open (const char *name)
   struct stat st;
   if (stat (name, &st))
     {
-      mu_error (_("Cannot stat `%s': %s"), name, mu_strerror (errno));
+      mu_error (_("cannot stat `%s': %s"), name, mu_strerror (errno));
       return -1;
     }
   
diff --git a/mimeview/mimeview.c b/mimeview/mimeview.c
index fb2bf2b..7745bd8 100644
--- a/mimeview/mimeview.c
+++ b/mimeview/mimeview.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2008, 2009 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
@@ -188,12 +188,12 @@ open_file (char *name)
   struct stat st;
   if (stat (name, &st))
     {
-      mu_error (_("Cannot stat `%s': %s"), name, mu_strerror (errno));
+      mu_error (_("cannot stat `%s': %s"), name, mu_strerror (errno));
       return -1;
     }
   if (!S_ISREG (st.st_mode) && !S_ISLNK (st.st_mode))
     {
-      mu_error (_("Not a regular file or symbolic link: `%s'"), name);
+      mu_error (_("not a regular file or symbolic link: `%s'"), name);
       return -1;
     }
 
@@ -252,7 +252,7 @@ display_file (const char *type)
       asprintf (&text, "Content-Type: %s\n", type);
       status = mu_header_create (&hdr, text, strlen (text), NULL);
       if (status)
-	mu_error (_("Cannot create header: %s"), mu_strerror (status));
+	mu_error (_("cannot create header: %s"), mu_strerror (status));
       else
 	{
 	  mu_stdio_stream_create (&stream, mimeview_fp,
@@ -287,7 +287,7 @@ main (int argc, char **argv)
 
   if (argc == 0)
     {
-      mu_error (_("No files given"));
+      mu_error (_("no files given"));
       return 1;
     }
 
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 99dc5b0..8b01a92 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -178,7 +178,7 @@ _cb_mailbox_ownership (mu_debug_t debug, const char *str)
       if (mu_kwd_xlat_name_len (method_kwd, str, len, &code))
 	{
 	  mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-			       _("Invalid ownership method: %s"),
+			       _("invalid ownership method: %s"),
 			       str);
 	  return 1;
 	}
@@ -347,7 +347,7 @@ lock_mailbox (mu_mailbox_t mbox)
   
   status = mu_mailbox_get_locker (mbox, &lock);
   if (status)
-    die (mbox, _("Cannot retrieve locker"), status);
+    die (mbox, _("cannot retrieve locker"), status);
       
   if (!lock)
     /* Remote mailboxes have no lockers */
@@ -356,7 +356,7 @@ lock_mailbox (mu_mailbox_t mbox)
   status = mu_locker_lock (lock);
 
   if (status)
-    die (mbox, _("Cannot lock"), status);
+    die (mbox, _("cannot lock"), status);
 }
 
 
@@ -400,11 +400,11 @@ open_mailbox (mu_mailbox_t *mbx, char *name, int flags, char *passwd)
   if (status)
     {
       if (name)
-	mu_error (_("Could not create mailbox `%s': %s"),
+	mu_error (_("could not create mailbox `%s': %s"),
 		  name,
 		  mu_strerror (status));
       else
-	mu_error (_("Could not create default mailbox: %s"),
+	mu_error (_("could not create default mailbox: %s"),
 		  mu_strerror (status));
       exit (1);
     }
@@ -413,7 +413,7 @@ open_mailbox (mu_mailbox_t *mbx, char *name, int flags, char *passwd)
     attach_passwd_ticket (*mbx, passwd);
   status = mu_mailbox_open (*mbx, flags);
   if (status)
-    die (*mbx, _("Cannot open"), status);
+    die (*mbx, _("cannot open"), status);
   lock_mailbox (*mbx);
 }
 
@@ -425,13 +425,13 @@ move_message (mu_mailbox_t src, mu_mailbox_t dst, size_t msgno)
 
   if ((rc = mu_mailbox_get_message (src, msgno, &msg)) != 0)
     {
-      mu_error (_("Cannot read message %lu: %s"),
+      mu_error (_("cannot read message %lu: %s"),
 		(unsigned long) msgno, mu_strerror (rc));
       return rc;
     }
   if ((rc = mu_mailbox_append_message (dst, msg)) != 0)
     {
-      mu_error (_("Cannot append message %lu: %s\n"),
+      mu_error (_("cannot append message %lu: %s\n"),
 		(unsigned long) msgno, mu_strerror (rc));
       return rc;
     }
@@ -462,7 +462,7 @@ compatibility_mode (mu_mailbox_t *mbx, char *source_name, char *password,
     host = getenv ("MAILHOST");
   if (!host)
     {
-      mu_error (_("Hostname of the POP3 server is unknown"));
+      mu_error (_("hostname of the POP3 server is unknown"));
       exit (1);
     }
   asprintf (&tmp, "pop://%s@%s", user_name, host);
@@ -485,7 +485,7 @@ get_mbox_owner_id (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
   const char *s;
   int rc = mu_url_sget_scheme  (url, &s);
   if (rc)
-    die (mbox, _("Cannot get scheme"), rc);
+    die (mbox, _("cannot get scheme"), rc);
   if ((strcmp (s, "/") == 0
        || strcmp (s, "mbox") == 0
        || strcmp (s, "mh") == 0
@@ -495,10 +495,10 @@ get_mbox_owner_id (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
       
       rc = mu_url_sget_path  (url, &s);
       if (rc)
-	die (mbox, _("Cannot get path"), rc);
+	die (mbox, _("cannot get path"), rc);
       if (stat (s, &st))
 	{
-	  mu_error (_("Cannot stat mailbox `%s': %s"), s,
+	  mu_error (_("cannot stat mailbox `%s': %s"), s,
 		    mu_strerror (errno));
 	  exit (1);
 	}
@@ -537,7 +537,7 @@ get_mbox_owner_name (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
   int rc = mu_url_sget_user (url, &s);
   if (rc)
     /* FIXME */
-    die (mbox, _("Cannot get mailbox owner name"), rc);
+    die (mbox, _("cannot get mailbox owner name"), rc);
 
   return get_user_id (s, id);
 }
@@ -551,7 +551,7 @@ guess_mbox_owner (mu_mailbox_t mbox, struct user_id *id)
   
   rc = mu_mailbox_get_url (mbox, &url);
   if (rc)
-    die (mbox, _("Cannot get url"), rc);
+    die (mbox, _("cannot get url"), rc);
 
   rc = 1;
   for (meth = so_methods; rc == 1 && meth < so_methods + so_method_num; meth++)
@@ -685,7 +685,7 @@ main (int argc, char **argv)
 
   if (argc < 2 || argc > 3)
     {
-      mu_error (_("Wrong number of arguments"));
+      mu_error (_("wrong number of arguments"));
       return 1;
     }
 
@@ -708,13 +708,13 @@ main (int argc, char **argv)
   rc = mu_mailbox_messages_count (source, &total);
   if (rc)
     {
-      mu_error(_("Cannot count messages: %s"), mu_strerror (rc));
+      mu_error(_("cannot count messages: %s"), mu_strerror (rc));
       exit (1);
     }
   
   if (verbose_option)
     mu_diag_output (MU_DIAG_INFO,
-		    _("Number of messages in source mailbox: %lu"),
+		    _("number of messages in source mailbox: %lu"),
 		    (unsigned long) total);
 
   if (uidl_option)
@@ -724,10 +724,10 @@ main (int argc, char **argv)
 
       rc = mu_mailbox_get_uidls (source, &src_uidl_list);
       if (rc)
-	die (source, _("Cannot get UIDLs"), rc);
+	die (source, _("cannot get UIDLs"), rc);
       rc = mu_mailbox_get_uidls (dest, &dst_uidl_list);
       if (rc)
-	die (dest, _("Cannot get UIDLs"), rc);
+	die (dest, _("cannot get UIDLs"), rc);
 
       mu_list_set_comparator (src_uidl_list, NULL);
       mu_list_set_comparator (dst_uidl_list, _compare_uidls);
@@ -754,7 +754,7 @@ main (int argc, char **argv)
 	  if (src_uidl_list && !msgno_in_list (src_uidl_list, i))
 	    {
 	      if (verbose_option > 1)
-		mu_diag_output (MU_DIAG_INFO, _("Ignoring message %lu"),
+		mu_diag_output (MU_DIAG_INFO, _("ignoring message %lu"),
 				(unsigned long) i);
 	      continue;
 	    }
@@ -786,7 +786,7 @@ main (int argc, char **argv)
   
   if (verbose_option)
     mu_diag_output (MU_DIAG_INFO,
-		    _("Number of processed messages: %lu"),
+		    _("number of processed messages: %lu"),
 		    (unsigned long) msg_count);
   
   if (rc)
@@ -796,7 +796,7 @@ main (int argc, char **argv)
   rc = mu_mailbox_close (dest);
   mu_mailbox_destroy (&dest);
   if (rc)
-    mu_error (_("Cannot close destination mailbox: %s"), mu_strerror (rc));
+    mu_error (_("cannot close destination mailbox: %s"), mu_strerror (rc));
   else
     mu_mailbox_flush (source, 1);
 
diff --git a/pop3d/apop.c b/pop3d/apop.c
index 51a8349..5835dd7 100644
--- a/pop3d/apop.c
+++ b/pop3d/apop.c
@@ -52,7 +52,7 @@ pop3d_apopuser (const char *user)
     int rc = mu_dbm_open (APOP_PASSFILE, &db, MU_STREAM_READ, 0600);
     if (rc)
       {
-	mu_diag_output (MU_DIAG_ERROR, _("Unable to open APOP db: %s"),
+	mu_diag_output (MU_DIAG_ERROR, _("unable to open APOP db: %s"),
 		mu_strerror (errno));
 	return NULL;
       }
@@ -70,7 +70,8 @@ pop3d_apopuser (const char *user)
     mu_dbm_close (db);
     if (rc)
       {
-	mu_diag_output (MU_DIAG_ERROR, _("Cannot fetch APOP data: %s"), mu_strerror (errno));
+	mu_diag_output (MU_DIAG_ERROR,
+			_("cannot fetch APOP data: %s"), mu_strerror (errno));
 	return NULL;
       }
     password = calloc (MU_DATUM_SIZE(data) + 1, sizeof (*password));
@@ -92,14 +93,15 @@ pop3d_apopuser (const char *user)
 
     if (mu_check_perm (APOP_PASSFILE, 0600))
       {
-	mu_diag_output (MU_DIAG_INFO, _("Bad permissions on APOP password file"));
+	mu_diag_output (MU_DIAG_INFO,
+			_("bad permissions on APOP password file"));
 	return NULL;
     }
 
     apop_file = fopen (APOP_PASSFILE, "r");
     if (apop_file == NULL)
       {
-	mu_diag_output (MU_DIAG_INFO, _("Unable to open APOP password file %s"),
+	mu_diag_output (MU_DIAG_INFO, _("unable to open APOP password file %s"),
 		strerror (errno));
 	return NULL;
       }
@@ -159,14 +161,15 @@ pop3d_apop (char *arg)
   pop3d_parse_command (arg, &user, &user_digest);
   if (strlen (user) > (POP_MAXCMDLEN - APOP_DIGEST))
     {
-      mu_diag_output (MU_DIAG_INFO, _("User name too long: %s"), user);
+      mu_diag_output (MU_DIAG_INFO, _("user name too long: %s"), user);
       return ERR_BAD_ARGS;
     }
 
   password = pop3d_apopuser (user);
   if (password == NULL)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Password for `%s' not found in the database"),
+      mu_diag_output (MU_DIAG_INFO,
+		      _("password for `%s' not found in the database"),
 	      user);
       return ERR_BAD_LOGIN;
     }
diff --git a/pop3d/bulletin.c b/pop3d/bulletin.c
index a8cd520..645f938 100644
--- a/pop3d/bulletin.c
+++ b/pop3d/bulletin.c
@@ -45,7 +45,7 @@ open_bulletin_mailbox (mu_mailbox_t *pmbox)
   
   if ((status = mu_mailbox_create (&tmbox, bulletin_mbox_name)) != 0)
     {
-      mu_error (_("Cannot create bulletin mailbox `%s': %s"),
+      mu_error (_("cannot create bulletin mailbox `%s': %s"),
 		bulletin_mbox_name, mu_strerror (status));
       return 1;
     }
@@ -53,7 +53,7 @@ open_bulletin_mailbox (mu_mailbox_t *pmbox)
   if ((status = mu_mailbox_open (tmbox, MU_STREAM_READ)) != 0)
     {
       mu_mailbox_destroy (&tmbox);
-      mu_error (_("Cannot open bulletin mailbox `%s': %s"),
+      mu_error (_("cannot open bulletin mailbox `%s': %s"),
 		bulletin_mbox_name, mu_strerror (status));
       return 1;
     }
@@ -137,7 +137,7 @@ read_bulletin_db (size_t *pnum)
 	}
       else
 	{
-	  mu_error (_("Unable to open bulletin db for reading: %s"),
+	  mu_error (_("unable to open bulletin db for reading: %s"),
 		    mu_strerror (errno));
 	  return rc;
 	}
@@ -159,7 +159,7 @@ read_bulletin_db (size_t *pnum)
            *pnum = 0;
            return 0;
         }
-      mu_error (_("Cannot fetch bulletin db data: %s"),
+      mu_error (_("cannot fetch bulletin db data: %s"),
 		mu_strerror (ec));
       mu_dbm_close (db);
       return 1;
@@ -207,7 +207,7 @@ read_bulletin_db (size_t *pnum)
       else
 #endif /* QPOPPER_COMPAT */
 	{
-	  mu_error (_("Wrong bulletin database format for `%s'"),
+	  mu_error (_("wrong bulletin database format for `%s'"),
 		    username);
 	}
     }
@@ -227,7 +227,7 @@ write_bulletin_db (size_t num)
   rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_RDWR, 0660);
   if (rc)
     {
-      mu_error (_("Unable to open bulletin db for writing: %s"),
+      mu_error (_("unable to open bulletin db for writing: %s"),
 		mu_strerror (errno));
       return rc;
     }
@@ -243,7 +243,7 @@ write_bulletin_db (size_t num)
 
   rc = mu_dbm_insert (db, key, data, 1);
   if (rc)
-    mu_error (_("Cannot store datum in bulletin db"));
+    mu_error (_("cannot store datum in bulletin db"));
 
   mu_dbm_close (db);
   return rc;
@@ -286,7 +286,7 @@ deliver_pending_bulletins ()
 
   rc = mu_mailbox_messages_count (bull, &total);
   if (rc)
-    mu_error (_("Cannot count bulletins: %s"), mu_strerror (rc));
+    mu_error (_("cannot count bulletins: %s"), mu_strerror (rc));
   else
     {
       mu_diag_output (MU_DIAG_DEBUG,
@@ -311,14 +311,14 @@ deliver_pending_bulletins ()
 	  
 	      if ((rc = mu_mailbox_get_message (bull, i, &msg)) != 0)
 		{
-		  mu_error (_("Cannot read bulletin %lu: %s"),
+		  mu_error (_("cannot read bulletin %lu: %s"),
 			    (unsigned long) i, mu_strerror (rc));
 		  break;
 		}
 	
 	      if ((rc = mu_mailbox_append_message (mbox, msg)) != 0)
 		{
-		  mu_error (_("Cannot append message %lu: %s"),
+		  mu_error (_("cannot append message %lu: %s"),
 			    (unsigned long) i, mu_strerror (rc));
 		  break;
 		}
diff --git a/pop3d/extra.c b/pop3d/extra.c
index 054d8c6..10b9812 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2001, 2002, 2003, 2005, 
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -62,42 +62,42 @@ pop3d_abquit (int reason)
     case ERR_NO_MEM:
       code = EX_SOFTWARE;
       pop3d_outf ("-ERR %s\r\n", pop3d_error_string (reason));
-      mu_diag_output (MU_DIAG_ERROR, _("Out of memory"));
+      mu_diag_output (MU_DIAG_ERROR, _("not enough memory"));
       break;
 
     case ERR_SIGNAL:
       code = EX_SOFTWARE;
-      mu_diag_output (MU_DIAG_ERROR, _("Quitting on signal"));
+      mu_diag_output (MU_DIAG_ERROR, _("quitting on signal"));
       break;
 
     case ERR_TERMINATE:
       code = EX_OK;
-      mu_diag_output (MU_DIAG_NOTICE, _("Terminating on request"));
+      mu_diag_output (MU_DIAG_NOTICE, _("terminating on request"));
       break;
 
     case ERR_TIMEOUT:
       code = EX_TEMPFAIL;
       pop3d_outf ("-ERR %s\r\n", pop3d_error_string (reason));
       if (state == TRANSACTION)
-	mu_diag_output (MU_DIAG_INFO, _("Session timed out for user: %s"),
+	mu_diag_output (MU_DIAG_INFO, _("session timed out for user: %s"),
 			username);
       else
-	mu_diag_output (MU_DIAG_INFO, _("Session timed out for no user"));
+	mu_diag_output (MU_DIAG_INFO, _("session timed out for no user"));
       break;
 
     case ERR_NO_IFILE:
       code = EX_NOINPUT;
-      mu_diag_output (MU_DIAG_INFO, _("No input stream"));
+      mu_diag_output (MU_DIAG_INFO, _("no input stream"));
       break;
 
     case ERR_NO_OFILE:
       code = EX_IOERR;
-      mu_diag_output (MU_DIAG_INFO, _("No socket to send to"));
+      mu_diag_output (MU_DIAG_INFO, _("no socket to send to"));
       break;
 
     case ERR_PROTO:
       code = EX_PROTOCOL;
-      mu_diag_output (MU_DIAG_INFO, _("Remote protocol error"));
+      mu_diag_output (MU_DIAG_INFO, _("remote protocol error"));
       break;
 
     case ERR_IO:
@@ -108,7 +108,7 @@ pop3d_abquit (int reason)
     case ERR_MBOX_SYNC:
       code = EX_OSERR; /* FIXME: This could be EX_SOFTWARE as well? */
       mu_diag_output (MU_DIAG_ERROR,
-		      _("Mailbox was updated by other party: %s"),
+		      _("mailbox was updated by other party: %s"),
 		      username);
       pop3d_outf
 	("-ERR [OUT-SYNC] Mailbox updated by other party or corrupt\r\n");
@@ -117,7 +117,7 @@ pop3d_abquit (int reason)
     default:
       code = EX_SOFTWARE;
       pop3d_outf ("-ERR Quitting: %s\r\n", pop3d_error_string (reason));
-      mu_diag_output (MU_DIAG_ERROR, _("Quitting (numeric reason %d)"),
+      mu_diag_output (MU_DIAG_ERROR, _("quitting (numeric reason %d)"),
 		      reason);
       break;
     }
@@ -233,7 +233,7 @@ pop3d_outf (const char *fmt, ...)
 
       if (mu_stream_strerror (ostream, &p))
 	p = strerror (errno);
-      mu_diag_output (MU_DIAG_ERROR, _("Write failed: %s"), p);
+      mu_diag_output (MU_DIAG_ERROR, _("write failed: %s"), p);
       pop3d_abquit (ERR_IO);
     }
 }
@@ -255,7 +255,7 @@ pop3d_readline (char *buffer, size_t size)
 
       if (mu_stream_strerror (ostream, &p))
 	p = strerror (errno);
-      mu_diag_output (MU_DIAG_ERROR, _("Read failed: %s"), p);
+      mu_diag_output (MU_DIAG_ERROR, _("read failed: %s"), p);
       pop3d_abquit (ERR_IO);
     }
   else if (nbytes == 0)
diff --git a/pop3d/lock.c b/pop3d/lock.c
index 0797569..e346f75 100644
--- a/pop3d/lock.c
+++ b/pop3d/lock.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2007, 2008 Free Software Foundation, Inc.
+   2007, 2008, 2009 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
@@ -33,7 +33,7 @@ pop3d_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"),
+      mu_diag_output (MU_DIAG_NOTICE, _("locking mailbox `%s' failed: %s"),
 	      name ? name : "?", mu_strerror(status));
       return ERR_MBOX_LOCK;
     }
diff --git a/pop3d/logindelay.c b/pop3d/logindelay.c
index a9b5d24..b6f86a3 100644
--- a/pop3d/logindelay.c
+++ b/pop3d/logindelay.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2009 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
@@ -27,9 +27,9 @@ open_stat_db (DBM_FILE *db, int mode)
   if (rc)
     {
       if (rc == -1)
-	mu_diag_output (MU_DIAG_INFO, _("Bad permissions on statistics db"));
+	mu_diag_output (MU_DIAG_INFO, _("bad permissions on statistics db"));
       else
-	mu_diag_output (MU_DIAG_ERROR, _("Unable to open statistics db: %s"),
+	mu_diag_output (MU_DIAG_ERROR, _("unable to open statistics db: %s"),
 		mu_strerror (rc));
     }
   return rc;
@@ -59,7 +59,7 @@ check_login_delay (char *username)
   rc = mu_dbm_fetch (db, key, &data);
   if (rc)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Cannot fetch login delay data: %s"),
+      mu_diag_output (MU_DIAG_ERROR, _("cannot fetch login delay data: %s"),
 	      mu_strerror (rc));
       mu_dbm_close (db);
       return 0;
@@ -67,7 +67,8 @@ check_login_delay (char *username)
 
   if (MU_DATUM_SIZE(data) > sizeof (text) - 1)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Invalid entry for '%s': wrong timestamp size"),
+      mu_diag_output (MU_DIAG_ERROR,
+		      _("invalid entry for '%s': wrong timestamp size"),
 	      username);
       mu_dbm_close (db);
       return 0;
@@ -80,7 +81,8 @@ check_login_delay (char *username)
   prev_time = strtoul (text, &p, 0);
   if (*p)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("Malformed timestamp for '%s': %s"),
+      mu_diag_output (MU_DIAG_ERROR,
+		      _("malformed timestamp for '%s': %s"),
 	      username, text);
       return 0;
     }
@@ -111,7 +113,7 @@ update_login_delay (char *username)
   MU_DATUM_PTR(data) = text;
   MU_DATUM_SIZE(data) = strlen (text);
   if (mu_dbm_insert (db, key, data, 1))
-    mu_error (_("%s: can't store datum %s/%s"),
+    mu_error (_("%s: cannot store datum %s/%s"),
 	      login_stat_file, username, text);
   
   mu_dbm_close (db);
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 8b05ace..9605ecb 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -256,12 +256,12 @@ pop3d_parse_opt (int key, char *arg, struct argp_state *astate)
 int
 pop3d_get_client_address (int fd, struct sockaddr_in *pcs)
 {
-  mu_diag_output (MU_DIAG_INFO, _("Incoming connection opened"));
+  mu_diag_output (MU_DIAG_INFO, _("incoming connection opened"));
 
   /* log information on the connecting client. */
   if (debug_mode)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Started in debugging mode"));
+      mu_diag_output (MU_DIAG_INFO, _("started in debugging mode"));
       return 1;
     }
   else
@@ -270,7 +270,7 @@ pop3d_get_client_address (int fd, struct sockaddr_in *pcs)
       if (getpeername (fd, (struct sockaddr*) pcs, &len) < 0)
 	{
 	  mu_diag_output (MU_DIAG_ERROR,
-			  _("Cannot obtain IP address of client: %s"),
+			  _("cannot obtain IP address of client: %s"),
 			  strerror (errno));
 	  return 1;
 	}
@@ -454,12 +454,12 @@ main (int argc, char **argv)
 	{
 	  if (errno == 0 || errno == ENOENT)
             {
-               mu_error (_("%s: No such group"), "mail");
+               mu_error (_("%s: no such group"), "mail");
                exit (EX_CONFIG);
             }
           else
             {
-	       mu_error (_("Error getting mail group: %s"), 
+	       mu_error (_("error getting mail group: %s"), 
                          mu_strerror (errno));
 	       exit (EX_OSERR);
             }
@@ -467,7 +467,7 @@ main (int argc, char **argv)
 
       if (setgid (gr->gr_gid) == -1)
 	{
-	  mu_error (_("Error setting mail group: %s"), mu_strerror (errno));
+	  mu_error (_("error setting mail group: %s"), mu_strerror (errno));
 	  exit (EX_OSERR);
 	}
     }
@@ -517,7 +517,7 @@ main (int argc, char **argv)
     }
   
   if (status)
-    mu_error (_("Main loop status: %s"), mu_strerror (status));	  
+    mu_error (_("main loop status: %s"), mu_strerror (status));	  
   /* Close the syslog connection and exit.  */
   closelog ();
   return status ? EX_SOFTWARE : EX_OK;
diff --git a/pop3d/popauth.c b/pop3d/popauth.c
index 03ab5b6..f9f71f2 100644
--- a/pop3d/popauth.c
+++ b/pop3d/popauth.c
@@ -114,7 +114,7 @@ set_db_perms (struct argp_state *astate, char *opt, int *pperm)
       perm = strtoul (opt, &p, 8);
       if (*p)
 	{
-	  argp_error (astate, _("Invalid octal number: %s"), opt);
+	  argp_error (astate, _("invalid octal number: %s"), opt);
 	  exit (EX_USAGE);
 	}
     }
@@ -237,8 +237,8 @@ check_user_perm (int action, struct action_data *ap)
 	  DBM_FILE db;
 	  if (mu_dbm_open (ap->input_name, &db, MU_STREAM_CREAT, permissions))
 	    {
-	      mu_error (_("Cannot create %s: %s"),
-			ap->input_name, mu_strerror (errno));
+	      mu_diag_funcall (MU_DIAG_ERROR, "mu_dbm_open",
+			       ap->input_name, errno);
 	      exit (EX_SOFTWARE);
 	    }
 	  mu_dbm_close (db);
@@ -246,8 +246,7 @@ check_user_perm (int action, struct action_data *ap)
 	}
       else
 	{
-	  mu_error (_("Cannot stat %s: %s"), ap->input_name, 
-                    mu_strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", ap->input_name, errno);
 	  exit (EX_OSERR);
 	}
     }
@@ -285,7 +284,8 @@ action_list (struct action_data *ap)
   check_user_perm (ACT_LIST, ap);
   if (mu_dbm_open (ap->input_name, &db, MU_STREAM_READ, 0))
     {
-      mu_error (_("Cannot open %s: %s"), ap->input_name, mu_strerror (errno));
+      mu_error (_("cannot open file %s: %s"),
+		ap->input_name, mu_strerror (errno));
       return 1;
     }
   
@@ -294,7 +294,7 @@ action_list (struct action_data *ap)
       fp = fopen (ap->output_name, "w");
       if (!fp)
 	{
-	  mu_error (_("Cannot create %s: %s"), ap->output_name, mu_strerror (errno));
+	  mu_error (_("Cannot create file %s: %s"), ap->output_name, mu_strerror (errno));
 	  return 1;
 	}
     }
@@ -309,7 +309,7 @@ action_list (struct action_data *ap)
       MU_DATUM_SIZE (key) = strlen (ap->username);
       if (mu_dbm_fetch (db, key, &contents))
 	{
-	  mu_error (_("No such user: %s"), ap->username);
+	  mu_error (_("no such user: %s"), ap->username);
 	}
       else
 	{
@@ -360,7 +360,8 @@ action_create (struct action_data *ap)
       fp = fopen (ap->input_name, "r");
       if (!fp)
 	{
-	  mu_error (_("Cannot open %s: %s"), ap->input_name, mu_strerror (errno));
+	  mu_error (_("cannot open file %s: %s"),
+		    ap->input_name, mu_strerror (errno));
 	  return 1;
 	}
     }
@@ -434,7 +435,8 @@ open_io (int action, struct action_data *ap, DBM_FILE *db, int *not_owner)
     *not_owner = rc;
   if (mu_dbm_open (ap->input_name, db, MU_STREAM_RDWR, permissions))
     {
-      mu_error (_("Cannot open %s: %s"), ap->input_name, mu_strerror (errno));
+      mu_error (_("cannot open file %s: %s"),
+		ap->input_name, mu_strerror (errno));
       return 1;
     }
   return 0;
@@ -474,7 +476,7 @@ action_add (struct action_data *ap)
   
   if (!ap->username)
     {
-      mu_error (_("Missing username to add"));
+      mu_error (_("missing username to add"));
       return 1;
     }
 
@@ -492,7 +494,7 @@ action_add (struct action_data *ap)
 
   rc = mu_dbm_insert (db, key, contents, 1);
   if (rc)
-    mu_error (_("Cannot store datum"));
+    mu_error (_("cannot store datum"));
 
   mu_dbm_close (db);
   return rc;
@@ -507,7 +509,7 @@ action_delete (struct action_data *ap)
   
   if (!ap->username)
     {
-      mu_error (_("Missing username to delete"));
+      mu_error (_("missing username to delete"));
       return 1;
     }
 
@@ -519,7 +521,7 @@ action_delete (struct action_data *ap)
 
   rc = mu_dbm_delete (db, key);
   if (rc)
-    mu_error (_("Cannot remove record for %s"), ap->username);
+    mu_error (_("cannot remove record for %s"), ap->username);
 
   mu_dbm_close (db);
   return rc;
@@ -539,7 +541,7 @@ action_chpass (struct action_data *ap)
 
   if (!ap->username)
     {
-      mu_error (_("Missing username"));
+      mu_error (_("missing username"));
       return 1;
     }
 
@@ -550,7 +552,7 @@ action_chpass (struct action_data *ap)
   MU_DATUM_SIZE (key) = strlen (ap->username);
   if (mu_dbm_fetch (db, key, &contents))
     {
-      mu_error (_("No such user: %s"), ap->username);
+      mu_error (_("no such user: %s"), ap->username);
       return 1;
     }
 
@@ -578,7 +580,7 @@ action_chpass (struct action_data *ap)
   MU_DATUM_SIZE (contents) = strlen (ap->passwd);
   rc = mu_dbm_insert (db, key, contents, 1);
   if (rc)
-    mu_error (_("Cannot replace datum"));
+    mu_error (_("cannot replace datum"));
 
   mu_dbm_close (db);
   return rc;
diff --git a/pop3d/quit.c b/pop3d/quit.c
index 4d8c5a8..1b1bfe1 100644
--- a/pop3d/quit.c
+++ b/pop3d/quit.c
@@ -42,10 +42,10 @@ pop3d_quit (char *arg)
       if (mu_mailbox_close (mbox) != 0) 
 	err = ERR_FILE;
       mu_mailbox_destroy (&mbox);
-      mu_diag_output (MU_DIAG_INFO, _("Session ended for user: %s"), username);
+      mu_diag_output (MU_DIAG_INFO, _("session ended for user: %s"), username);
     }
   else
-    mu_diag_output (MU_DIAG_INFO, _("Session ended for no user"));
+    mu_diag_output (MU_DIAG_INFO, _("session ended for no user"));
 
   state = UPDATE;
   update_login_delay (username);
diff --git a/pop3d/signal.c b/pop3d/signal.c
index de9ec43..56b1bb0 100644
--- a/pop3d/signal.c
+++ b/pop3d/signal.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008
-   Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2007, 2008,
+   2009 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
@@ -49,7 +49,7 @@ pop3d_child_signal (int signo)
 {
   int code;
   
-  mu_diag_output (MU_DIAG_CRIT, _("Got signal `%s'"), strsignal (signo));
+  mu_diag_output (MU_DIAG_CRIT, _("got signal `%s'"), strsignal (signo));
 
   switch (signo)
     {
diff --git a/pop3d/user.c b/pop3d/user.c
index ca0da51..39fb336 100644
--- a/pop3d/user.c
+++ b/pop3d/user.c
@@ -30,7 +30,7 @@ pop3d_begin_session ()
   if (check_login_delay (auth_data->name))
     {
       mu_diag_output (MU_DIAG_INFO,
-	      _("User `%s' tried to log in within the minimum allowed delay"),
+	      _("user `%s' tried to log in within the minimum allowed delay"),
 	      auth_data->name);
       state = AUTHORIZATION;
       mu_auth_data_destroy (&auth_data);
@@ -77,8 +77,8 @@ pop3d_begin_session ()
     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)",
+	    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));
   }
@@ -131,7 +131,7 @@ pop3d_user (char *arg)
 
       if (auth_data == NULL)
 	{
-	  mu_diag_output (MU_DIAG_INFO, _("User `%s': nonexistent"), arg);
+	  mu_diag_output (MU_DIAG_INFO, _("user `%s' nonexistent"), arg);
 	  return ERR_BAD_LOGIN;
 	}
 
@@ -140,14 +140,15 @@ pop3d_user (char *arg)
 
       if (rc)
 	{
-	  mu_diag_output (MU_DIAG_INFO, _("User `%s': authentication failed"), arg);
+	  mu_diag_output (MU_DIAG_INFO,
+			  _("user `%s': authentication failed"), arg);
 	  mu_auth_data_destroy (&auth_data);
 	  return ERR_BAD_LOGIN;
 	}
     }
   else if (mu_c_strcasecmp (cmd, "QUIT") == 0)
     {
-      mu_diag_output (MU_DIAG_INFO, _("Possible probe of account `%s'"), arg);
+      mu_diag_output (MU_DIAG_INFO, _("possible probe of account `%s'"), arg);
       return pop3d_quit (pass);
     }
   else
diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
index 2f619ab..7d2ad35 100644
--- a/readmsg/readmsg.c
+++ b/readmsg/readmsg.c
@@ -309,12 +309,12 @@ main (int argc, char **argv)
   if (status != 0)
     {
       if (mailbox_name)
-	fprintf (stderr, _("Could not create mailbox `%s': %s\n"),
-		 mailbox_name,
-		 mu_strerror(status));
+	mu_error (_("could not create mailbox `%s': %s"),
+		  mailbox_name,
+		  mu_strerror(status));
       else
-	fprintf (stderr, _("Could not create default mailbox: %s\n"),
-		 mu_strerror(status));
+	mu_error (_("could not create default mailbox: %s"),
+		  mu_strerror(status));
       exit (2);
     }
 
@@ -332,7 +332,7 @@ main (int argc, char **argv)
       mu_url_t url = NULL;
 
       mu_mailbox_get_url (mbox, &url);
-      mu_error (_("Could not open mailbox `%s': %s\n"),
+      mu_error (_("could not open mailbox `%s': %s"),
 		mu_url_to_string (url), mu_strerror (status));
       exit (2);
     }
@@ -344,7 +344,7 @@ main (int argc, char **argv)
 			 &weedc, &weedv);
   if (status)
     {
-      mu_error (_("Cannot parse weedlist: %s"), mu_strerror (status));
+      mu_error (_("cannot parse weedlist: %s"), mu_strerror (status));
       exit (2);
     }
 
diff --git a/sieve/sieve.c b/sieve/sieve.c
index 7af6275..4f848f1 100644
--- a/sieve/sieve.c
+++ b/sieve/sieve.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 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
@@ -275,7 +275,7 @@ cb_email (mu_debug_t debug, void *data, mu_config_value_t *val)
     return 1;
   int rc = mu_set_user_email (val->v.string);
   if (rc)
-    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Invalid email: %s"),
+    mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("invalid email: %s"),
 			 mu_strerror (rc));
   return rc;
 }
@@ -365,19 +365,19 @@ sieve_message (mu_sieve_machine_t mach)
   rc = mu_stdio_stream_create (&instr, stdin, MU_STREAM_SEEKABLE);
   if (rc)
     {
-      mu_error (_("Cannot create stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot create stream: %s"), mu_strerror (rc));
       return EX_SOFTWARE;
     }
   rc = mu_stream_open (instr);
   if (rc)
     {
-      mu_error (_("Cannot open stream: %s"), mu_strerror (rc));
+      mu_error (_("cannot open stream: %s"), mu_strerror (rc));
       return EX_SOFTWARE;
     }
   rc = mu_stream_to_message (instr, &msg);
   if (rc)
     {
-      mu_error (_("Cannot create message from stream: %s"),
+      mu_error (_("cannot create message from stream: %s"),
 		mu_strerror (rc));
       return EX_SOFTWARE;
     }
@@ -401,17 +401,17 @@ sieve_mailbox (mu_sieve_machine_t mach, mu_debug_t debug)
   if ((rc = mu_mailbox_create_default (&mbox, mbox_url)) != 0)
     {
       if (mbox)
-	mu_error (_("Could not create mailbox `%s': %s"),
+	mu_error (_("could not create mailbox `%s': %s"),
 		  mbox_url, mu_strerror (rc));
       else
-	mu_error (_("Could not create default mailbox: %s"),
+	mu_error (_("could not create default mailbox: %s"),
 		  mu_strerror (rc));
       goto cleanup;
     }
 
   if (debug && (rc = mu_mailbox_set_debug (mbox, debug)))
     {
-      mu_error (_("mu_mailbox_set_debug failed: %s"), mu_strerror (rc));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_set_debug", NULL, rc);
       goto cleanup;
     }
 
@@ -428,11 +428,11 @@ sieve_mailbox (mu_sieve_machine_t mach, mu_debug_t debug)
 	  mu_url_t url = NULL;
 
 	  mu_mailbox_get_url (mbox, &url);
-	  mu_error (_("Opening mailbox `%s' failed: %s"),
+	  mu_error (_("cannot open mailbox %s: %s"),
 		    mu_url_to_string (url), mu_strerror (rc));
 	}
       else
-	mu_error (_("Opening default mailbox failed: %s"),
+	mu_error (_("cannot open default mailbox: %s"),
 		  mu_strerror (rc));
       mu_mailbox_destroy (&mbox);
       goto cleanup;
@@ -453,10 +453,10 @@ sieve_mailbox (mu_sieve_machine_t mach, mu_debug_t debug)
       if ((e = mu_mailbox_expunge (mbox)) != 0)
 	{
 	  if (mbox)
-	    mu_error (_("Expunge on mailbox `%s' failed: %s"),
+	    mu_error (_("expunge on mailbox `%s' failed: %s"),
 		      mbox_url, mu_strerror (e));
 	  else
-	    mu_error (_("Expunge on default mailbox failed: %s"),
+	    mu_error (_("expunge on default mailbox failed: %s"),
 		      mu_strerror (e));
 	}
       
@@ -500,7 +500,7 @@ main (int argc, char *argv[])
   rc = mu_sieve_machine_init (&mach, NULL);
   if (rc)
     {
-      mu_error (_("Cannot initialize sieve machine: %s"), mu_strerror (rc));
+      mu_error (_("cannot initialize sieve machine: %s"), mu_strerror (rc));
       return EX_SOFTWARE;
     }
 
@@ -534,13 +534,12 @@ main (int argc, char *argv[])
     {
       if ((rc = mu_debug_create (&debug, mach)))
 	{
-	  mu_error (_("mu_debug_create failed: %s"), mu_strerror (rc));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_debug_create", NULL, rc);
 	  return EX_SOFTWARE;
 	}
       if ((rc = mu_debug_set_level (debug, debug_level)))
 	{
-	  mu_error (_("mu_debug_set_level failed: %s"),
-		    mu_strerror (rc));
+	  mu_diag_funcall (MU_DIAG_ERROR, "mu_debug_set_level", NULL, rc);
 	  return EX_SOFTWARE;
 	}
       mu_sieve_set_debug_object (mach, debug);


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Tue Aug 25 12:24:34 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mfyp0-0000yS-5g
	for mharc-commit-mailutils@gnu.org; Tue, 25 Aug 2009 12:24:34 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mfyoy-0000xr-Ej
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 12:24:32 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mfyot-0000w2-L4
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 12:24:31 -0400
Received: from [199.232.76.173] (port=47729 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mfyot-0000vv-6p
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 12:24:27 -0400
Received: from savannah.gnu.org ([199.232.41.3]:49433 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mfyor-0004S6-Eh
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 12:24:26 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mfyoq-0003hU-Ir
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 16:24:24 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mfyop-0003gx-CG
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 16:24:24 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8619a1cb3b5a4b84b365571b711cf792e12ab620
X-Git-Newrev: 2141acfb58732dab8cdb6ffff18550c0ebf016b5
Message-Id: <E1Mfyop-0003gx-CG@cvs.savannah.gnu.org>
Date: Tue, 25 Aug 2009 16:24:23 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-330-g2141acf
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Aug 2009 16:24:32 -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=2141acfb58732dab8cdb6ffff18550c0ebf016b5

The branch, master has been updated
       via  2141acfb58732dab8cdb6ffff18550c0ebf016b5 (commit)
      from  8619a1cb3b5a4b84b365571b711cf792e12ab620 (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 2141acfb58732dab8cdb6ffff18550c0ebf016b5
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 25 19:23:12 2009 +0300

    Fix help messages.
    
    Option descriptions in `--help' output do not constitute
    conceptual sentences. Therefore, they should not begin
    with a capital letter, nor end with a final point.
    
    Affected files:
    
    comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c,
    frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c,
    libmu_argp/auth.c, libmu_argp/common.c, libmu_argp/gsasl.c,
    libmu_argp/pam.c, libmu_argp/radius.c, libmu_argp/sieve.c,
    libmu_argp/sql.c, libmu_argp/tls.c, libmu_argp/virtdomain.c,
    libmu_auth/sql.c, libmu_cfg/sql.c, maidag/maidag.c,
    maidag/mailquota.c, maidag/mailtmp.c, mail/mail.c,
    messages/messages.c, mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c,
    mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c,
    mh/mark.c, mh/mh_init.c, mh/mhl.c, mh/mhn.c, mh/mhparam.c,
    mh/mhpath.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c,
    mh/scan.c, mh/send.c, mh/sortm.c, mh/whatnow.c, mh/whom.c,
    mimeview/mimeview.c, movemail/movemail.c, pop3d/pop3d.c,
    pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c

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

Summary of changes:
 comsat/comsat.c           |   12 +++++-----
 config/mailutils-config.c |   16 ++++++-------
 dotlock/dotlock.c         |    8 +++---
 frm/frm.c                 |   52 ++++++++++++++++++--------------------------
 frm/from.c                |   10 ++++----
 guimb/main.c              |   18 +++++++-------
 imap4d/imap4d.c           |   20 ++++++++--------
 libmu_argp/auth.c         |   12 +++++-----
 libmu_argp/common.c       |   46 +++++++++++++++++++-------------------
 libmu_argp/gsasl.c        |    4 +-
 libmu_argp/pam.c          |    4 +-
 libmu_argp/radius.c       |   10 ++++----
 libmu_argp/sieve.c        |   10 ++++----
 libmu_argp/sql.c          |   14 ++++++------
 libmu_argp/tls.c          |   10 ++++----
 libmu_argp/virtdomain.c   |    4 +-
 libmu_auth/sql.c          |    6 ++--
 libmu_cfg/sql.c           |    2 +-
 maidag/maidag.c           |   24 ++++++++++----------
 maidag/mailquota.c        |    2 +-
 maidag/mailtmp.c          |    2 +-
 mail/mail.c               |   26 +++++++++++-----------
 messages/messages.c       |    4 +-
 mh/ali.c                  |   14 ++++++------
 mh/anno.c                 |   14 ++++++------
 mh/burst.c                |   16 +++++++-------
 mh/comp.c                 |   28 ++++++++++++------------
 mh/fmtcheck.c             |   12 +++++-----
 mh/folder.c               |   30 +++++++++++++-------------
 mh/forw.c                 |   38 ++++++++++++++++----------------
 mh/inc.c                  |   22 +++++++++---------
 mh/install-mh.c           |    6 ++--
 mh/mark.c                 |   16 +++++++-------
 mh/mh_init.c              |   12 ++++++++-
 mh/mhl.c                  |   18 +++++++-------
 mh/mhn.c                  |   34 ++++++++++++++--------------
 mh/mhparam.c              |    6 ++--
 mh/mhpath.c               |    6 ++--
 mh/pick.c                 |   44 +++++++++++++++++++-------------------
 mh/refile.c               |   23 ++++++++++---------
 mh/repl.c                 |   44 +++++++++++++++++++-------------------
 mh/rmf.c                  |   10 ++++----
 mh/rmm.c                  |    6 ++--
 mh/scan.c                 |   18 +++++++-------
 mh/send.c                 |   40 +++++++++++++++++-----------------
 mh/sortm.c                |   34 ++++++++++++++--------------
 mh/whatnow.c              |   16 +++++++-------
 mh/whom.c                 |   16 +++++++-------
 mimeview/mimeview.c       |   12 +++++-----
 movemail/movemail.c       |   24 +++++++++++---------
 pop3d/pop3d.c             |   27 +++++++++++------------
 pop3d/popauth.c           |   24 ++++++++++----------
 readmsg/readmsg.c         |   14 ++++++------
 sieve/sieve.c             |   22 +++++++++---------
 54 files changed, 480 insertions(+), 482 deletions(-)

diff --git a/comsat/comsat.c b/comsat/comsat.c
index 1353eb1..725685f 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -62,12 +62,12 @@ static struct argp_option options[] =
 {
   { "config", 'c', N_("FILE"), OPTION_HIDDEN, "", 0 },
   { "convert-config", 'C', N_("FILE"), 0,
-    N_("Convert the configuration FILE to new format."), 0 },
-  { "test", 't', NULL, 0, N_("Run in test mode"), 0 },
-  { "foreground", OPT_FOREGROUND, 0, 0, N_("Remain in foreground."), 0},
-  { "inetd",  'i', 0, 0, N_("Run in inetd mode"), 0 },
+    N_("convert the configuration FILE to new format"), 0 },
+  { "test", 't', NULL, 0, N_("run in test mode"), 0 },
+  { "foreground", OPT_FOREGROUND, 0, 0, N_("remain in foreground"), 0},
+  { "inetd",  'i', 0, 0, N_("run in inetd mode"), 0 },
   { "daemon", 'd', N_("NUMBER"), OPTION_ARG_OPTIONAL,
-    N_("Runs in daemon mode with a maximum of NUMBER children"), 0 },
+    N_("runs in daemon mode with a maximum of NUMBER children"), 0 },
   { NULL, 0, NULL, 0, NULL, 0 }
 };
 
@@ -120,7 +120,7 @@ int test_mode;
 
 struct mu_cfg_param comsat_cfg_param[] = {
   { "allow-biffrc", mu_cfg_bool, &allow_biffrc, 0, NULL,
-    N_("Read .biffrc file from the user home directory") },
+    N_("Read .biffrc file from the user home directory.") },
   { "require-tty", mu_cfg_bool, &require_tty, 0, NULL,
     N_("Notify only if the user is logged on one of the ttys.") },
   { "max-lines", mu_cfg_int, &maxlines, 0, NULL,
diff --git a/config/mailutils-config.c b/config/mailutils-config.c
index e4037d4..c5007a9 100644
--- a/config/mailutils-config.c
+++ b/config/mailutils-config.c
@@ -26,23 +26,21 @@
 #include "mailutils/libargp.h"
 
 const char *program_version = "mailutils-config (" PACKAGE_STRING ")";
-static char doc[] = N_("GNU mailutils-config -- Display compiler and loader options needed for building a program with mailutils");
+static char doc[] = N_("GNU mailutils-config -- display compiler and loader options needed for building a program with mailutils");
 static char args_doc[] = N_("[arg...]");
 
 static struct argp_option options[] = {
   {"compile", 'c', NULL,   0,
-   N_("Print C compiler flags to compile with"), 0},
+   N_("print C compiler flags to compile with"), 0},
   {"link",    'l', NULL,   0,
-   N_("Print libraries to link with. Possible arguments are: auth, guile, "
+   N_("print libraries to link with; possible arguments are: auth, guile, "
       "mbox, mh, maildir, mailer, imap, pop, sieve and all"), 0},
   {"info", 'i', NULL, 0,
-   N_("Print a list of configuration options used to build mailutils. If arguments "
-   "are given, they are interpreted as a list of configuration options to check "
-   "for. In this case the program prints those options from this list that "
-   "have been defined. It exits with zero status if all of the "
-   "specified options are defined. Otherwise, the exit status is 1."), 0},
+   N_("print a list of configuration options used to build mailutils; "
+      "oprional arguments are interpreted as a list of configuration "
+      "options to check for"), 0},
   {"verbose", 'v', NULL, 0,
-   N_("Increase output verbosity"), 0},
+   N_("increase output verbosity"), 0},
   {0, 0, 0, 0}
 };
 
diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c
index 8d9098b..dd98b68 100644
--- a/dotlock/dotlock.c
+++ b/dotlock/dotlock.c
@@ -44,16 +44,16 @@ static char args_doc[] = N_("FILE");
 
 static struct argp_option options[] = {
   {"unlock", 'u', NULL, 0,
-   N_("Unlock"), 0},
+   N_("unlock"), 0},
 
   {"force", 'f', N_("MINUTES"), OPTION_ARG_OPTIONAL,
-   N_("Forcibly break an existing lock older than a certain time"), 0},
+   N_("forcibly break an existing lock older than a certain time"), 0},
 
   {"retry", 'r', N_("RETRIES"), OPTION_ARG_OPTIONAL,
-   N_("Retry the lock a few times"), 0},
+   N_("retry the lock a few times"), 0},
 
   {"debug", 'd', NULL, 0,
-   N_("Print details of failure reasons to stderr"), 0},
+   N_("print details of failure reasons to stderr"), 0},
 
   {NULL, 0, NULL, 0, NULL, 0}
 };
diff --git a/frm/frm.c b/frm/frm.c
index 7856983..30483e8 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003,
-   2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+   2004, 2005, 2007, 2008, 2009 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
@@ -39,29 +39,19 @@ static struct attr_tab {
   int code;        /* Corresponding IS_.* flag */
   size_t len;      /* Minimum abbreviation length */
 } attr_tab[] = {
-  /* TRANSLATORS: See comment marked [frm status] below */
-  { N_("new"), IS_NEW, 0 },
-  /* TRANSLATORS: See comment marked [frm status] below */
-  { N_("old"), IS_OLD, 0 },
-  /* TRANSLATORS: See comment marked [frm status] below */
-  { N_("unread"), IS_OLD, 0 },
-  /* TRANSLATORS: See comment marked [frm status] below */
-  { N_("read"), IS_READ, 0 },
+  { "new", IS_NEW, 0 },
+  { "old", IS_OLD, 0 },
+  { "unread", IS_OLD, 0 },
+  { "read", IS_READ, 0 },
   { NULL }
 };
 
 static char attr_help[] =
-/* TRANSLATORS: [frm status]
-   
-   1) Please make sure the words "new", "unread", "old" and
-   "read" are translated exactly as in four preceeding messages.
-   
-   2) If possible, select such translations for these words, that
-   differ by the first letter.
-*/
-N_("Select messages with the specific attribute. STATUS is one \
-of the following: new, unread, old (same as unread) or read. Any unambiguous \
-abbreviation of those is also accepted.");
+/* TRANSLATORS: Please do *not* translate the words "new", "unread",
+   "old" and "read". They are keywords. */
+N_("select messages with the specific attribute: \
+new, unread, old (same as unread) or read (or any unambiguous \
+abbreviation of these)");
 
 
 /* Attribute table handling */
@@ -74,7 +64,7 @@ prepare_attrs (void)
 
   for (p = attr_tab; p->name; p++)
     {
-      const char *name = gettext (p->name);
+      const char *name = p->name;
       size_t len = strlen (name);
       size_t n = 1;
 
@@ -82,7 +72,7 @@ prepare_attrs (void)
 	{
 	  if (p != q)
 	    {
-	      const char *str = gettext (q->name);
+	      const char *str = q->name;
 	      size_t slen = strlen (str);
 
 	      if (memcmp (name, str, n) == 0)
@@ -112,7 +102,7 @@ decode_attr (char *arg)
   
   for (p = attr_tab; p->name; p++)
     {
-      const char *str = gettext (p->name);
+      const char *str = p->name;
       if (str[0] == arg[0])
 	{
 	  if (len < p->len)
@@ -133,15 +123,15 @@ decode_attr (char *arg)
 
 
 static struct argp_option options[] = {
-  {"debug",  'd', NULL,   0, N_("Enable debugging output"), 0},
-  {"field",  'f', N_("NAME"), 0, N_("Header field to display"), 0},
-  {"to",     'l', NULL,   0, N_("Include the To: information"), 0},
-  {"number", 'n', NULL,   0, N_("Display message numbers"), 0},
-  {"Quiet",  'Q', NULL,   0, N_("Very quiet"), 0},
-  {"query",  'q', NULL,   0, N_("Print a message if the mailbox contains some unread mail"), 0},
-  {"summary",'S', NULL,   0, N_("Print a summary of messages"), 0},
+  {"debug",  'd', NULL,   0, N_("enable debugging output"), 0},
+  {"field",  'f', N_("NAME"), 0, N_("header field to display"), 0},
+  {"to",     'l', NULL,   0, N_("include the To: information"), 0},
+  {"number", 'n', NULL,   0, N_("display message numbers"), 0},
+  {"Quiet",  'Q', NULL,   0, N_("very quiet"), 0},
+  {"query",  'q', NULL,   0, N_("print a message if the mailbox contains some unread mail"), 0},
+  {"summary",'S', NULL,   0, N_("print a summary of messages"), 0},
   {"status", 's', N_("STATUS"), 0, attr_help, 0},
-  {"align",  't', NULL,   0, N_("Tidy mode: align subject lines"), 0},
+  {"align",  't', NULL,   0, N_("tidy mode: align subject lines"), 0},
   {0, 0, 0, 0}
 };
 
diff --git a/frm/from.c b/frm/from.c
index aac7bd6..20c8294 100644
--- a/frm/from.c
+++ b/frm/from.c
@@ -26,12 +26,12 @@ const char *program_version = "from (" PACKAGE_STRING ")";
 static char doc[] = N_("GNU from -- display from and subject");
 
 static struct argp_option options[] = {
-  {"count",  'c', NULL,   0, N_("Just print a count of messages and exit")},
+  {"count",  'c', NULL,   0, N_("just print a count of messages and exit")},
   {"sender", 's', N_("ADDRESS"), 0,
-   N_("Print only mail from addresses containing the supplied string") },
+   N_("print only mail from addresses containing the supplied string") },
   {"file",   'f', N_("FILE"), 0,
-   N_("Read mail from FILE") },
-  {"debug",  'd', NULL,   0, N_("Enable debugging output"), 0},
+   N_("read mail from FILE") },
+  {"debug",  'd', NULL,   0, N_("enable debugging output"), 0},
   {0, 0, 0, 0}
 };
 
@@ -132,7 +132,7 @@ main (int argc, char **argv)
     {
       if (mailbox_name)
 	{
-	  mu_error (_("Both --from option and user name are specified"));
+	  mu_error (_("both --from option and user name are specified"));
 	  exit (1);
 	}
 
diff --git a/guimb/main.c b/guimb/main.c
index 24aa041..23d472f 100644
--- a/guimb/main.c
+++ b/guimb/main.c
@@ -57,21 +57,21 @@ static struct argp_option options[] = {
    */
    N_("The following switches stop argument processing, and pass all\n"
    "remaining arguments as the value of (command-line):"), 1},
-  {"code", 'c', N_("EXPR"), 0, N_("Execute given scheme expression."), 1},
+  {"code", 'c', N_("EXPR"), 0, N_("execute given scheme expression"), 1},
   {"source", 's', N_("PROGFILE"), 0,
-   N_("Load Scheme source code from PROGFILE, and exit"), 1},
+   N_("load Scheme source code from PROGFILE and exit"), 1},
   {NULL, 0, NULL, 0,
    N_("The following options do not change the order of options parsing:"), 2},
-  {"expression", 'e', N_("EXPR"), 0, N_("Execute given scheme expression."), 2},
+  {"expression", 'e', N_("EXPR"), 0, N_("execute given scheme expression"), 2},
   {"file", 'f', N_("PROGFILE"), 0,
-   N_("Load Scheme source code from PROGFILE, and exit"), 2},
+   N_("load Scheme source code from PROGFILE and exit"), 2},
   {NULL, 0, NULL, 0, N_("Other options:"), 3},
-  {"debug", 'd', NULL, 0, N_("Start with debugging evaluator and backtraces."), 3},
+  {"debug", 'd', NULL, 0, N_("start with debugging evaluator and backtraces"), 3},
   {"guile-arg", 'g', N_("ARG"), 0,
-   N_("Append ARG to the command line passed to Guile"), 3},
-  {"mailbox", 'M', N_("NAME"), 0, N_("Set default mailbox name"), 3},
+   N_("append ARG to the command line passed to Guile"), 3},
+  {"mailbox", 'M', N_("NAME"), 0, N_("set default mailbox name"), 3},
   {"user", 'u', N_("NAME"), OPTION_ARG_OPTIONAL,
-   N_("Act as local MDA for user NAME"), 3},
+   N_("act as local MDA for user NAME"), 3},
   {0, 0, 0, 0}
 };
 
@@ -124,7 +124,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
 
 const char *program_version = "guimb (" PACKAGE_STRING ")";
 static char doc[] =
-N_("GNU guimb -- Process the contents of the specified mailboxes "
+N_("GNU guimb -- process contents of the specified mailboxes "
 "using a Scheme program or expression.");
 static char args_doc[] = N_("[mailbox...]");
 
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 1f8cb64..55917fa 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -64,25 +64,25 @@ static char doc[] = N_("GNU imap4d -- the IMAP4D daemon");
 #define OPT_FOREGROUND      260
 
 static struct argp_option options[] = {
-  { "foreground", OPT_FOREGROUND, 0, 0, N_("Remain in foreground."), 0},
-  { "inetd",  'i', 0, 0, N_("Run in inetd mode"), 0},
+  { "foreground", OPT_FOREGROUND, 0, 0, N_("remain in foreground"), 0},
+  { "inetd",  'i', 0, 0, N_("run in inetd mode"), 0},
   { "daemon", 'd', N_("NUMBER"), OPTION_ARG_OPTIONAL,
-    N_("Runs in daemon mode with a maximum of NUMBER children"), 0 },
+    N_("runs in daemon mode with a maximum of NUMBER children"), 0 },
 
   {"other-namespace", 'O', N_("PATHLIST"), OPTION_HIDDEN,
-   N_("Set the `other' namespace"), 0},
+   N_("set the `other' namespace"), 0},
   {"shared-namespace", 'S', N_("PATHLIST"), OPTION_HIDDEN,
-   N_("Set the `shared' namespace"), 0},
+   N_("set the `shared' namespace"), 0},
   {"login-disabled", OPT_LOGIN_DISABLED, NULL, OPTION_HIDDEN,
-   N_("Disable LOGIN command")},
+   N_("disable LOGIN command")},
   {"create-home-dir", OPT_CREATE_HOME_DIR, N_("MODE"),
    OPTION_ARG_OPTIONAL|OPTION_HIDDEN,
-   N_("Create home directory, if it does not exist")},
+   N_("create home directory, if it does not exist")},
   {"preauth", OPT_PREAUTH, NULL, 0,
-   N_("Start in preauth mode") },
+   N_("start in preauth mode") },
 #ifdef WITH_TLS
   {"tls-required", OPT_TLS_REQUIRED, NULL, OPTION_HIDDEN,
-   N_("Always require STARTTLS before entering authentication phase")},
+   N_("always require STARTTLS before entering authentication phase")},
 #endif
   {NULL, 0, NULL, 0, NULL, 0}
 };
@@ -299,7 +299,7 @@ cb_mailbox_mode (mu_debug_t debug, void *data, mu_config_value_t *val)
 
 static struct mu_cfg_param imap4d_cfg_param[] = {
   { "homedir", mu_cfg_string, &modify_homedir, 0, NULL,
-    N_("Modify home directory") },
+    N_("Modify home directory.") },
   { "personal-namespace", MU_CFG_LIST_OF(mu_cfg_string), &namespace[NS_PRIVATE],
     0, NULL, 
     N_("Set personal namespace.") },
diff --git a/libmu_argp/auth.c b/libmu_argp/auth.c
index 32be741..fabacf7 100644
--- a/libmu_argp/auth.c
+++ b/libmu_argp/auth.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -41,15 +41,15 @@ static error_t mu_auth_argp_parser (int key, char *arg,
 /* Options used by programs that use extended authentication mechanisms. */
 static struct argp_option mu_auth_argp_option[] = {
   { "authentication", OPT_AUTHENTICATION, N_("MODLIST"), OPTION_HIDDEN,
-    N_("Set the list of modules to be used for authentication"), 0 },
+    N_("set the list of modules to be used for authentication"), 0 },
   { "authorization", OPT_AUTHORIZATION, N_("MODLIST"), OPTION_HIDDEN,
-    N_("Set list of modules to be used for authorization"), 0 },
+    N_("set list of modules to be used for authorization"), 0 },
   { "clear-authorization", OPT_CLEAR_AUTHORIZATION, NULL, OPTION_HIDDEN,
-    N_("Clear the list of authorization modules"), 0 },
+    N_("clear the list of authorization modules"), 0 },
   { "clear-authentication", OPT_CLEAR_AUTHENTICATION, NULL, OPTION_HIDDEN,
-    N_("Clear the list of authentication modules"), 0 },
+    N_("clear the list of authentication modules"), 0 },
   { "debug-auth", OPT_DEBUG_AUTH, NULL, 0,
-    N_("Debug authentication functions") },
+    N_("debug authentication functions") },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
diff --git a/libmu_argp/common.c b/libmu_argp/common.c
index d2972d9..a9d9e7d 100644
--- a/libmu_argp/common.c
+++ b/libmu_argp/common.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -55,23 +55,23 @@ static struct argp_option mu_common_argp_options[] =
 {
   { NULL, 0, NULL, 0, N_("Common options"), 0},
   { "show-config-options", OPT_SHOW_OPTIONS, NULL, 0,
-    N_("Show compilation options"), 0 },
+    N_("show compilation options"), 0 },
   { "config-help", OPT_HELP_CONFIG, NULL, 0,
-    N_("Show configuration file summary"), 0 },
+    N_("show configuration file summary"), 0 },
   { "no-user-config", OPT_NO_USER_RCFILE, NULL, 0,
-    N_("Do not load user configuration file"), 0 },
+    N_("do not load user configuration file"), 0 },
   { "no-user-rcfile", 0, NULL, OPTION_ALIAS, NULL },
   { "no-site-config", OPT_NO_SITE_RCFILE, NULL, 0,
-    N_("Do not load site configuration file"), 0 },
+    N_("do not load site configuration file"), 0 },
   { "no-site-rcfile", 0, NULL, OPTION_ALIAS, NULL },
   { "config-file", OPT_RCFILE, N_("FILE"), 0,
-    N_("Load this configuration file"), 0, },
+    N_("load this configuration file"), 0, },
   { "rcfile", 0, NULL, OPTION_ALIAS, NULL },
   { "config-verbose", OPT_RCFILE_VERBOSE, NULL, 0,
-    N_("Verbosely log parsing of the configuration files"), 0 },
+    N_("verbosely log parsing of the configuration files"), 0 },
   { "rcfile-verbose", 0, NULL, OPTION_ALIAS, NULL },
   { "config-lint", OPT_RCFILE_LINT, NULL, 0,
-    N_("Check configuration file syntax and exit"), 0 },
+    N_("check configuration file syntax and exit"), 0 },
   { "rcfile-lint", 0, NULL, OPTION_ALIAS, NULL },
   { NULL, 0, NULL, 0, NULL, 0 }
 };
@@ -139,7 +139,7 @@ struct mu_cmdline_capa mu_common_cmdline = {
 
 static struct argp_option mu_logging_argp_option[] = {
   {"log-facility", OPT_LOG_FACILITY, N_("FACILITY"), 0,
-   N_("Output logs to syslog FACILITY"), 0},
+   N_("output logs to syslog FACILITY"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -192,7 +192,7 @@ struct mu_cmdline_capa mu_logging_cmdline = {
 
 /* Option to print the license. */
 static struct argp_option mu_license_argp_option[] = {
-  { "license", OPT_LICENSE, NULL, 0, N_("Print license and exit"), -2 },
+  { "license", OPT_LICENSE, NULL, 0, N_("print license and exit"), -2 },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -236,13 +236,13 @@ struct mu_cmdline_capa mu_license_cmdline = {
 /* Options used by programs that access mailboxes. */
 static struct argp_option mu_mailbox_argp_option[] = {
   { "mail-spool", 'm', N_("URL"), OPTION_HIDDEN,
-    N_("Use specified URL as a mailspool directory"), 0 },
+    N_("use specified URL as a mailspool directory"), 0 },
   { "mailbox-pattern", OPT_MAILBOX_PATTERN, N_("pat"), OPTION_HIDDEN,
     "", 0 },
   { "mailbox-type", OPT_MAILBOX_TYPE, N_("PROTO"), OPTION_HIDDEN,
-    N_("Default mailbox type to use"), 0 },
+    N_("default mailbox type to use"), 0 },
   { "mail-folder", OPT_MAIL_FOLDER, N_("DIR"), OPTION_HIDDEN,
-    N_("Default user mail folder"), 0 },
+    N_("default user mail folder"), 0 },
   { NULL }
 };
 
@@ -308,16 +308,16 @@ struct mu_cmdline_capa mu_mailbox_cmdline = {
 /* Options used by programs that access mailboxes. */
 static struct argp_option mu_locking_argp_option[] = {
   {"lock-flags", OPT_LOCK_FLAGS, N_("FLAGS"), OPTION_HIDDEN,
-   N_("Default locker flags (E=external, R=retry, T=time, P=pid)"), 0},
+   N_("default locker flags (E=external, R=retry, T=time, P=pid)"), 0},
   {"lock-retry-timeout", OPT_LOCK_RETRY_TIMEOUT, N_("SECONDS"), OPTION_HIDDEN,
-   N_("Set timeout for acquiring the lockfile") },
+   N_("set timeout for acquiring the lockfile") },
   {"lock-retry-count", OPT_LOCK_RETRY_COUNT, N_("NUMBER"), OPTION_HIDDEN,
-   N_("Set the maximum number of times to retry acquiring the lockfile") },
+   N_("set the maximum number of times to retry acquiring the lockfile") },
   {"lock-expire-timeout", OPT_LOCK_EXPIRE_TIMEOUT, N_("SECONDS"),
    OPTION_HIDDEN,
-   N_("Number of seconds after which the lock expires"), },
+   N_("number of seconds after which the lock expires"), },
   {"external-locker", OPT_LOCK_EXTERNAL_PROGRAM, N_("PATH"), OPTION_HIDDEN,
-   N_("Set full path to the external locker program") },
+   N_("set full path to the external locker program") },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -386,9 +386,9 @@ struct mu_cmdline_capa mu_locking_cmdline = {
 /* Options used by programs that do address mapping. */
 static struct argp_option mu_address_argp_option[] = {
   {"email-addr", 'E', N_("EMAIL"), OPTION_HIDDEN,
-   N_("Set current user's email address (default is loginname@defaultdomain)"), 0},
+   N_("set current user's email address (default is loginname@defaultdomain)"), 0},
   {"email-domain", 'D', N_("DOMAIN"), OPTION_HIDDEN,
-   N_("Set domain for unqualified user names (default is this host)"), 0},
+   N_("set domain for unqualified user names (default is this host)"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -445,7 +445,7 @@ struct mu_cmdline_capa mu_address_cmdline = {
 /* Options used by programs that send mail. */
 static struct argp_option mu_mailer_argp_option[] = {
   {"mailer", 'M', N_("MAILER"), 0,
-   N_("Use specified URL as the default mailer"), 0},
+   N_("use specified URL as the default mailer"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -495,9 +495,9 @@ struct mu_cmdline_capa mu_mailer_cmdline = {
 static struct argp_option mu_debug_argp_options[] = 
 {
   { "debug-level", OPT_DEBUG_LEVEL, N_("LEVEL"), 0,
-    N_("Set Mailutils debugging level"), 0 },
+    N_("set Mailutils debugging level"), 0 },
   { "debug-line-info", OPT_LINE_INFO, NULL, 0,
-    N_("Show source info with debugging messages"), 0 },
+    N_("show source info with debugging messages"), 0 },
   { NULL }
 };
 
diff --git a/libmu_argp/gsasl.c b/libmu_argp/gsasl.c
index 598b6ce..e7d6996 100644
--- a/libmu_argp/gsasl.c
+++ b/libmu_argp/gsasl.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -26,7 +26,7 @@
 
 static struct argp_option _gsasl_argp_options[] = {
   {"cram-passwd", OPT_CRAM_PASSWD, N_("FILE"), OPTION_HIDDEN,
-   N_("Specify password file for CRAM-MD5 authentication"), 0},
+   N_("specify password file for CRAM-MD5 authentication"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
diff --git a/libmu_argp/pam.c b/libmu_argp/pam.c
index 711aa31..d53a37d 100644
--- a/libmu_argp/pam.c
+++ b/libmu_argp/pam.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -52,7 +52,7 @@ mu_pam_argp_parser (int key, char *arg, struct argp_state *state)
 
 static struct argp_option mu_pam_argp_option[] = {
   { "pam-service", OPT_PAM_SERVICE, N_("STRING"), OPTION_HIDDEN,
-    N_("Use STRING as PAM service name"), 0},
+    N_("use STRING as PAM service name"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
diff --git a/libmu_argp/radius.c b/libmu_argp/radius.c
index f1e878b..e4c6c1d 100644
--- a/libmu_argp/radius.c
+++ b/libmu_argp/radius.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -32,13 +32,13 @@ enum {
 
 static struct argp_option mu_radius_argp_option[] = {
   { "radius-auth-request", OPT_AUTH_REQUEST, N_("REQUEST"), OPTION_HIDDEN,
-    N_("Radius request to authenitcate the user"), 0 },
+    N_("radius request to authenitcate the user"), 0 },
   { "radius-getpwnam-request", OPT_GETPWNAM_REQUEST, N_("REQUEST"), OPTION_HIDDEN,
-    N_("Radius request to retrieve a passwd entry based on username"), 0 },
+    N_("radius request to retrieve a passwd entry based on username"), 0 },
   { "radius-getpwuid-request", OPT_GETPWUID_REQUEST, N_("REQUEST"), OPTION_HIDDEN,
-    N_("Radius request to retrieve a passwd entry based on UID"), 0 },
+    N_("radius request to retrieve a passwd entry based on UID"), 0 },
   { "radius-directory", OPT_RADIUS_DIR, N_("DIR"), OPTION_HIDDEN,
-    N_("Set name of the radius configuration directory"), 0 },
+    N_("set name of the radius configuration directory"), 0 },
   { NULL }
 };
 
diff --git a/libmu_argp/sieve.c b/libmu_argp/sieve.c
index 50cc941..17841e0 100644
--- a/libmu_argp/sieve.c
+++ b/libmu_argp/sieve.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2007 Free Software Foundation, Inc.
+   2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -30,13 +30,13 @@ enum {
 
 static struct argp_option sieve_argp_option[] = {
   { "includedir", 'I', N_("DIR"), 0,
-    N_("Append directory DIR to the list of directories searched for include files"), 0 },
+    N_("append DIR to the list of directories searched for include files"), 0 },
   { "libdir", 'L', N_("DIR"), 0,
-    N_("Append directory DIR to the list of directories searched for library files"), 0 },
+    N_("append DIR to the list of directories searched for library files"), 0 },
   { "clear-include-path", OPT_CLEAR_INCLUDE_PATH, NULL, 0,
-    N_("Clear Sieve include path"), 0 },
+    N_("clear Sieve include path"), 0 },
   { "clear-library-path", OPT_CLEAR_LIBRARY_PATH, NULL, 0,
-    N_("Clear Sieve library path"), 0 },
+    N_("clear Sieve library path"), 0 },
   { "clearpath", 0, NULL, OPTION_ALIAS, NULL },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
diff --git a/libmu_argp/sql.c b/libmu_argp/sql.c
index a09d0ab..d009653 100644
--- a/libmu_argp/sql.c
+++ b/libmu_argp/sql.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -38,7 +38,7 @@ enum {
 
 static struct argp_option mu_sql_argp_option[] = {
   {"sql-interface", OPT_SQL_INTERFACE, N_("NAME"), OPTION_HIDDEN,
-   N_("Type of SQL interface to use"), },
+   N_("type of SQL interface to use"), },
   {"sql-getpwnam", OPT_SQL_GETPWNAM, N_("QUERY"), OPTION_HIDDEN,
    N_("SQL query to retrieve a passwd entry based on username"), 0},
   {"sql-getpwuid", OPT_SQL_GETPWUID, N_("QUERY"), OPTION_HIDDEN,
@@ -46,19 +46,19 @@ static struct argp_option mu_sql_argp_option[] = {
   {"sql-getpass", OPT_SQL_GETPASS, N_("QUERY"), OPTION_HIDDEN,
    N_("SQL query to retrieve a password from the database"), 0},
   {"sql-host", OPT_SQL_HOST, N_("HOSTNAME"), OPTION_HIDDEN,
-   N_("Name or IP of MySQL server to connect to"), 0},
+   N_("name or IP of MySQL server to connect to"), 0},
   {"sql-user", OPT_SQL_USER, N_("NAME"), OPTION_HIDDEN,
    N_("SQL user name"), 0},
   {"sql-passwd", OPT_SQL_PASSWD, N_("STRING"), OPTION_HIDDEN,
    N_("SQL connection password"), 0},
   {"sql-db", OPT_SQL_DB, N_("STRING"), OPTION_HIDDEN,
-   N_("Name of the database to connect to"), 0},
+   N_("name of the database to connect to"), 0},
   {"sql-port", OPT_SQL_PORT, N_("NUMBER"), OPTION_HIDDEN,
-   N_("Port to use"), 0},
+   N_("port to use"), 0},
   {"sql-password-type", OPT_SQL_MU_PASSWORD_TYPE, N_("STRING"), OPTION_HIDDEN,
-   N_("Type of password returned by --sql-getpass query. STRING is one of: plain, hash, scrambled"), 0},
+   N_("type of password returned by --sql-getpass query. STRING is one of: plain, hash, scrambled"), 0},
   {"sql-field-map", OPT_SQL_FIELD_MAP, N_("MAP"), OPTION_HIDDEN,
-   N_("Declare a name translation map for SQL fields in results of sql-getpwnam and "
+   N_("declare a name translation map for SQL fields in results of sql-getpwnam and "
       "sql-getpwuid queries"), 0},
   { NULL,      0, NULL, 0, NULL, 0 }
 };
diff --git a/libmu_argp/tls.c b/libmu_argp/tls.c
index 8fa7bba..44d5e2b 100644
--- a/libmu_argp/tls.c
+++ b/libmu_argp/tls.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -31,13 +31,13 @@ enum {
   
 static struct argp_option _tls_argp_options[] = {
   {"ssl-cert", OPT_SSL_CERT, N_("FILE"), OPTION_HIDDEN,
-   N_("Specify SSL certificate file"), 0},
+   N_("specify SSL certificate file"), 0},
   {"ssl-key", OPT_SSL_KEY, N_("FILE"), OPTION_HIDDEN,
-   N_("Specify SSL certificate key"), },
+   N_("specify SSL certificate key"), },
   {"ssl-cafile", OPT_SSL_CAFILE, N_("FILE"), OPTION_HIDDEN,
-   N_("Specify trusted CAs file"), 0},
+   N_("specify trusted CAs file"), 0},
   {"tls", OPT_TLS, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Enable TLS support") },
+   N_("enable TLS support") },
   {NULL, 0, NULL, 0, NULL, 0}
 };
 
diff --git a/libmu_argp/virtdomain.c b/libmu_argp/virtdomain.c
index cfa0a75..bd39247 100644
--- a/libmu_argp/virtdomain.c
+++ b/libmu_argp/virtdomain.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -51,7 +51,7 @@ mu_virt_argp_parser (int key, char *arg, struct argp_state *state)
 
 static struct argp_option mu_virt_argp_option[] = {
   { "virtual-passwd-dir", OPT_PWDDIR, N_("DIR"), OPTION_HIDDEN,
-    N_("Search for virtual passwd file in DIR"), 0},
+    N_("search for virtual passwd file in DIR"), 0},
     { NULL,      0, NULL, 0, NULL, 0 }
 };
 
diff --git a/libmu_auth/sql.c b/libmu_auth/sql.c
index 36f82d2..fe2188b 100644
--- a/libmu_auth/sql.c
+++ b/libmu_auth/sql.c
@@ -362,7 +362,7 @@ mu_auth_sql_by_name (struct mu_auth_data **return_data,
   
   if (status)
     {
-      mu_error (_("SQL Query failed: %s"),
+      mu_error (_("SQL query failed: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -446,7 +446,7 @@ mu_auth_sql_by_uid (struct mu_auth_data **return_data,
   
   if (status)
     {
-      mu_error (_("SQL Query failed: %s"),
+      mu_error (_("SQL query failed: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
@@ -522,7 +522,7 @@ mu_sql_getpass (const char *username, char **passwd)
   
   if (status)
     {
-      mu_error (_("SQL Query failed: %s"),
+      mu_error (_("SQL query failed: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
diff --git a/libmu_cfg/sql.c b/libmu_cfg/sql.c
index f21e309..65ad579 100644
--- a/libmu_cfg/sql.c
+++ b/libmu_cfg/sql.c
@@ -36,7 +36,7 @@ cb_password_type (mu_debug_t debug, void *data, mu_config_value_t *val)
   
   if (mu_sql_decode_password_type (val->v.string, &sql_settings.password_type))
     mu_cfg_format_error (debug, MU_DEBUG_ERROR,
-			 _("Unknown password type `%s'"),
+			 _("unknown password type `%s'"),
 			 val->v.string);
   return 0;
 }
diff --git a/maidag/maidag.c b/maidag/maidag.c
index 1744e03..71cd840 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -79,21 +79,21 @@ static struct argp_option options[] =
  { NULL, 0, NULL, 0,
    N_("General options"), GRID },
       
-  { "foreground", FOREGROUND_OPTION, 0, 0, N_("Remain in foreground."),
+  { "foreground", FOREGROUND_OPTION, 0, 0, N_("remain in foreground"),
     GRID + 1 },
-  { "inetd",  'i', 0, 0, N_("Run in inetd mode"), GRID + 1 },
+  { "inetd",  'i', 0, 0, N_("run in inetd mode"), GRID + 1 },
   { "daemon", 'd', N_("NUMBER"), OPTION_ARG_OPTIONAL,
-    N_("Runs in daemon mode with a maximum of NUMBER children"), GRID + 1 },
-  { "url", URL_OPTION, 0, 0, N_("Deliver to given URLs"), GRID + 1 },
+    N_("runs in daemon mode with a maximum of NUMBER children"), GRID + 1 },
+  { "url", URL_OPTION, 0, 0, N_("deliver to given URLs"), GRID + 1 },
   { "from", 'f', N_("EMAIL"), 0,
-    N_("Specify the sender's name"), GRID + 1 },
+    N_("specify the sender's name"), GRID + 1 },
   { NULL, 'r', NULL, OPTION_ALIAS, NULL },
   { "lmtp", LMTP_OPTION, N_("URL"), OPTION_ARG_OPTIONAL,
-    N_("Operate in LMTP mode"), GRID + 1 },
+    N_("operate in LMTP mode"), GRID + 1 },
   { "debug", 'x', N_("FLAGS"), 0,
-    N_("Enable debugging"), GRID + 1 },
+    N_("enable debugging"), GRID + 1 },
   { "stderr", STDERR_OPTION, NULL, 0,
-    N_("Log to standard error"), GRID + 1 },
+    N_("log to standard error"), GRID + 1 },
 #undef GRID
 
 #define GRID 2
@@ -101,12 +101,12 @@ static struct argp_option options[] =
    N_("Scripting options"), GRID },
  
   { "language", 'l', N_("STRING"), 0,
-    N_("Define scripting language for the next --script option"),
+    N_("define scripting language for the next --script option"),
     GRID + 1 },
   { "script", 's', N_("PATTERN"), 0,
-    N_("Set name pattern for user-defined mail filter"), GRID + 1 },
+    N_("set name pattern for user-defined mail filter"), GRID + 1 },
   { "message-id-header", MESSAGE_ID_HEADER_OPTION, N_("STRING"), 0,
-    N_("Use this header to identify messages when logging Sieve actions"),
+    N_("use this header to identify messages when logging Sieve actions"),
     GRID + 1 },
 #undef GRID
   { NULL,      0, NULL, 0, NULL, 0 }
@@ -215,7 +215,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case 'r':
     case 'f':
       if (sender_address != NULL)
-	argp_error (state, _("Multiple --from options"));
+	argp_error (state, _("multiple --from options"));
       sender_address = arg;
       break;
       
diff --git a/maidag/mailquota.c b/maidag/mailquota.c
index f5c5f7b..8623719 100644
--- a/maidag/mailquota.c
+++ b/maidag/mailquota.c
@@ -194,7 +194,7 @@ sql_retrieve_quota (char *name, mu_off_t *quota)
   
   if (status)
     {
-      mu_error (_("SQL Query failed: %s"),
+      mu_error (_("SQL query failed: %s"),
 		(status == MU_ERR_SQL) ?  mu_sql_strerror (conn) :
 	 	                          mu_strerror (status));
       mu_sql_connection_destroy (&conn);
diff --git a/maidag/mailtmp.c b/maidag/mailtmp.c
index 5aead7d..775731f 100644
--- a/maidag/mailtmp.c
+++ b/maidag/mailtmp.c
@@ -138,7 +138,7 @@ mail_tmp_finish (struct mail_tmp *mtmp, mu_mailbox_t *mbox)
   if (status)
     {
       errno = status;
-      maidag_error (_("Error writing temporary file: %s"), 
+      maidag_error (_("error writing temporary file: %s"), 
                     mu_strerror (status));
       mu_stream_destroy (&mtmp->stream, mu_stream_get_owner (mtmp->stream));
       return status;
diff --git a/mail/mail.c b/mail/mail.c
index 64aad6c..426a164 100644
--- a/mail/mail.c
+++ b/mail/mail.c
@@ -41,26 +41,26 @@ static struct argp_option options[] = {
   { NULL,     'f', NULL,      OPTION_HIDDEN, NULL, 0 },
   {"file",    F_OPTION, "FILE",   OPTION_ARG_OPTIONAL|OPTION_HIDDEN, 0},
 
-  {"exist",   'e', NULL,      0, N_("Return true if mail exists"), 0},
-  {"byname",  'F', NULL,      0, N_("Save messages according to sender"), 0},
-  {"headers", 'H', NULL,      0, N_("Write a header summary and exit"), 0},
-  {"ignore",  'i', NULL,      0, N_("Ignore interrupts"), 0},
-  {"norc",    'n', NULL,      0, N_("Do not read the system mailrc file"), 0},
+  {"exist",   'e', NULL,      0, N_("return true if mail exists"), 0},
+  {"byname",  'F', NULL,      0, N_("save messages according to sender"), 0},
+  {"headers", 'H', NULL,      0, N_("write a header summary and exit"), 0},
+  {"ignore",  'i', NULL,      0, N_("ignore interrupts"), 0},
+  {"norc",    'n', NULL,      0, N_("do not read the system mailrc file"), 0},
   {"nosum",   'N', NULL,      0,
-   N_("Do not display initial header summary"), 0},
-  {"print",   'p', NULL,      0, N_("Print all mail to standard output"), 0},
+   N_("do not display initial header summary"), 0},
+  {"print",   'p', NULL,      0, N_("print all mail to standard output"), 0},
   {"read",    'r', NULL,      OPTION_ALIAS },
   {"quit",    'q', NULL,      0,
-   N_("Cause interrupts to terminate program"), 0},
+   N_("cause interrupts to terminate program"), 0},
   {"subject", 's', N_("SUBJ"), 0,
-   N_("Send a message with the given SUBJECT"), 0},
+   N_("send a message with the given SUBJECT"), 0},
   {"to",      't', NULL,      0,
-   N_("Precede message by a list of addresses"), 0},
-  {"user",    'u', N_("USER"), 0, N_("Operate on USER's mailbox"), 0},
+   N_("precede message by a list of addresses"), 0},
+  {"user",    'u', N_("USER"), 0, N_("operate on USER's mailbox"), 0},
   {"append",  'a', N_("HEADER: VALUE"), 0,
-   N_("Append given header to the message being sent"), 0},
+   N_("append given header to the message being sent"), 0},
   {"exec",    'E', N_("COMMAND"), 0,
-   N_("Execute COMMAND"), 0 },
+   N_("execute COMMAND"), 0 },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
diff --git a/messages/messages.c b/messages/messages.c
index 23c3058..f894ae7 100644
--- a/messages/messages.c
+++ b/messages/messages.c
@@ -39,8 +39,8 @@ static struct argp_option options[] = {
   { NULL,         0, NULL,  0,
     /* TRANSLATORS: 'messages' is a program name. Do not translate it! */
     N_("messages specific switches:"), 0},
-  {"quiet",	'q',	0,	0,	N_("Only display number of messages")},
-  {"silent",	's',	0,	0,	N_("Same as -q")},
+  {"quiet",	'q',	NULL,	0,	N_("only display number of messages")},
+  {"silent",	's',	NULL,	OPTION_ALIAS, NULL },
   { 0 }
 };
 
diff --git a/mh/ali.c b/mh/ali.c
index 21264ef..ef8e81b 100644
--- a/mh/ali.c
+++ b/mh/ali.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 2003, 2004, 2005, 2006, 2007, 
-   2008 Free Software Foundation, Inc.
+   2008, 2009 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
@@ -35,17 +35,17 @@ static char args_doc[] = N_("aliases ...");
 /* GNU options */
 static struct argp_option options[] = {
   {"alias",  ARG_ALIAS, N_("FILE"), 0,
-   N_("Use the additional alias FILE")},
+   N_("use the additional alias FILE")},
   {"noalias", ARG_NOALIAS, NULL, 0,
-   N_("Do not read the system alias file") },
+   N_("do not read the system alias file") },
   {"list", ARG_LIST, N_("BOOL"),  OPTION_ARG_OPTIONAL,
-   N_("List each address on a separate line") },
+   N_("list each address on a separate line") },
   {"normalize", ARG_NORMALIZE, N_("BOOL"),  OPTION_ARG_OPTIONAL,
-   N_("Try to determine the official hostname for each address") },
+   N_("try to determine the official hostname for each address") },
   {"user", ARG_USER, N_("BOOL"),  OPTION_ARG_OPTIONAL,
-   N_("List the aliases that expand to given addresses") },
+   N_("list the aliases that expand to given addresses") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/anno.c b/mh/anno.c
index df30c0a..8d0b7ff 100644
--- a/mh/anno.c
+++ b/mh/anno.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2007, 2008, 2009 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
@@ -29,19 +29,19 @@ static char args_doc[] = N_("[msg [msg...]]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"inplace", ARG_INPLACE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Annotate the message in place")},
+   N_("* annotate the message in place")},
   {"noinplace", ARG_NOINPLACE, NULL, OPTION_HIDDEN,  "" },
   {"date", ARG_DATE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Add FIELD: Date header") },
+   N_("add FIELD: date header") },
   {"nodate", ARG_NODATE, NULL, OPTION_HIDDEN, "" },
   {"component", ARG_COMPONENT, N_("FIELD"), 0,
-   N_("Add this FIELD to the message header") },
+   N_("add this FIELD to the message header") },
   {"text", ARG_TEXT, N_("STRING"), 0,
-   N_("Field value for the component") },
+   N_("field value for the component") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { NULL }
 };
 
diff --git a/mh/burst.c b/mh/burst.c
index 1c0c796..e78f55c 100644
--- a/mh/burst.c
+++ b/mh/burst.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007, 2008, 2009 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
@@ -32,23 +32,23 @@ static char args_doc[] = "[msgs]";
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",        ARG_FOLDER,        N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"inplace",      ARG_INPLACE,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Replace the source message with the table of contents, insert extracted messages after it") },
+   N_("replace the source message with the table of contents, insert extracted messages after it") },
   {"noinplace",    ARG_NOINPLACE,    0, OPTION_HIDDEN, ""},
   {"quiet",        ARG_QUIET,        N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Be quiet about the messages that are not in digest format") },
+   N_("be quiet about the messages that are not in digest format") },
   {"noquiet",      ARG_NOQUIET,      0, OPTION_HIDDEN, ""},
   {"verbose",      ARG_VERBOSE,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Verbosely list the actions taken") },
+   N_("verbosely list the actions taken") },
   {"noverbose",    ARG_NOVERBOSE,    0, OPTION_HIDDEN, ""},
   {"recursive",    ARG_RECURSIVE,    N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Recursively expand MIME messages") },
+   N_("recursively expand MIME messages") },
   {"norecursive",  ARG_NORECURSIVE,  0, OPTION_HIDDEN, ""},
   {"length",       ARG_LENGTH,       N_("NUMBER"), 0,
-   N_("Set minimal length of digest encapsulation boundary (default 1)") },
+   N_("set minimal length of digest encapsulation boundary (default 1)") },
   {"license",      ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { NULL }
 };
 
diff --git a/mh/comp.c b/mh/comp.c
index 148fed8..c5f526d 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 2003, 2005, 2006, 2007, 
-   2008 Free Software Foundation, Inc.
+   2008, 2009 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
@@ -32,32 +32,32 @@ static char args_doc[] = "[msg]";
 /* GNU options */
 static struct argp_option options[] = {
   {"build",         ARG_BUILD, 0, 0,
-   N_("Build the draft and quit immediately.")},
+   N_("build the draft and quit immediately.")},
   {"draftfolder",   ARG_DRAFTFOLDER, N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts")},
+   N_("specify the folder for message drafts")},
   {"nodraftfolder", ARG_NODRAFTFOLDER, 0, 0,
-   N_("Undo the effect of the last --draftfolder option")},
+   N_("undo the effect of the last --draftfolder option")},
   {"draftmessage" , ARG_DRAFTMESSAGE, N_("MSG"), 0,
-   N_("Invoke the draftmessage facility")},
+   N_("invoke the draftmessage facility")},
   {"folder",        ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"file",          ARG_FILE, N_("FILE"), 0,
-   N_("Use FILE as the message draft")},
+   N_("use FILE as the message draft")},
   {"editor",        ARG_EDITOR, N_("PROG"), 0,
-   N_("Set the editor program to use")},
+   N_("set the editor program to use")},
   {"noedit",        ARG_NOEDIT, 0, 0,
-   N_("Suppress the initial edit")},
+   N_("suppress the initial edit")},
   {"form",          ARG_FORM, N_("FILE"), 0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"whatnowproc",   ARG_WHATNOWPROC, N_("PROG"), 0,
-   N_("* Set the replacement for whatnow program")},
+   N_("* set the replacement for whatnow program")},
   {"nowhatnowproc", ARG_NOWHATNOWPROC, NULL, 0,
-   N_("* Ignore whatnowproc variable. Use standard `whatnow' shell instead.")},
+   N_("* ignore whatnowproc variable. Use standard `whatnow' shell instead.")},
   {"use",           ARG_USE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Use draft file preserved after the last session") },
+   N_("use draft file preserved after the last session") },
   {"nouse",         ARG_NOUSE, NULL, OPTION_HIDDEN, ""},
   {"license",       ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/fmtcheck.c b/mh/fmtcheck.c
index 51491c0..ae8ea53 100644
--- a/mh/fmtcheck.c
+++ b/mh/fmtcheck.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005,
-   2006, 2007, 2008  Free Software Foundation, Inc.
+   2006, 2007, 2008, 2009 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
@@ -29,15 +29,15 @@ static char args_doc[] = "";
 /* GNU options */
 static struct argp_option options[] = {
   {"form",    ARG_FORM, N_("FILE"),   0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"format",  ARG_FORMAT, N_("FORMAT"), 0,
-   N_("Use this format string")},
+   N_("use this format string")},
   {"dump",    ARG_DUMP, NULL,     0,
-   N_("Dump the listing of compiled format code")},
+   N_("dump the listing of compiled format code")},
   { "debug",  ARG_DEBUG, NULL,     0,
-    N_("Enable parser debugging output"),},
+    N_("enable parser debugging output"),},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   { 0 }
 };
diff --git a/mh/folder.c b/mh/folder.c
index 0e6ad01..1d51f52 100644
--- a/mh/folder.c
+++ b/mh/folder.c
@@ -42,47 +42,47 @@ static char args_doc[] = N_("[action] [msg]");
 static struct argp_option options[] = {
   {N_("Actions are:"), 0, 0, OPTION_DOC, NULL, 0 },
   {"print", ARG_PRINT, NULL, 0,
-   N_("List the folders (default)"), 1 },
+   N_("list the folders (default)"), 1 },
   {"list",  ARG_LIST,  NULL, 0,
-   N_("List the contents of the folder stack"), 1},
+   N_("list the contents of the folder stack"), 1},
   {"pack",  ARG_PACK,  N_("NUMBER"), OPTION_ARG_OPTIONAL,
-   N_("Remove holes in message numbering. Begin numbering from NUMBER (default: first message number)"), 1},
+   N_("remove holes in message numbering, begin numbering from NUMBER (default: first message number)"), 1},
   {"push",  ARG_PUSH,  N_("FOLDER"), OPTION_ARG_OPTIONAL,
-    N_("Push the folder on the folder stack. If FOLDER is specified, it is pushed. "
+    N_("push the folder on the folder stack. If FOLDER is specified, it is pushed. "
        "Otherwise, if a folder is given in the command line (via + or --folder), "
        "it is pushed on stack. Otherwise, the current folder and the top of the folder "
        "stack are exchanged"), 1},
   {"pop",   ARG_POP,    NULL, 0,
-   N_("Pop the folder off the folder stack"), 1},
+   N_("pop the folder off the folder stack"), 1},
   
   {N_("Options are:"), 0, 0, OPTION_DOC, NULL, 2 },
   
   {"folder", ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon"), 3},
+   N_("specify folder to operate upon"), 3},
   {"all",    ARG_ALL,    NULL, 0,
-   N_("List all folders"), 3},
+   N_("list all folders"), 3},
   {"create", ARG_CREATE, N_("BOOL"), OPTION_ARG_OPTIONAL, 
-    N_("Create non-existing folders"), 3},
+    N_("create non-existing folders"), 3},
   {"nocreate", ARG_NOCREATE, NULL, OPTION_HIDDEN, ""},
   {"fast",   ARG_FAST, N_("BOOL"), OPTION_ARG_OPTIONAL, 
-    N_("List only the folder names"), 3},
+    N_("list only the folder names"), 3},
   {"nofast", ARG_NOFAST, NULL, OPTION_HIDDEN, ""},
   {"header", ARG_HEADER, N_("BOOL"), OPTION_ARG_OPTIONAL, 
-    N_("Print the header line"), 3},
+    N_("print the header line"), 3},
   {"noheader", ARG_NOHEADER, NULL, OPTION_HIDDEN, ""},
   {"recurse",ARG_RECURSIVE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-    N_("Scan folders recursively"), 3},
+    N_("scan folders recursively"), 3},
   {"norecurse", ARG_NORECURSIVE, NULL, OPTION_HIDDEN, ""},
   {"total",  ARG_TOTAL, N_("BOOL"), OPTION_ARG_OPTIONAL, 
-    N_("Output the total statistics"), 3},
+    N_("output the total statistics"), 3},
   {"nototal", ARG_NOTOTAL, NULL, OPTION_HIDDEN, ""},
   {"verbose", ARG_VERBOSE, NULL, 0,
-   N_("Verbosely list actions taken"), 3},
+   N_("verbosely list actions taken"), 3},
   {"dry-run", ARG_DRY_RUN, NULL, 0,
-   N_("Do nothing, print what would be done (with --pack)"), 3},
+   N_("do nothing, print what would be done (with --pack)"), 3},
    
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   {NULL},
 };
diff --git a/mh/forw.c b/mh/forw.c
index a3da894..a33a8f0 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -30,48 +30,48 @@ static char args_doc[] = "[msgs]";
 /* GNU options */
 static struct argp_option options[] = {
   {"annotate",      ARG_ANNOTATE,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Add Forwarded: header to each forwarded message")},
+   N_("add Forwarded: header to each forwarded message")},
   {"build",         ARG_BUILD,         0, 0,
-   N_("Build the draft and quit immediately")},
+   N_("build the draft and quit immediately")},
   {"draftfolder",   ARG_DRAFTFOLDER,   N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts")},
+   N_("specify the folder for message drafts")},
   {"nodraftfolder", ARG_NODRAFTFOLDER, 0, 0,
-   N_("Undo the effect of the last --draftfolder option")},
+   N_("undo the effect of the last --draftfolder option")},
   {"draftmessage" , ARG_DRAFTMESSAGE,  N_("MSG"), 0,
-   N_("Invoke the draftmessage facility")},
+   N_("invoke the draftmessage facility")},
   {"folder",        ARG_FOLDER,        N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"editor",        ARG_EDITOR,        N_("PROG"), 0,
-   N_("Set the editor program to use")},
+   N_("set the editor program to use")},
   {"noedit",        ARG_NOEDIT,        0, 0,
-   N_("Suppress the initial edit")},
+   N_("suppress the initial edit")},
   {"format",        ARG_FORMAT,        N_("BOOL"), 0, 
-   N_("Format messages")},
+   N_("format messages")},
   {"noformat",      ARG_NOFORMAT,      NULL, 0,
-   N_("Undo the effect of the last --format option") },
+   N_("undo the effect of the last --format option") },
   {"form",          ARG_FORM,          N_("FILE"), 0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"filter",        ARG_FILTER,        N_("FILE"), 0,
-  N_("Use filter FILE to preprocess the body of the message") },
+  N_("use filter FILE to preprocess the body of the message") },
   {"nofilter",      ARG_NOFILTER,      NULL, 0,
-   N_("Undo the effect of the last --filter option") },
+   N_("undo the effect of the last --filter option") },
   {"inplace",       ARG_INPLACE,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Annotate the message in place")},
+   N_("* annotate the message in place")},
   {"noinplace",     ARG_NOINPLACE,     0,          OPTION_HIDDEN, "" },
   {"mime",          ARG_MIME,          N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Use MIME encapsulation") },
+   N_("use MIME encapsulation") },
   {"nomime",        ARG_NOMIME,        NULL, OPTION_HIDDEN, "" },
   {"width", ARG_WIDTH, N_("NUMBER"), 0, N_("Set output width")},
   {"whatnowproc",   ARG_WHATNOWPROC,   N_("PROG"), 0,
-   N_("* Set the replacement for whatnow program")},
+   N_("* set the replacement for whatnow program")},
   {"nowhatnowproc", ARG_NOWHATNOWPROC, NULL, 0,
-   N_("* Ignore whatnowproc variable. Use standard `whatnow' shell instead")},
+   N_("* ignore whatnowproc variable, use standard `whatnow' shell instead")},
   {"use",           ARG_USE,           N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Use draft file preserved after the last session") },
+   N_("use draft file preserved after the last session") },
   {"nouse",         ARG_NOUSE,         N_("BOOL"), OPTION_HIDDEN, "" },
 
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   {NULL},
 };
diff --git a/mh/inc.c b/mh/inc.c
index c022ae1..d1c0c9e 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -29,29 +29,29 @@ static char args_doc[] = N_("[+folder]");
 /* GNU options */
 static struct argp_option options[] = {
   {"file",    ARG_FILE, N_("FILE"),   0,
-   N_("Incorporate mail from named file")},
+   N_("incorporate mail from named file")},
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to incorporate mail to")},
+   N_("specify folder to incorporate mail to")},
   {"audit",   ARG_AUDIT, N_("FILE"), 0,
-   N_("Enable audit")},
+   N_("enable audit")},
   {"noaudit", ARG_NOAUDIT, 0, 0,
-   N_("Disable audit")},
+   N_("disable audit")},
   {"changecur", ARG_CHANGECUR, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Mark first incorporated message as current (default)")},
+   N_("mark first incorporated message as current (default)")},
   {"nochangecur", ARG_NOCHANGECUR, NULL, OPTION_HIDDEN, ""},
   {"form",    ARG_FORM, N_("FILE"),   0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"format",  ARG_FORMAT, N_("FORMAT"), 0,
-   N_("Use this format string")},
+   N_("use this format string")},
   {"truncate", ARG_TRUNCATE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Truncate source mailbox after incorporating (default)")},
+   N_("truncate source mailbox after incorporating (default)")},
   {"notruncate", ARG_NOTRUNCATE, NULL, OPTION_HIDDEN, ""},
   {"width",   ARG_WIDTH, N_("NUMBER"), 0,
-   N_("Set output width")},
+   N_("set output width")},
   {"quiet",   ARG_QUIET, 0,        0,
-   N_("Be quiet")},
+   N_("be quiet")},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/install-mh.c b/mh/install-mh.c
index ae15451..0104ea0 100644
--- a/mh/install-mh.c
+++ b/mh/install-mh.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2008, 2009 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
@@ -25,10 +25,10 @@ static char args_doc[] = "";
 
 /* GNU options */
 static struct argp_option options[] = {
-  {"auto",  ARG_AUTO, NULL, 0, N_("Do not ask for anything")},
+  {"auto",  ARG_AUTO, NULL, 0, N_("do not ask for anything")},
   {"compat", ARG_COMPAT, NULL, OPTION_HIDDEN, ""},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   {NULL}
 };
 
diff --git a/mh/mark.c b/mh/mark.c
index 53b8cc5..0f41020 100644
--- a/mh/mark.c
+++ b/mh/mark.c
@@ -27,23 +27,23 @@ static char args_doc[] = "[msgs...]";
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"sequence", ARG_SEQUENCE, N_("NAME"), 0,
-   N_("Specify sequence name to operate upon")},
+   N_("specify sequence name to operate upon")},
   {"add", ARG_ADD, NULL, 0,
-   N_("Add messages to the sequence")},
+   N_("add messages to the sequence")},
   {"delete", ARG_DELETE, NULL, 0,
-   N_("Delete messages from the sequence")},
+   N_("delete messages from the sequence")},
   {"list", ARG_LIST, NULL, 0,
-   N_("List the sequences")},
+   N_("list the sequences")},
   {"public", ARG_PUBLIC, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Create public sequence")},
+   N_("create public sequence")},
   {"nopublic", ARG_NOPUBLIC, NULL, OPTION_HIDDEN, "" },
   {"zero", ARG_ZERO, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Empty the sequence before adding messages")},
+   N_("empty the sequence before adding messages")},
   {"nozero", ARG_NOZERO, NULL, OPTION_HIDDEN, "" },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   {NULL}
 };
 
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 820d6f6..3cb48c8 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -284,7 +284,9 @@ mh_check_folder (const char *pathname, int confirm)
     {
       if (errno == ENOENT)
 	{
-	  if (!confirm || mh_getyn (_("create folder \"%s\""), p))
+	  /* TRANSLATORS: This is a question and will be followed
+	     by question mark on output. */
+	  if (!confirm || mh_getyn (_("Create folder \"%s\""), p))
 	    return mh_makedir (p);
 	  else
 	    return 1;
@@ -642,7 +644,7 @@ _file_to_message (const char *file_name)
 
   if (stat (file_name, &st) < 0)
     {
-      mu_error (_("cannot stat file %s: %s"), file_name, strerror (errno));
+      mu_diag_funcall (MU_DIAG_ERROR, "stat", file_name, errno);
       return NULL;
     }
   
@@ -709,14 +711,20 @@ mh_real_install (char *name, int automode)
     {
       size_t n = 0;
       
+      /* TRANSLATORS: This is a question and will be followed
+	 by question mark on output. */
       if (mh_getyn_interactive (_("Do you need help")))
 	mh_install_help (mhdir);
 
+      /* TRANSLATORS: This is a question and will be followed
+	 by question mark on output. */
       if (!mh_getyn_interactive (_("Do you want the standard MH path \"%s\""), mhdir))
 	{
 	  int local;
 	  char *p;
 	  
+	  /* TRANSLATORS: This is a question and will be followed
+	     by question mark on output. */
 	  local = mh_getyn_interactive (_("Do you want a path below your login directory"));
 	  if (local)
 	    printf (_("What is the path? "));
diff --git a/mh/mhl.c b/mh/mhl.c
index e17acf8..8bc7bd5 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -30,25 +30,25 @@ static char args_doc[] = N_("[files]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",     ARG_FOLDER,     N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   { "bell",      ARG_BELL,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-    N_("Ring the bell at the end of each output page") },
+    N_("ring the bell at the end of each output page") },
   {"nobell",     ARG_NOBELL,     NULL, OPTION_HIDDEN, "" },
   { "clear",     ARG_CLEAR,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-    N_("Clear the screen after each page of output")},
+    N_("clear the screen after each page of output")},
   {"noclear",    ARG_NOCLEAR,    NULL, OPTION_HIDDEN, "" },
   {"form",       ARG_FORM,       N_("FILE"), 0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"width",      ARG_WIDTH,      N_("NUMBER"), 0,
-   N_("Set output width")},
+   N_("set output width")},
   {"length",     ARG_LENGTH,     N_("NUMBER"), 0,
-   N_("Set output screen length")},
+   N_("set output screen length")},
   {"moreproc",   ARG_MOREPROC,   N_("PROG"), 0,
-   N_("Use given PROG instead of the default") },
+   N_("use given PROG instead of the default") },
   {"nomoreproc", ARG_NOMOREPROC, NULL, 0,
-   N_("Disable use of moreproc program") },
+   N_("disable use of moreproc program") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { NULL }
 };
    
diff --git a/mh/mhn.c b/mh/mhn.c
index f5a1111..8f8f102 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -34,59 +34,59 @@ static char args_doc[] = "[msgs]";
 
 static struct argp_option options[] = {
   {"folder",       ARG_FOLDER,       N_("FOLDER"), 0,
-   N_("Specify folder to operate upon"), 0},
+   N_("specify folder to operate upon"), 0},
   {"file",         ARG_FILE,         N_("FILE"),   0,
-   N_("Specify file to operate upon"), 0},
+   N_("specify file to operate upon"), 0},
   
   {N_("MIME editing options"),   0,  NULL, OPTION_DOC,  NULL, 5},
   {"compose",      ARG_COMPOSE,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Compose the MIME message (default)"), 6},
+   N_("compose the MIME message (default)"), 6},
   {"nocompose",    ARG_NOCOMPOSE,    NULL, OPTION_HIDDEN, "", 6},
   
   {N_("Listing options"),   0,  NULL, OPTION_DOC,  NULL, 0},
   {"list",         ARG_LIST,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("List the table of contents"), 11 },
+   N_("list the table of contents"), 11 },
   {"nolist",       ARG_NOLIST,       NULL, OPTION_HIDDEN, "", 11 },
   {"headers",      ARG_HEADER,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Print the banner above the listing"), 12},
+   N_("print the banner above the listing"), 12},
   {"noheaders",    ARG_NOHEADERS,    NULL, OPTION_HIDDEN, "", 12 },
   {"realsize",     ARG_REALSIZE,     N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("List the decoded sizes"), 12},
+   N_("list the decoded sizes"), 12},
   {"norealsize",   ARG_NOREALSIZE,   NULL, OPTION_HIDDEN, "", 12 },
 
   {N_("Display options"),   0,  NULL, OPTION_DOC,  NULL, 20},
   {"show",         ARG_SHOW,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Display the contents of the messages"), 21},
+   N_("display the contents of the messages"), 21},
   {"noshow",       ARG_NOSHOW,       NULL, OPTION_HIDDEN, "", 21 },
   {"serialonly",   ARG_SERIALONLY,   N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Display messages serially"), 22},
+   N_("* display messages serially"), 22},
   {"noserialonly", ARG_NOSERIALONLY, NULL, OPTION_HIDDEN, "", 22 },
   {"form",         ARG_FORM,         N_("FILE"), 0,
-   N_("Read mhl format from FILE"), 22},
+   N_("read mhl format from FILE"), 22},
   {"pause",        ARG_PAUSE,        N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Pause prior to displaying content"), 22},
+   N_("pause prior to displaying content"), 22},
   {"nopause",      ARG_NOPAUSE,      NULL, OPTION_HIDDEN, "", 22 },
    
   {N_("Saving options"),   0,  NULL, OPTION_DOC,  NULL, 30},
   {"store",        ARG_STORE,        N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Store the contents of the messages on disk"), 31},
+   N_("store the contents of the messages on disk"), 31},
   {"nostore",      ARG_NOSTORE,      NULL, OPTION_HIDDEN, "", 31 },
   {"auto",         ARG_AUTO,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Use filenames from the content headers"), 31},
+   N_("use filenames from the content headers"), 31},
   {"noauto",       ARG_NOAUTO,       NULL, OPTION_HIDDEN, "", 31 },
 
   {N_("Other options"),    0,  NULL, OPTION_DOC,  NULL, 40},
   {"part",         ARG_PART,         N_("PART"), 0,
-   N_("Limit the scope of the operation to the given part"), 41},
+   N_("limit the scope of the operation to the given part"), 41},
   {"type",         ARG_TYPE,         N_("CONTENT"), 0,
-   N_("Operate on message part with given multipart content"), 41 },
+   N_("operate on message part with given multipart content"), 41 },
   {"verbose",       ARG_VERBOSE,     N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Print additional information"), 41 },
+   N_("print additional information"), 41 },
   {"noverbose",     ARG_NOVERBOSE,   NULL, OPTION_HIDDEN, "", 41 },
   {"quiet",         ARG_QUIET, 0, 0,
-   N_("Be quiet")},
+   N_("be quiet")},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   {NULL}
 };
 
diff --git a/mh/mhparam.c b/mh/mhparam.c
index bd48953..ad56c43 100644
--- a/mh/mhparam.c
+++ b/mh/mhparam.c
@@ -28,11 +28,11 @@ static char args_doc[] = N_("[components]");
 /* GNU options */
 static struct argp_option options[] = {
   {"all",  ARG_ALL, NULL, 0,
-   N_("Display all components from the MH profile. All other arguments are ignored")},
+   N_("display all components from the MH profile. All other arguments are ignored")},
   {"component", ARG_COMPONENT, N_("BOOL"),   OPTION_ARG_OPTIONAL,
-   N_("Always display the component name") },
+   N_("always display the component name") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/mhpath.c b/mh/mhpath.c
index 53f32e3..13d5b1d 100644
--- a/mh/mhpath.c
+++ b/mh/mhpath.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2007, 2008, 2009 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
@@ -28,9 +28,9 @@ static char args_doc[] = N_("[+folder] [msgs]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/pick.c b/mh/pick.c
index db1cb86..dc1ce76 100644
--- a/mh/pick.c
+++ b/mh/pick.c
@@ -36,63 +36,63 @@ static char args_doc[] = N_("[messages]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon"), 0},
+   N_("specify folder to operate upon"), 0},
 
   {N_("Specifying search patterns:"), 0,  NULL, OPTION_DOC,  NULL, 0},
   {"component", ARG_COMPONENT, N_("FIELD"), 0,
-   N_("Search the named header field"), 1},
+   N_("search the named header field"), 1},
   {"pattern", ARG_PATTERN, N_("STRING"), 0,
-   N_("A pattern to look for"), 1},
+   N_("set pattern to look for"), 1},
   {"search",  0, NULL, OPTION_ALIAS, NULL, 1},
   {"cflags",  ARG_CFLAGS,  N_("STRING"), 0,
-   N_("Flags controlling the type of regular expressions. STRING must consist of one or more of the following letters: B=basic, E=extended, I=ignore case, C=case sensitive. Default is \"EI\". The flags remain in effect until the next occurrence of --cflags option. The option must occur right before --pattern or --component option (or its alias).") },
+   N_("flags controlling the type of regular expressions. STRING must consist of one or more of the following letters: B=basic, E=extended, I=ignore case, C=case sensitive. Default is \"EI\". The flags remain in effect until the next occurrence of --cflags option. The option must occur right before --pattern or --component option (or its alias).") },
   {"cc",      ARG_CC,      N_("STRING"), 0,
-   N_("Same as --component cc --pattern STRING"), 1},
+   N_("same as --component cc --pattern STRING"), 1},
   {"date",    ARG_DATE,    N_("STRING"), 0,
-   N_("Same as --component date --pattern STRING"), 1},
+   N_("same as --component date --pattern STRING"), 1},
   {"from",    ARG_FROM,    N_("STRING"), 0,
-   N_("Same as --component from --pattern STRING"), 1},
+   N_("same as --component from --pattern STRING"), 1},
   {"subject", ARG_SUBJECT, N_("STRING"), 0,
-   N_("Same as --component subject --pattern STRING"), 1},
+   N_("same as --component subject --pattern STRING"), 1},
   {"to",      ARG_TO,      N_("STRING"), 0,
-   N_("Same as --component to --pattern STRING"), 1},
+   N_("same as --component to --pattern STRING"), 1},
 
   {N_("Date constraint operations:"), 0,  NULL, OPTION_DOC, NULL, 1},
   {"datefield",ARG_DATEFIELD, N_("STRING"), 0,
-   N_("Search in the named date header field (default is `Date:')"), 2},
+   N_("search in the named date header field (default is `Date:')"), 2},
   {"after",    ARG_AFTER,     N_("DATE"), 0,
-   N_("Match messages after the given date"), 2},
+   N_("match messages after the given date"), 2},
   {"before",   ARG_BEFORE,    N_("DATE"), 0,
-   N_("Match messages before the given date"), 2},
+   N_("match messages before the given date"), 2},
 
   {N_("Logical operations and grouping:"), 0, NULL, OPTION_DOC, NULL, 2},
   {"and",     ARG_AND,    NULL, 0,
-   N_("Logical AND (default)"), 3 },
+   N_("logical AND (default)"), 3 },
   {"or",      ARG_OR,     NULL, 0,
-   N_("Logical OR"), 3 },
+   N_("logical OR"), 3 },
   {"not",     ARG_NOT,    NULL, 0,
-   N_("Logical NOT"), 3},
+   N_("logical NOT"), 3},
   {"lbrace",  ARG_LBRACE, NULL, 0,
-   N_("Open group"), 3},
+   N_("open group"), 3},
   {"(",       0, NULL, OPTION_ALIAS, NULL, 3},
   {"rbrace",  ARG_RBRACE, NULL, 0,
-   N_("Close group"), 3},
+   N_("close group"), 3},
   {")",       0, NULL, OPTION_ALIAS, NULL, 3},
 
   {N_("Operations over the selected messages:"), 0, NULL, OPTION_DOC, NULL, 3},
   {"list",   ARG_LIST,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("List the numbers of the selected messages (default)"), 4},
+   N_("list the numbers of the selected messages (default)"), 4},
   {"nolist", ARG_NOLIST,     NULL, OPTION_HIDDEN, "", 4 },
   {"sequence", ARG_SEQUENCE,  N_("NAME"), 0,
-   N_("Add matching messages to the given sequence"), 4},
+   N_("add matching messages to the given sequence"), 4},
   {"public", ARG_PUBLIC, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Create public sequence"), 4},
+   N_("create public sequence"), 4},
   {"nopublic", ARG_NOPUBLIC, NULL, OPTION_HIDDEN, "", 4 },
   {"zero",     ARG_ZERO,     N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Empty the sequence before adding messages"), 4},
+   N_("empty the sequence before adding messages"), 4},
   {"nozero", ARG_NOZERO, NULL, OPTION_HIDDEN, "", 4 },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   {NULL},
 };
 
diff --git a/mh/refile.c b/mh/refile.c
index d78b2e7..b6d12db 100644
--- a/mh/refile.c
+++ b/mh/refile.c
@@ -35,20 +35,20 @@ static char args_doc[] = N_("messages folder [folder...]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"draft",   ARG_DRAFT, NULL, 0,
-   N_("Use <mh-dir>/draft as the source message")},
+   N_("use <mh-dir>/draft as the source message")},
   {"copy",    ARG_LINK, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Preserve the source folder copy")},
+   N_("preserve the source folder copy")},
   {"link",    0, NULL, OPTION_ALIAS, NULL},
   {"preserve", ARG_PRESERVE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Try to preserve message sequence numbers")},
+   N_("* try to preserve message sequence numbers")},
   {"source", ARG_SOURCE, N_("FOLDER"), 0,
-   N_("Specify source folder. FOLDER will become the current folder after the program exits")},
+   N_("specify source folder; it will become the current folder after the program exits")},
   {"src", 0, NULL, OPTION_ALIAS, NULL},
-  {"file", ARG_FILE, N_("FILE"), 0, N_("Use FILE as the source message")},
+  {"file", ARG_FILE, N_("FILE"), 0, N_("use FILE as the source message")},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
@@ -82,6 +82,7 @@ add_folder (const char *folder)
 void
 open_folders ()
 {
+  int rc;
   mu_iterator_t itr;
 
   if (!folder_name_list)
@@ -90,15 +91,15 @@ open_folders ()
       exit (1);
     }
 
-  if (mu_list_create (&folder_mbox_list))
+  if ((rc = mu_list_create (&folder_mbox_list)) != 0)
     {
-      mu_error (_("cannot create folder list"));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_list_create", NULL, rc);
       exit (1);
     }
 
-  if (mu_list_get_iterator (folder_name_list, &itr))
+  if ((rc = mu_list_get_iterator (folder_name_list, &itr)) != 0)
     {
-      mu_error (_("cannot create iterator"));
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_list_get_iterator", NULL, rc);
       exit (1);
     }
 
diff --git a/mh/repl.c b/mh/repl.c
index c972684..e501fef 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -34,42 +34,42 @@ static char args_doc[] = N_("[+folder] [msg]");
 /* GNU options */
 static struct argp_option options[] = {
   {"annotate", ARG_ANNOTATE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Add Replied: header to the message being replied to")},
+   N_("add Replied: header to the message being replied to")},
   {"build",   ARG_BUILD, 0, 0,
-   N_("Build the draft and quit immediately.")},
+   N_("build the draft and quit immediately")},
   {"draftfolder", ARG_DRAFTFOLDER, N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts")},
+   N_("specify the folder for message drafts")},
   {"nodraftfolder", ARG_NODRAFTFOLDER, 0, 0,
-   N_("Undo the effect of the last --draftfolder option")},
+   N_("undo the effect of the last --draftfolder option")},
   {"draftmessage" , ARG_DRAFTMESSAGE, N_("MSG"), 0,
-   N_("Invoke the draftmessage facility")},
+   N_("invoke the draftmessage facility")},
   {"cc", ARG_CC, "{all|to|cc|me}", 0,
-   N_("Specify whom to place on the Cc: list of the reply")},
+   N_("specify whom to place on the Cc: list of the reply")},
   {"nocc", ARG_NOCC, "{all|to|cc|me}", 0,
-   N_("Specify whom to remove from the Cc: list of the reply")},
-  {"folder",  ARG_FOLDER, N_("FOLDER"), 0, N_("Specify folder to operate upon")},
+   N_("specify whom to remove from the Cc: list of the reply")},
+  {"folder",  ARG_FOLDER, N_("FOLDER"), 0, N_("specify folder to operate upon")},
   {"group",  ARG_GROUP,  N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Construct a group or followup reply") },
-  {"editor", ARG_EDITOR, N_("PROG"), 0, N_("Set the editor program to use")},
-  {"noedit", ARG_NOEDIT, 0, 0, N_("Suppress the initial edit")},
-  {"fcc",    ARG_FCC, N_("FOLDER"), 0, N_("Set the folder to receive Fcc's")},
+   N_("construct a group or followup reply") },
+  {"editor", ARG_EDITOR, N_("PROG"), 0, N_("set the editor program to use")},
+  {"noedit", ARG_NOEDIT, 0, 0, N_("suppress the initial edit")},
+  {"fcc",    ARG_FCC, N_("FOLDER"), 0, N_("set the folder to receive Fcc's")},
   {"filter", ARG_FILTER, N_("MHL-FILTER"), 0,
-   N_("Set the mhl filter to preprocess the body of the message being replied")},
-  {"form",   ARG_FORM, N_("FILE"), 0, N_("Read format from given file")},
+   N_("set the mhl filter to preprocess the body of the message being replied")},
+  {"form",   ARG_FORM, N_("FILE"), 0, N_("read format from given file")},
   {"format", ARG_FORMAT, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Include a copy of the message being replied. The message will be processed using either the default filter \"mhl.reply\", or the filter specified by --filter option") },
+   N_("include a copy of the message being replied; the message will be processed using either the default filter \"mhl.reply\", or the filter specified by --filter option") },
   {"inplace", ARG_INPLACE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Annotate the message in place")},
+   N_("* annotate the message in place")},
   {"query", ARG_QUERY, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Query for addresses to place in To: and Cc: lists")},
-  {"width", ARG_WIDTH, N_("NUMBER"), 0, N_("Set output width")},
+   N_("query for addresses to place in To: and Cc: lists")},
+  {"width", ARG_WIDTH, N_("NUMBER"), 0, N_("set output width")},
   {"whatnowproc", ARG_WHATNOWPROC, N_("PROG"), 0,
-   N_("* Set the replacement for whatnow program")},
+   N_("* set the replacement for whatnow program")},
   {"nowhatnowproc", ARG_NOWHATNOWPROC, NULL, 0,
-   N_("* Ignore whatnowproc variable. Use standard `whatnow' shell instead.")},
-  {"use", ARG_USE, N_("BOOL"), OPTION_ARG_OPTIONAL, N_("Use draft file preserved after the last session") },
+   N_("* ignore whatnowproc variable; use standard `whatnow' shell instead")},
+  {"use", ARG_USE, N_("BOOL"), OPTION_ARG_OPTIONAL, N_("use draft file preserved after the last session") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/rmf.c b/mh/rmf.c
index 828d737..fea2b16 100644
--- a/mh/rmf.c
+++ b/mh/rmf.c
@@ -38,15 +38,15 @@ static char args_doc[] = N_("[+folder]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify the folder to delete")},
+   N_("specify the folder to delete")},
   {"interactive", ARG_INTERACTIVE, N_("BOOL"), OPTION_ARG_OPTIONAL,
-    N_("Interactive mode: ask for confirmation before removing each folder")},
+    N_("interactive mode: ask for confirmation before removing each folder")},
   {"nointeractive", ARG_NOINTERACTIVE, NULL, OPTION_HIDDEN, ""},
   {"recursive", ARG_RECURSIVE, NULL, 0,
-   N_("Recursively delete all subfolders")},
+   N_("recursively delete all subfolders")},
   {"norecursive", ARG_NORECURSIVE, NULL, OPTION_HIDDEN, ""},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
@@ -160,7 +160,7 @@ rmf (const char *name)
 	{
 	  if (unlink (p))
 	    {
-	      mu_error (_("cannot unlink %s: %s"), p, strerror (errno));
+	      mu_diag_funcall (MU_DIAG_ERROR, "unlink", p, errno);
 	      failures++;
 	    }
 	}
diff --git a/mh/rmm.c b/mh/rmm.c
index b77120c..ad39d9b 100644
--- a/mh/rmm.c
+++ b/mh/rmm.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005, 2007, 2008, 2009 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
@@ -28,9 +28,9 @@ static char args_doc[] = N_("[+folder] [msgs]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
diff --git a/mh/scan.c b/mh/scan.c
index 77274b3..825956e 100644
--- a/mh/scan.c
+++ b/mh/scan.c
@@ -36,26 +36,26 @@ static char args_doc[] = N_("[+folder] [msgs]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",  ARG_FOLDER, N_("FOLDER"), 0,
-   N_("Specify folder to scan")},
+   N_("specify folder to scan")},
   {"clear",   ARG_CLEAR, N_("BOOL"),   OPTION_ARG_OPTIONAL,
-   N_("Clear screen after displaying the list")},
+   N_("clear screen after displaying the list")},
   {"noclear", ARG_NOCLEAR, NULL, OPTION_HIDDEN, ""},
   {"form",    ARG_FORM, N_("FILE"),   0,
-   N_("Read format from given file")},
+   N_("read format from given file")},
   {"format",  ARG_FORMAT, N_("FORMAT"), 0,
-   N_("Use this format string")},
+   N_("use this format string")},
   {"header",  ARG_HEADER, N_("BOOL"),   OPTION_ARG_OPTIONAL,
-   N_("Display header")},
+   N_("display header")},
   {"width",   ARG_WIDTH, N_("NUMBER"), 0,
-   N_("Set output width")},
+   N_("set output width")},
   {"reverse", ARG_REVERSE, N_("BOOL"),   OPTION_ARG_OPTIONAL,
-   N_("List messages in reverse order")},
+   N_("list messages in reverse order")},
   {"noreverse", ARG_NOREVERSE, NULL, OPTION_HIDDEN, ""},
   {"file",    ARG_FILE, N_("FILE"),   0,
-   N_("[Not yet implemented]")},
+   N_("[not yet implemented]")},
   
   {"license", ARG_LICENSE, 0,        0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   { 0 }
 };
diff --git a/mh/send.c b/mh/send.c
index 6bae7b1..3088cff 100644
--- a/mh/send.c
+++ b/mh/send.c
@@ -34,51 +34,51 @@ static char args_doc[] = N_("file [file...]");
 /* GNU options */
 static struct argp_option options[] = {
   {"alias",         ARG_ALIAS,         N_("FILE"), 0,
-   N_("Specify additional alias file") },
+   N_("specify additional alias file") },
   {"draft",         ARG_DRAFT,         NULL, 0,
-   N_("Use prepared draft") },
+   N_("use prepared draft") },
   {"draftfolder",   ARG_DRAFTFOLDER,   N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts") },
+   N_("specify the folder for message drafts") },
   {"draftmessage",  ARG_DRAFTMESSAGE,  NULL, 0,
-   N_("Treat the arguments as a list of messages from the draftfolder") },
+   N_("treat the arguments as a list of messages from the draftfolder") },
   {"nodraftfolder", ARG_NODRAFTFOLDER, NULL, 0,
-   N_("Undo the effect of the last --draftfolder option") },
+   N_("undo the effect of the last --draftfolder option") },
   {"filter",        ARG_FILTER,        N_("FILE"), 0,
-  N_("* Use filter FILE to preprocess the body of the message") },
+  N_("* use filter FILE to preprocess the body of the message") },
   {"nofilter",      ARG_NOFILTER,      NULL, 0,
-   N_("* Undo the effect of the last --filter option") },
+   N_("* undo the effect of the last --filter option") },
   {"format",        ARG_FORMAT,        N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Reformat To: and Cc: addresses") },
+   N_("* reformat To: and Cc: addresses") },
   {"noformat",      ARG_NOFORMAT,      NULL, OPTION_HIDDEN, "" },
   {"forward",       ARG_FORWARD,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* In case of failure forward the draft along with the failure notice to the sender") },
+   N_("* in case of failure forward the draft along with the failure notice to the sender") },
   {"noforward",     ARG_NOFORWARD,     NULL, OPTION_HIDDEN, "" },
   {"mime",          ARG_MIME,          N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("* Use MIME encapsulation") },
+   N_("* use MIME encapsulation") },
   {"nomime",        ARG_NOMIME,        NULL, OPTION_HIDDEN, "" },
   {"msgid",         ARG_MSGID,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Add Message-ID: field") },
+   N_("add Message-ID: field") },
   {"nomsgid",       ARG_NOMSGID,       NULL, OPTION_HIDDEN, ""},
   {"push",          ARG_PUSH,          N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Run in the backround.") },
+   N_("run in the backround") },
   {"nopush",        ARG_NOPUSH,        NULL, OPTION_HIDDEN, "" },
   {"preserve",      ARG_PRESERVE,      N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Keep draft files") },
+   N_("keep draft files") },
   {"keep",          0, NULL, OPTION_ALIAS, NULL},
   {"split",         ARG_SPLIT,         N_("SECONDS"), 0,
-   N_("Split the draft into several partial messages and send them with SECONDS interval") },
+   N_("split the draft into several partial messages and send them with SECONDS interval") },
   {"chunksize",     ARG_CHUNKSIZE,     N_("NUMBER"), 0,
-   N_("Set the size of chunk for --split (in bytes)") },
+   N_("set the size of chunk for --split (in bytes)") },
   {"verbose",       ARG_VERBOSE,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Print the transcript of interactions with the transport system") },
+   N_("print the transcript of interactions with the transport system") },
   {"noverbose",     ARG_NOVERBOSE,     NULL, OPTION_HIDDEN, "" },
   {"watch",         ARG_WATCH,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Monitor the delivery of mail") },
+   N_("monitor the delivery of mail") },
   {"nowatch",       ARG_NOWATCH,       NULL, OPTION_HIDDEN, "" },
   {"width",         ARG_WIDTH,         N_("NUMBER"), 0,
-   N_("* Make header fields no longer than NUMBER columns") },
+   N_("* make header fields no longer than NUMBER columns") },
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
   { 0 }
 };
 
@@ -610,7 +610,7 @@ backup_file (const char *file_name)
   WATCH ((_("Renaming %s to %s"), file_name, new_name));
 
   if (unlink (new_name) && errno != ENOENT)
-    mu_error (_("cannot unlink file `%s': %s"), new_name, mu_strerror (errno));
+    mu_diag_funcall (MU_DIAG_ERROR, "unlink", new_name, errno);
   else if (rename (file_name, new_name))
     mu_error (_("cannot rename `%s' to `%s': %s"),
 	      file_name, new_name, mu_strerror (errno));
diff --git a/mh/sortm.c b/mh/sortm.c
index 17e1de0..7649e2e 100644
--- a/mh/sortm.c
+++ b/mh/sortm.c
@@ -35,49 +35,49 @@ static char args_doc[] = N_("[msgs]");
 /* GNU options */
 static struct argp_option options[] = {
   {"folder",        ARG_FOLDER,        N_("FOLDER"), 0,
-   N_("Specify folder to operate upon")},
+   N_("specify folder to operate upon")},
 
   {N_("Setting sort keys:"), 0,  NULL, OPTION_DOC,  NULL, 0},
   {"datefield",     ARG_DATEFIELD,     N_("STRING"), 0,
-   N_("Sort on the date field (default `Date:')"), 10},
+   N_("sort on the date field (default `Date:')"), 10},
   {"nodatefield",   ARG_NODATEFIELD,   NULL,       0,
-   N_("Undo the effect of the last --datefield option"), 10},
+   N_("undo the effect of the last --datefield option"), 10},
   {"limit",         ARG_LIMIT,         N_("DAYS"), 0,
-   N_("Consider two datefields equal if their difference lies within the given nuber of DAYS."), 11},
+   N_("consider two datefields equal if their difference lies within the given nuber of DAYS."), 11},
   {"nolimit",       ARG_NOLIMIT,       NULL,       0,
-   N_("Undo the effect of the last --limit option"), 11},
+   N_("undo the effect of the last --limit option"), 11},
   {"textfield",     ARG_TEXTFIELD,     N_("STRING"), 0,
-   N_("Sort on the text field"), 15},
+   N_("sort on the text field"), 15},
   {"notextfield",   ARG_NOTEXTFIELD,   NULL,       0,
-   N_("Undo the effect of the last --textfield option"), 15},
+   N_("undo the effect of the last --textfield option"), 15},
   {"numfield",      ARG_NUMFIELD,      N_("STRING"), 0,
-   N_("Sort on the numeric field"), 16},
+   N_("sort on the numeric field"), 16},
   
   {N_("Actions:"), 0,  NULL, OPTION_DOC,  NULL, 16},
   {"reorder", ARG_REORDER,    0, 0,
-   N_("Reorder the messages (default)"), 20 },
+   N_("reorder the messages (default)"), 20 },
   {"dry-run", ARG_DRY_RUN,    0, 0,
-   N_("Do not do anything, only show what would have been done"), 20 },
+   N_("do not do anything, only show what would have been done"), 20 },
   {"list",    ARG_LIST,   0, 0,
-   N_("List the sorted messages"), 20 },
+   N_("list the sorted messages"), 20 },
   {"form",    ARG_FORM, N_("FILE"),   0,
-   N_("Read format from given file"), 23},
+   N_("read format from given file"), 23},
   {"format",  ARG_FORMAT, N_("FORMAT"), 0,
-   N_("Use this format string"), 23},
+   N_("use this format string"), 23},
 
   {"verbose",       ARG_VERBOSE,       N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Verbosely list executed actions"), 30 },
+   N_("verbosely list executed actions"), 30 },
   {"noverbose",     ARG_NOVERBOSE,     NULL, OPTION_HIDDEN, "" },
 
   {N_("Select sort algorithm:"), 0,  NULL, OPTION_DOC,  NULL, 30},
 
   {"shell",     ARG_SHELL,      0, 0,
-   N_("Use shell algorithm"), 40 },
+   N_("use shell algorithm"), 40 },
   {"quicksort", ARG_QUICKSORT,  0, 0,
-   N_("Use quicksort algorithm (default)"), 40 },
+   N_("use quicksort algorithm (default)"), 40 },
 
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   { NULL },
 };
diff --git a/mh/whatnow.c b/mh/whatnow.c
index 55964ae..aa3f07a 100644
--- a/mh/whatnow.c
+++ b/mh/whatnow.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008, 2009 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
@@ -27,17 +27,17 @@ static char args_doc[] = N_("[FILE]");
 /* GNU options */
 static struct argp_option options[] = {
   {"draftfolder", ARG_DRAFTFOLDER, N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts")},
+   N_("specify the folder for message drafts")},
   {"nodraftfolder", ARG_NODRAFTFOLDER, 0, 0,
-   N_("Undo the effect of the last --draftfolder option")},
+   N_("undo the effect of the last --draftfolder option")},
   {"draftmessage" , ARG_DRAFTMESSAGE, N_("MSG"), 0,
-   N_("Invoke the draftmessage facility")},
-  {"editor",  ARG_EDITOR, N_("PROG"), 0, N_("Set the editor program to use")},
-  {"noedit", ARG_NOEDIT, 0, 0, N_("Suppress the initial edit")},
-  {"prompt", ARG_PROMPT, N_("STRING"), 0, N_("Set the prompt")},
+   N_("invoke the draftmessage facility")},
+  {"editor",  ARG_EDITOR, N_("PROG"), 0, N_("set the editor program to use")},
+  {"noedit", ARG_NOEDIT, 0, 0, N_("suppress the initial edit")},
+  {"prompt", ARG_PROMPT, N_("STRING"), 0, N_("set the prompt")},
 
   {"license", ARG_LICENSE, 0,      0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   { NULL }
 };
diff --git a/mh/whom.c b/mh/whom.c
index 06ed577..689e91a 100644
--- a/mh/whom.c
+++ b/mh/whom.c
@@ -1,5 +1,5 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
-   Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2008, 2009 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
@@ -26,21 +26,21 @@ static char args_doc[] = "[file]";
 /* GNU options */
 static struct argp_option options[] = {
   {"alias",         ARG_ALIAS,         N_("FILE"), 0,
-   N_("Specify additional alias file") },
+   N_("specify additional alias file") },
   {"draft",         ARG_DRAFT,         NULL, 0,
-   N_("Use prepared draft") },
+   N_("use prepared draft") },
   {"draftfolder",   ARG_DRAFTFOLDER,   N_("FOLDER"), 0,
-   N_("Specify the folder for message drafts") },
+   N_("specify the folder for message drafts") },
   {"draftmessage",  ARG_DRAFTMESSAGE,  NULL, 0,
-   N_("Treat the arguments as a list of messages from the draftfolder") },
+   N_("treat the arguments as a list of messages from the draftfolder") },
   {"nodraftfolder", ARG_NODRAFTFOLDER, NULL, 0,
-   N_("Undo the effect of the last --draftfolder option") },
+   N_("undo the effect of the last --draftfolder option") },
   {"check",         ARG_CHECK,         N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Check if addresses are deliverable") },
+   N_("check if addresses are deliverable") },
   {"nocheck",       ARG_NOCHECK,       NULL, OPTION_HIDDEN, "" },
 
   {"license",       ARG_LICENSE,       0,    0,
-   N_("Display software license"), -1},
+   N_("display software license"), -1},
 
   {NULL}
 };
diff --git a/mimeview/mimeview.c b/mimeview/mimeview.c
index 7745bd8..78e98cc 100644
--- a/mimeview/mimeview.c
+++ b/mimeview/mimeview.c
@@ -43,18 +43,18 @@ N_("\n\nDebug flags are:\n\
 
 static struct argp_option options[] = {
   {"no-ask", 'a', N_("TYPE-LIST"), OPTION_ARG_OPTIONAL,
-   N_("Do not ask for confirmation before displaying files. If TYPE-LIST is given, do not ask for confirmation before displaying such files whose MIME type matches one of the patterns from TYPE-LIST"), 0},
+   N_("do not ask for confirmation before displaying files, or, if TYPE-LIST is given, do not ask for confirmation before displaying such files whose MIME type matches one of the patterns from TYPE-LIST"), 0},
   {"no-interactive", 'h', NULL, 0,
-   N_("Disable interactive mode"), 0 },
+   N_("disable interactive mode"), 0 },
   {"print", 0, NULL, OPTION_ALIAS, NULL, 0 },
   {"debug",  'd', N_("FLAGS"),  OPTION_ARG_OPTIONAL,
-   N_("Enable debugging output"), 0},
+   N_("enable debugging output"), 0},
   {"mimetypes", 't', N_("FILE"), 0,
-   N_("Use this mime.types file"), 0},
+   N_("use this mime.types file"), 0},
   {"dry-run", 'n', NULL, 0,
-   N_("Do not do anything, just print what whould be done"), 0},
+   N_("do not do anything, just print what whould be done"), 0},
   {"metamail", OPT_METAMAIL, N_("FILE"), OPTION_ARG_OPTIONAL,
-   N_("Use metamail to display files"), 0},
+   N_("use metamail to display files"), 0},
   {0, 0, 0, 0}
 };
 
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 8b01a92..1f0d2a0 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -40,17 +40,17 @@ static char args_doc[] = N_("inbox-url destfile [POP-password]");
 #define OPT_EMACS 256
 
 static struct argp_option options[] = {
-  { "preserve", 'p', NULL, 0, N_("Preserve the source mailbox") },
+  { "preserve", 'p', NULL, 0, N_("preserve the source mailbox") },
   { "keep-messages", 0, NULL, OPTION_ALIAS, NULL },
-  { "reverse",  'r', NULL, 0, N_("Reverse the sorting order") },
+  { "reverse",  'r', NULL, 0, N_("reverse the sorting order") },
   { "emacs", OPT_EMACS, NULL, 0,
-    N_("Output information used by Emacs rmail interface") },
+    N_("output information used by Emacs rmail interface") },
   { "uidl", 'u', NULL, 0,
-    N_("Use UIDLs to avoid downloading the same message twice") },
+    N_("use UIDLs to avoid downloading the same message twice") },
   { "verbose", 'v', NULL, 0,
-    N_("Increase verbosity level") },
+    N_("increase verbosity level") },
   { "owner", 'P', N_("MODELIST"), 0,
-    N_("Control mailbox ownership") },
+    N_("control mailbox ownership") },
   { NULL,      0, NULL, 0, NULL, 0 }
 };
 
@@ -431,7 +431,7 @@ move_message (mu_mailbox_t src, mu_mailbox_t dst, size_t msgno)
     }
   if ((rc = mu_mailbox_append_message (dst, msg)) != 0)
     {
-      mu_error (_("cannot append message %lu: %s\n"),
+      mu_error (_("cannot append message %lu: %s"),
 		(unsigned long) msgno, mu_strerror (rc));
       return rc;
     }
@@ -498,8 +498,7 @@ get_mbox_owner_id (mu_mailbox_t mbox, mu_url_t url, struct user_id *id)
 	die (mbox, _("cannot get path"), rc);
       if (stat (s, &st))
 	{
-	  mu_error (_("cannot stat mailbox `%s': %s"), s,
-		    mu_strerror (errno));
+	  mu_diag_funcall (MU_DIAG_ERROR, "stat", s, errno);
 	  exit (1);
 	}
       id->uid = st.st_uid;
@@ -551,7 +550,10 @@ guess_mbox_owner (mu_mailbox_t mbox, struct user_id *id)
   
   rc = mu_mailbox_get_url (mbox, &url);
   if (rc)
-    die (mbox, _("cannot get url"), rc);
+    {
+      mu_diag_funcall (MU_DIAG_ERROR, "mu_mailbox_get_url", NULL, rc);
+      exit (1);
+    }
 
   rc = 1;
   for (meth = so_methods; rc == 1 && meth < so_methods + so_method_num; meth++)
@@ -772,7 +774,7 @@ main (int argc, char **argv)
 	  if (src_uidl_list && !msgno_in_list (src_uidl_list, i))
 	    {
 	      if (verbose_option > 1)
-		mu_diag_output (MU_DIAG_INFO, _("Ignoring message %lu"),
+		mu_diag_output (MU_DIAG_INFO, _("ignoring message %lu"),
 				(unsigned long) i);
 	      continue;
 	    }
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index 9605ecb..c1f68be 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.c
@@ -67,41 +67,41 @@ static char doc[] = N_("GNU pop3d -- the POP3 daemon");
 
 static struct argp_option options[] = {
 #define GRP 0
-  { "foreground", OPT_FOREGROUND, 0, 0, N_("Remain in foreground."), GRP+1},
-  { "inetd",  'i', 0, 0, N_("Run in inetd mode"), GRP+1},
+  { "foreground", OPT_FOREGROUND, 0, 0, N_("remain in foreground"), GRP+1},
+  { "inetd",  'i', 0, 0, N_("run in inetd mode"), GRP+1},
   { "daemon", 'd', N_("NUMBER"), OPTION_ARG_OPTIONAL,
-    N_("Runs in daemon mode with a maximum of NUMBER children"), GRP+1 },
+    N_("runs in daemon mode with a maximum of NUMBER children"), GRP+1 },
 #undef GRP
 
 #define GRP 5
   {"undelete", 'u', NULL, OPTION_HIDDEN,
-   N_("Undelete all messages on startup"), GRP+1},
+   N_("undelete all messages on startup"), GRP+1},
   {"expire", OPT_EXPIRE, N_("DAYS"), OPTION_HIDDEN,
-   N_("Expire read messages after the given number of days"), GRP+1},
+   N_("expire read messages after the given number of days"), GRP+1},
   {"delete-expired", OPT_EXPIRE_ON_EXIT, NULL, OPTION_HIDDEN,
-   N_("Delete expired messages upon closing the mailbox"), GRP+1},
+   N_("delete expired messages upon closing the mailbox"), GRP+1},
 #ifdef WITH_TLS
   {"tls-required", OPT_TLS_REQUIRED, NULL, OPTION_HIDDEN,
-   N_("Always require STLS before entering authentication phase")},
+   N_("always require STLS before entering authentication phase")},
 #endif
 #undef GRP
   
 #define GRP 10
 #ifdef ENABLE_LOGIN_DELAY
   {"login-delay", OPT_LOGIN_DELAY, N_("SECONDS"), OPTION_HIDDEN,
-   N_("Allowed delay between two successive logins"), GRP+1},
+   N_("allowed delay between two successive logins"), GRP+1},
   {"stat-file", OPT_STAT_FILE, N_("FILENAME"), OPTION_HIDDEN,
-   N_("Name of login statistics file"), GRP+1},
+   N_("name of login statistics file"), GRP+1},
 #endif
   
 #undef GRP
 
 #define GRP 20
   { "bulletin-source", OPT_BULLETIN_SOURCE, N_("MBOX"), OPTION_HIDDEN,
-    N_("Set source mailbox to get bulletins from"), GRP+1 },
+    N_("set source mailbox to get bulletins from"), GRP+1 },
 #ifdef USE_DBM
   { "bulletin-db", OPT_BULLETIN_DB, N_("FILE"), OPTION_HIDDEN,
-    N_("Set the bulletin database file name"), GRP+1 },
+    N_("set the bulletin database file name"), GRP+1 },
 #endif
 #undef GRP
   
@@ -459,9 +459,8 @@ main (int argc, char **argv)
             }
           else
             {
-	       mu_error (_("error getting mail group: %s"), 
-                         mu_strerror (errno));
-	       exit (EX_OSERR);
+	      mu_diag_funcall (MU_DIAG_ERROR, "getgrnam", "mail", errno);
+	      exit (EX_OSERR);
             }
 	}
 
diff --git a/pop3d/popauth.c b/pop3d/popauth.c
index f9f71f2..4c52512 100644
--- a/pop3d/popauth.c
+++ b/pop3d/popauth.c
@@ -68,11 +68,11 @@ void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) =
 static struct argp_option options[] = 
 {
   { NULL, 0, NULL, 0, N_("Actions are:"), 1 },
-  { "add", 'a', 0, 0, N_("Add user"), 1 },
-  { "modify", 'm', 0, 0, N_("Modify user's record (change password)"), 1 },
-  { "delete", 'd', 0, 0, N_("Delete user's record"), 1 },
-  { "list", 'l', 0, 0, N_("List the contents of DBM file"), 1 },
-  { "create", 'c', 0, 0, N_("Create the DBM from a plaintext file"), 1 },
+  { "add", 'a', 0, 0, N_("add user"), 1 },
+  { "modify", 'm', 0, 0, N_("modify user's record (change password)"), 1 },
+  { "delete", 'd', 0, 0, N_("delete user's record"), 1 },
+  { "list", 'l', 0, 0, N_("list the contents of DBM file"), 1 },
+  { "create", 'c', 0, 0, N_("create the DBM from a plaintext file"), 1 },
 
   { NULL, 0, NULL, 0,
     N_("Default action is:\n"
@@ -80,11 +80,11 @@ static struct argp_option options[] =
     "  For a user: --modify --username <username>\n"), 2 },
   
   { NULL, 0, NULL, 0, N_("Options are:"), 3 },
-  { "file", 'f', N_("FILE"), 0, N_("Read input from FILE (default stdin)"), 3 },
-  { "output", 'o', N_("FILE"), 0, N_("Direct output to file"), 3 },
-  { "password", 'p', N_("STRING"), 0, N_("Specify user's password"), 3 },
-  { "user", 'u', N_("USERNAME"), 0, N_("Specify user name"), 3 },
-  { "permissions", 'P', N_("PERM"), 0, N_("Force given permissions on the database"), 3 },
+  { "file", 'f', N_("FILE"), 0, N_("read input from FILE (default stdin)"), 3 },
+  { "output", 'o', N_("FILE"), 0, N_("direct output to file"), 3 },
+  { "password", 'p', N_("STRING"), 0, N_("specify user's password"), 3 },
+  { "user", 'u', N_("USERNAME"), 0, N_("specify user name"), 3 },
+  { "permissions", 'P', N_("PERM"), 0, N_("force given permissions on the database"), 3 },
   { NULL, }
 };
 
@@ -294,7 +294,7 @@ action_list (struct action_data *ap)
       fp = fopen (ap->output_name, "w");
       if (!fp)
 	{
-	  mu_error (_("Cannot create file %s: %s"), ap->output_name, mu_strerror (errno));
+	  mu_error (_("cannot create file %s: %s"), ap->output_name, mu_strerror (errno));
 	  return 1;
 	}
     }
@@ -375,7 +375,7 @@ action_create (struct action_data *ap)
     ap->output_name = APOP_PASSFILE;
   if (mu_dbm_open (ap->output_name, &db, MU_STREAM_CREAT, permissions))
     {
-      mu_error (_("Cannot create %s: %s"), ap->output_name, mu_strerror (errno));
+      mu_error (_("cannot create database %s: %s"), ap->output_name, mu_strerror (errno));
       return 1;
     }
 
diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
index 7d2ad35..5b5bd0c 100644
--- a/readmsg/readmsg.c
+++ b/readmsg/readmsg.c
@@ -39,15 +39,15 @@ static error_t readmsg_parse_opt  (int key, char *arg, struct argp_state *astate
 
 static struct argp_option options[] = 
 {
-  { "debug", 'd', 0, 0, N_("Display debugging information"), 1 },
-  { "header", 'h', 0, 0, N_("Display entire header"), 1 },
+  { "debug", 'd', 0, 0, N_("display debugging information"), 1 },
+  { "header", 'h', 0, 0, N_("display entire header"), 1 },
   { "weedlist", 'w', N_("LIST"), 0,
-    N_("List of header names separated by whitespace or commas"), 1 },
-  { "folder", 'f', N_("FOLDER"), 0, N_("Folder to use"), 1 },
-  { "no-header", 'n', 0, 0, N_("Exclude all headers"), 1 },
-  { "form-feeds", 'p', 0, 0, N_("Output formfeeds between messages"), 1 },
+    N_("list of header names separated by whitespace or commas"), 1 },
+  { "folder", 'f', N_("FOLDER"), 0, N_("folder to use"), 1 },
+  { "no-header", 'n', 0, 0, N_("exclude all headers"), 1 },
+  { "form-feeds", 'p', 0, 0, N_("output formfeeds between messages"), 1 },
   { "show-all-match", 'a', NULL, 0,
-    N_("Print all messages matching pattern, not only the first"), 1 },
+    N_("print all messages matching pattern, not only the first"), 1 },
   {0, 0, 0, 0}
 };
 
diff --git a/sieve/sieve.c b/sieve/sieve.c
index 4f848f1..8fe5677 100644
--- a/sieve/sieve.c
+++ b/sieve/sieve.c
@@ -68,37 +68,37 @@ N_("Debug flags:\n\
 static struct argp_option options[] =
 {
   {"no-actions", 'n', 0, 0,
-   N_("Do not execute any actions, just print what would be done"), 0},
+   N_("do not execute any actions, just print what would be done"), 0},
   {"dry-run", 0, NULL, OPTION_ALIAS, NULL },
   {"keep-going", 'k', 0, 0,
-   N_("Keep on going if execution fails on a message"), 0},
+   N_("keep on going if execution fails on a message"), 0},
 
   {"compile-only", 'c', 0, 0,
-   N_("Compile script and exit"), 0},
+   N_("compile script and exit"), 0},
 
   {"dump", 'D', 0, 0,
-   N_("Compile script, dump disassembled sieve code to terminal and exit"), 0 },
+   N_("compile script, dump disassembled sieve code to terminal and exit"), 0 },
   
   {"mbox-url", 'f', N_("MBOX"), 0,
-   N_("Mailbox to sieve (defaults to user's mail spool)"), 0},
+   N_("mailbox to sieve (defaults to user's mail spool)"), 0},
 
   {"ticket", 't', N_("TICKET"), 0,
-   N_("Ticket file for user authentication"), 0},
+   N_("ticket file for user authentication"), 0},
 
   {"debug", 'd', N_("FLAGS"), OPTION_ARG_OPTIONAL,
-   N_("Debug flags (defaults to \"" D_DEFAULT "\")"), 0},
+   N_("debug flags (defaults to \"" D_DEFAULT "\")"), 0},
 
   {"verbose", 'v', NULL, 0,
-   N_("Log all actions"), 0},
+   N_("log all actions"), 0},
 
   {"line-info", ARG_LINE_INFO, N_("BOOL"), OPTION_ARG_OPTIONAL,
-   N_("Print source location along with action logs (default)") },
+   N_("print source location along with action logs (default)") },
    
   {"email", 'e', N_("ADDRESS"), 0,
-   N_("Override user email address"), 0},
+   N_("override user email address"), 0},
 
   {"no-program-name", ARG_NO_PROGRAM_NAME, NULL, 0,
-   N_("Do not prefix diagnostic messages with the program name"), 0},
+   N_("do not prefix diagnostic messages with the program name"), 0},
   
   {0}
 };


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Tue Aug 25 15:04:58 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mg1KE-00057W-Ja
	for mharc-commit-mailutils@gnu.org; Tue, 25 Aug 2009 15:04:58 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mg1KC-00056j-72
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 15:04:56 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mg1KB-00056K-9L
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 15:04:55 -0400
Received: from [199.232.76.173] (port=40912 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mg1KB-00056D-4N
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 15:04:55 -0400
Received: from savannah.gnu.org ([199.232.41.3]:44414 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mg1K8-0000kq-P3
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 15:04:53 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mg1K8-0001ew-9N
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 19:04:52 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mg1K7-0001eQ-OK
	for commit-mailutils@gnu.org; Tue, 25 Aug 2009 19:04:52 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2141acfb58732dab8cdb6ffff18550c0ebf016b5
X-Git-Newrev: 9813be458d631d21b05164e794a9ab335eb00c96
Message-Id: <E1Mg1K7-0001eQ-OK@cvs.savannah.gnu.org>
Date: Tue, 25 Aug 2009 19:04:51 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-331-g9813be4
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Aug 2009 19:04: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=9813be458d631d21b05164e794a9ab335eb00c96

The branch, master has been updated
       via  9813be458d631d21b05164e794a9ab335eb00c96 (commit)
      from  2141acfb58732dab8cdb6ffff18550c0ebf016b5 (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 9813be458d631d21b05164e794a9ab335eb00c96
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Tue Aug 25 20:44:24 2009 +0300

    Minor improvements in comsat and frm
    
    * comsat/action.c (action_exec): Remove `line' argument.
    Do not explicitly add locus to the messages.
    (run_user_action): Add locus to diagnostics mu_debug_t,
    so it is prepended to all diagnostic messages automatically.
    * comsat/comsat.c: Improve help output
    * frm/frm.c (attr_help): Remove unnecessary variable.

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

Summary of changes:
 comsat/action.c |   33 +++++++++++++++++++++------------
 comsat/comsat.c |    3 ++-
 frm/frm.c       |   17 ++++++++---------
 3 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/comsat/action.c b/comsat/action.c
index 74baf18..cea5473 100644
--- a/comsat/action.c
+++ b/comsat/action.c
@@ -18,6 +18,7 @@
    MA 02110-1301 USA */
 
 #include "comsat.h"
+#include <mailutils/io.h>
 #define obstack_chunk_alloc malloc
 #define obstack_chunk_free free
 #include <obstack.h>
@@ -287,35 +288,32 @@ action_echo (FILE *tty, const char *cr, int omit_newline,
 }
 
 static void
-action_exec (FILE *tty, int line, int argc, char **argv)
+action_exec (FILE *tty, int argc, char **argv)
 {
   pid_t pid;
   struct stat stb;
 
   if (argc == 0)
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: no arguments for exec"), username, line);
+      mu_diag_output (MU_DIAG_ERROR, _("no arguments for exec"));
       return;
     }
 
   if (argv[0][0] != '/')
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: not an absolute pathname"),
-	      username, line);
+      mu_diag_output (MU_DIAG_ERROR, _("not an absolute pathname: %s"), argv[0]);
       return;
     }
 
   if (stat (argv[0], &stb))
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: cannot stat %s: %s"),
-	      username, line, argv[0], strerror (errno));
+      mu_diag_funcall (MU_DIAG_ERROR, "stat", argv[0], errno);
       return;
     }
 
   if (stb.st_mode & (S_ISUID|S_ISGID))
     {
-      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: will not execute set[ug]id programs"),
-	      username, line);
+      mu_diag_output (MU_DIAG_ERROR, _("will not execute set[ug]id programs"));
       return;
     }
 
@@ -374,7 +372,15 @@ run_user_action (FILE *tty, const char *cr, mu_message_t msg)
   if (fp)
     {
       unsigned line = 1, n;
-
+      mu_debug_t debug;
+      char *cwd = mu_getcwd ();
+      char *rcname;
+
+      mu_asprintf (&rcname, "%s/%s", cwd, BIFF_RC);
+      free (cwd);
+      
+      mu_diag_get_debug (&debug);
+      
       while ((n = act_getline (fp, &stmt, &size)))
 	{
 	  int argc;
@@ -384,6 +390,7 @@ run_user_action (FILE *tty, const char *cr, mu_message_t msg)
 	      && argc
 	      && argv[0][0] != '#')
 	    {
+	      mu_debug_set_locus (debug, rcname, line);
 	      if (strcmp (argv[0], "beep") == 0)
 		{
 		  /* FIXME: excess arguments are ignored */
@@ -412,15 +419,15 @@ run_user_action (FILE *tty, const char *cr, mu_message_t msg)
 		    }
 		  else if (strcmp (argv[0], "exec") == 0)
 		    {
-		      action_exec (tty, line, argc - 1, argv + 1);
+		      action_exec (tty, argc - 1, argv + 1);
 		      nact++;
 		    }
 		  else
 		    {
 		      fprintf (tty, _(".biffrc:%d: unknown keyword"), line);
 		      fprintf (tty, "\r\n");
-		      mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: unknown keyword %s"),
-			      username, line, argv[0]);
+		      mu_diag_output (MU_DIAG_ERROR, _("unknown keyword %s"),
+				      argv[0]);
 		      break;
 		    }
 		} 
@@ -429,6 +436,8 @@ run_user_action (FILE *tty, const char *cr, mu_message_t msg)
 	  line += n;
 	}
       fclose (fp);
+      mu_debug_set_locus (debug, NULL, 0);
+      free (rcname);
     }
 
   if (nact == 0)
diff --git a/comsat/comsat.c b/comsat/comsat.c
index 725685f..66dd429 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -55,6 +55,7 @@ typedef struct utmp UTMP;
 
 const char *program_version = "comsatd (" PACKAGE_STRING ")";
 static char doc[] = "GNU comsatd";
+static char args_doc[] = N_("\n--test MBOX-URL MSG-QID");
 
 #define OPT_FOREGROUND 256
 
@@ -77,7 +78,7 @@ static error_t comsatd_parse_opt (int key, char *arg,
 static struct argp argp = {
   options,
   comsatd_parse_opt,
-  NULL, 
+  args_doc, 
   doc,
   NULL,
   NULL, NULL
diff --git a/frm/frm.c b/frm/frm.c
index 30483e8..a4dc096 100644
--- a/frm/frm.c
+++ b/frm/frm.c
@@ -46,13 +46,6 @@ static struct attr_tab {
   { NULL }
 };
 
-static char attr_help[] =
-/* TRANSLATORS: Please do *not* translate the words "new", "unread",
-   "old" and "read". They are keywords. */
-N_("select messages with the specific attribute: \
-new, unread, old (same as unread) or read (or any unambiguous \
-abbreviation of these)");
-
 
 /* Attribute table handling */
 
@@ -127,10 +120,16 @@ static struct argp_option options[] = {
   {"field",  'f', N_("NAME"), 0, N_("header field to display"), 0},
   {"to",     'l', NULL,   0, N_("include the To: information"), 0},
   {"number", 'n', NULL,   0, N_("display message numbers"), 0},
-  {"Quiet",  'Q', NULL,   0, N_("very quiet"), 0},
+  {"Quiet",  'Q', NULL,   0, N_("do not display headers"), 0},
   {"query",  'q', NULL,   0, N_("print a message if the mailbox contains some unread mail"), 0},
   {"summary",'S', NULL,   0, N_("print a summary of messages"), 0},
-  {"status", 's', N_("STATUS"), 0, attr_help, 0},
+  {"status", 's', N_("STATUS"), 0,
+   /* TRANSLATORS: Please do *not* translate the words "new", "unread",
+      "old" and "read". They are keywords. */
+   N_("select messages with the specific attribute:"
+      " new, unread, old (same as unread) or read (or any unambiguous"
+      " abbreviation of these)"),
+   0},
   {"align",  't', NULL,   0, N_("tidy mode: align subject lines"), 0},
   {0, 0, 0, 0}
 };


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Thu Aug 27 02:50:24 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MgYoS-0007uN-07
	for mharc-commit-mailutils@gnu.org; Thu, 27 Aug 2009 02:50:24 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MgYoP-0007s4-Nv
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 02:50:21 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MgYoP-0007r2-1f
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 02:50:21 -0400
Received: from [199.232.76.173] (port=51272 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MgYoO-0007qv-Rd
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 02:50:20 -0400
Received: from savannah.gnu.org ([199.232.41.3]:41981 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MgYoO-0004FU-7z
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 02:50:20 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MgYoM-0008Vt-R6
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 06:50:18 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MgYoL-0008V5-GA
	for commit-mailutils@gnu.org; Thu, 27 Aug 2009 06:50:18 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a3519f8454a5e24d36ccac06a4da2b5b88a66232
X-Git-Newrev: 6ee5f7c3a24fddc05fe172543bb78ce4b6c5acf3
Message-Id: <E1MgYoL-0008V5-GA@cvs.savannah.gnu.org>
Date: Thu, 27 Aug 2009 06:50:17 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-334-g6ee5f7c
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Aug 2009 06:50:22 -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=6ee5f7c3a24fddc05fe172543bb78ce4b6c5acf3

The branch, master has been updated
       via  6ee5f7c3a24fddc05fe172543bb78ce4b6c5acf3 (commit)
       via  75fd61273a89b647ded20182011d66fc33bb5743 (commit)
      from  a3519f8454a5e24d36ccac06a4da2b5b88a66232 (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 6ee5f7c3a24fddc05fe172543bb78ce4b6c5acf3
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 27 09:49:31 2009 +0300

    Improve configure script.
    
    * configure.ac: New option --with-pythondir
    (PYTHON_SITE_DIR, PYTHON_EXEC_DIR): New subst variables.
    * python/libmu_py/Makefile.am: use pythonexec_LTLIBRARIES,
    instead of pythonexec_LTLIBRARIES.
    (pythonexecdir): New variable.
    * python/mailutils/Makefile.am: use pythonsite_PYTHON,
    instead of pkgpython_PYTHON.
    (pythonsitedir): New variable.

commit 75fd61273a89b647ded20182011d66fc33bb5743
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Thu Aug 27 09:45:07 2009 +0300

    Fix leftover diagnostic messages.
    
    * movemail/movemail.c (_cb_mailbox_ownership): Fix
    leftover diagnostic messages.
    * config/mailutils-config.c (options): Fix typo.

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

Summary of changes:
 config/mailutils-config.c    |    2 +-
 configure.ac                 |   12 ++++++++++++
 movemail/movemail.c          |    4 ++--
 python/libmu_py/Makefile.am  |    5 +++--
 python/mailutils/Makefile.am |    3 ++-
 5 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/config/mailutils-config.c b/config/mailutils-config.c
index c5007a9..e308227 100644
--- a/config/mailutils-config.c
+++ b/config/mailutils-config.c
@@ -37,7 +37,7 @@ static struct argp_option options[] = {
       "mbox, mh, maildir, mailer, imap, pop, sieve and all"), 0},
   {"info", 'i', NULL, 0,
    N_("print a list of configuration options used to build mailutils; "
-      "oprional arguments are interpreted as a list of configuration "
+      "optional arguments are interpreted as a list of configuration "
       "options to check for"), 0},
   {"verbose", 'v', NULL, 0,
    N_("increase output verbosity"), 0},
diff --git a/configure.ac b/configure.ac
index 513a373..20b7291 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1136,6 +1136,18 @@ if test "$status_python" = yes; then
     if test "$status_python" = yes; then
       AC_DEFINE(WITH_PYTHON,1,[Enable Python support])
       MU_LIB_PY='${top_builddir}/python/libmu_py/libmu_py.la'
+      AC_SUBST([PYTHON_SITE_DIR])
+      AC_SUBST([PYTHON_EXEC_DIR])
+      AC_ARG_WITH([pythondir],
+           AC_HELP_STRING([--with-pythondir=DIR],
+                          [Specify the directory to install Python modules to]),
+           [case $withval in
+            /*)  PYTHON_SITE_DIR="${withval}/mailutils"
+	         PYTHON_EXEC_DIR="${withval}/mailutils";;
+            *)   AC_MSG_ERROR([Argument to --with-pythondir must be an absolute directory name]);;
+            esac],
+	   [PYTHON_SITE_DIR='$(pkgpythondir)'
+	    PYTHON_EXEC_DIR='$(pkgpyexecdir)'])
     fi
   fi
 fi
diff --git a/movemail/movemail.c b/movemail/movemail.c
index 1f0d2a0..89c083d 100644
--- a/movemail/movemail.c
+++ b/movemail/movemail.c
@@ -195,7 +195,7 @@ _cb_mailbox_ownership (mu_debug_t debug, const char *str)
 	  if (!str[len])
 	    {
 	      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-				   _("Ownership method %s requires value"),
+				   _("ownership method %s requires value"),
 				   str);
 	      return 1;
 	    }
@@ -231,7 +231,7 @@ _cb_mailbox_ownership (mu_debug_t debug, const char *str)
 	  if (!str[len])
 	    {
 	      mu_cfg_format_error (debug, MU_DEBUG_ERROR, 
-				   _("Ownership method %s requires value"),
+				   _("ownership method %s requires value"),
 				   str);
 	      return 1;
 	    }
diff --git a/python/libmu_py/Makefile.am b/python/libmu_py/Makefile.am
index ed11295..5f4238d 100644
--- a/python/libmu_py/Makefile.am
+++ b/python/libmu_py/Makefile.am
@@ -63,7 +63,8 @@ libmu_py_la_LIBADD = $(PYTHON_LIBS) @MU_COMMON_LIBRARIES@ \
  @MU_AUTHLIBS@\
  ${MU_LIB_MAILUTILS}
 
-pkgpyexec_LTLIBRARIES = c_api.la
-c_api_la_LDFLAGS = -avoid-version -module -rpath $(pkgpyexecdir)
+pythonexecdir=@PYTHON_EXEC_DIR@
+pythonexec_LTLIBRARIES = c_api.la
+c_api_la_LDFLAGS = -avoid-version -module -rpath $(pythonexecdir)
 c_api_la_LIBADD = $(PYTHON_LIBS) ${MU_LIB_PY}
 c_api_la_SOURCES = c_api.c
diff --git a/python/mailutils/Makefile.am b/python/mailutils/Makefile.am
index 080db67..61a7f8e 100644
--- a/python/mailutils/Makefile.am
+++ b/python/mailutils/Makefile.am
@@ -17,7 +17,8 @@
 ##   Foundation, Inc.  51 Franklin Street, Fifth Floor, Boston, MA
 ##   02110-1301 USA
 
-pkgpython_PYTHON=\
+pythonsitedir=@PYTHON_SITE_DIR@
+pythonsite_PYTHON=\
  __init__.py \
  error.py \
  address.py \


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Fri Aug 28 02:40:11 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mgv87-00027M-QT
	for mharc-commit-mailutils@gnu.org; Fri, 28 Aug 2009 02:40:11 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mgv85-00027C-PK
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 02:40:09 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mgv84-000270-DE
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 02:40:09 -0400
Received: from [199.232.76.173] (port=44105 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mgv84-00026x-6S
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 02:40:08 -0400
Received: from savannah.gnu.org ([199.232.41.3]:47903 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1Mgv83-0007B9-Ne
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 02:40:07 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mgv82-0005BS-FU
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 06:40:06 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1Mgv80-00059P-5N
	for commit-mailutils@gnu.org; Fri, 28 Aug 2009 06:40:05 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3bacf09e35159982a35f0e30a13cc1771c95da90
X-Git-Newrev: 496bdf7228403ee3e571280891e76e7cb5fd7ca7
Message-Id: <E1Mgv80-00059P-5N@cvs.savannah.gnu.org>
Date: Fri, 28 Aug 2009 06:40:04 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-336-g496bdf7
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Aug 2009 06:40: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=496bdf7228403ee3e571280891e76e7cb5fd7ca7

The branch, master has been updated
       via  496bdf7228403ee3e571280891e76e7cb5fd7ca7 (commit)
      from  3bacf09e35159982a35f0e30a13cc1771c95da90 (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 496bdf7228403ee3e571280891e76e7cb5fd7ca7
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Fri Aug 28 09:38:18 2009 +0300

    Minor fix
    
    * libmu_scm/Makefile.am (install-data-hook): Make sure
    libguile-mailutils links to the versioned .so file.

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

Summary of changes:
 libmu_scm/Makefile.am |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/libmu_scm/Makefile.am b/libmu_scm/Makefile.am
index 5d7185b..2c4c5ed 100644
--- a/libmu_scm/Makefile.am
+++ b/libmu_scm/Makefile.am
@@ -128,10 +128,12 @@ mailutils.scm: mailutils.scm.in $(C_SRCS:.c=.inc)
 MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 
 install-data-hook:
-	@here=`pwd`; \
+	 @here=`pwd`; \
 	 cd $(DESTDIR)$(libdir);\
-	 if test -f libmu_scm.so; then \
-		$(LN_S) -f libmu_scm.so libguile-mailutils-v-$(VERSION).so; \
+	 if test -f libmu_scm.la; then \
+		dlname=`sed -n 's/dlname='\''\(.*\)'\''/\1/p' libmu_scm.la`; \
+		test -z "$dlname" && dlname='libmu_scm.so'; \
+		$(LN_S) -f "$$dlname" libguile-mailutils-v-$(VERSION).so; \
 	 fi; \
 	 cd $$here
 


hooks/post-receive
-- 
GNU Mailutils



From MAILER-DAEMON Sat Aug 29 15:46:18 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MhTsP-0004vR-Up
	for mharc-commit-mailutils@gnu.org; Sat, 29 Aug 2009 15:46:18 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MhTsO-0004tE-KJ
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 15:46:16 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MhTsN-0004rC-Fc
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 15:46:16 -0400
Received: from [199.232.76.173] (port=37746 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MhTsN-0004r2-Ad
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 15:46:15 -0400
Received: from savannah.gnu.org ([199.232.41.3]:57622 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <INVALID.NOREPLY@gnu.org>)
	id 1MhTsM-0005mS-Mq
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 15:46:15 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MhTsM-0007rD-34
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 19:46:14 +0000
Received: from gray by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <INVALID.NOREPLY@gnu.org>) id 1MhTsL-0007qd-F8
	for commit-mailutils@gnu.org; Sat, 29 Aug 2009 19:46:14 +0000
From: "Sergey Poznyakoff" <gray@gnu.org.ua>
To: commit-mailutils@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 496bdf7228403ee3e571280891e76e7cb5fd7ca7
X-Git-Newrev: 0aed0d5832e76d20f2ea560293955214cb182553
Message-Id: <E1MhTsL-0007qd-F8@cvs.savannah.gnu.org>
Date: Sat, 29 Aug 2009 19:46:13 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [SCM] GNU Mailutils branch, master,
	updated. mu-1-2-90-separate-argp-cfg-337-g0aed0d5
X-BeenThere: commit-mailutils@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Commit notices for GNU mailutils <commit-mailutils.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/commit-mailutils>
List-Post: <mailto:commit-mailutils@gnu.org>
List-Help: <mailto:commit-mailutils-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/commit-mailutils>,
	<mailto:commit-mailutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Aug 2009 19:46:16 -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=0aed0d5832e76d20f2ea560293955214cb182553

The branch, master has been updated
       via  0aed0d5832e76d20f2ea560293955214cb182553 (commit)
      from  496bdf7228403ee3e571280891e76e7cb5fd7ca7 (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 0aed0d5832e76d20f2ea560293955214cb182553
Author: Sergey Poznyakoff <gray@gnu.org.ua>
Date:   Sat Aug 29 22:45:27 2009 +0300

    Minor fixes
    
    * libproto/mailer/smtp.c: fix indentation

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

Summary of changes:
 libproto/mailer/smtp.c |  448 +++++++++++++++++++++++++-----------------------
 1 files changed, 233 insertions(+), 215 deletions(-)

diff --git a/libproto/mailer/smtp.c b/libproto/mailer/smtp.c
index c2e9ab2..e6e7bf7 100644
--- a/libproto/mailer/smtp.c
+++ b/libproto/mailer/smtp.c
@@ -59,7 +59,7 @@
 #include <url0.h>
 #include <registrar0.h>
 
-static int _mailer_smtp_init (mu_mailer_t);
+static int      _mailer_smtp_init (mu_mailer_t);
 
 static int
 _url_smtp_init (mu_url_t url)
@@ -77,7 +77,7 @@ _url_smtp_init (mu_url_t url)
 
   if (url->port == 0)
     url->port = MU_SMTP_PORT;
-  
+
   return 0;
 }
 
@@ -85,7 +85,7 @@ static struct _mu_record _smtp_record = {
   MU_SMTP_PRIO,
   MU_SMTP_SCHEME,
   _url_smtp_init,		/* url init.  */
-  _mu_mailer_mailbox_init,      /* Mailbox init.  */
+  _mu_mailer_mailbox_init,	/* Mailbox init.  */
   _mailer_smtp_init,		/* Mailer init.  */
   _mu_mailer_folder_init,	/* Folder init.  */
   NULL,				/* No need for a back pointer.  */
@@ -95,23 +95,24 @@ static struct _mu_record _smtp_record = {
   NULL,				/* _get_mailer method.  */
   NULL				/* _get_folder method.  */
 };
+
 /* We export : url parsing and the initialisation of
    the mailbox, via the register entry/record.  */
-mu_record_t mu_smtp_record = &_smtp_record;
+mu_record_t     mu_smtp_record = &_smtp_record;
 
 struct _smtp
 {
-  mu_mailer_t mailer;
-  char *mailhost;
-  char *localhost;
+  mu_mailer_t     mailer;
+  char           *mailhost;
+  char           *localhost;
 
   /* IO buffering. */
-  char *buffer;			/* Must be freed. */
-  size_t buflen;
+  char           *buffer;	/* Must be freed. */
+  size_t          buflen;
 
-  char *ptr;
-  char *nl;
-  off_t s_offset;
+  char           *ptr;
+  char           *nl;
+  off_t           s_offset;
 
   enum smtp_state
   {
@@ -123,28 +124,28 @@ struct _smtp
   }
   state;
 
-  int extended;
-  unsigned long capa;           /* Server capabilities */
-  size_t max_size;              /* Maximum message size the server is willing
+  int             extended;
+  unsigned long   capa;		/* Server capabilities */
+  size_t          max_size;	/* Maximum message size the server is willing
 				   to accept */
-  unsigned long auth_mechs;     /* Available ESMTP AUTH mechanisms */
-  
-  const char *mail_from;
-  mu_address_t rcpt_to;		/* Destroy this if not the same as argto below. */
-  mu_address_t rcpt_bcc;
-  size_t rcpt_to_count;
-  size_t rcpt_bcc_count;
-  size_t rcpt_index;
-  size_t rcpt_count;
-  int bccing;
-  mu_message_t msg;		/* Destroy this if not same argmsg. */
-
-  off_t offset;
+  unsigned long   auth_mechs;	/* Available ESMTP AUTH mechanisms */
+
+  const char     *mail_from;
+  mu_address_t    rcpt_to;	/* Destroy this if not the same as argto below. */
+  mu_address_t    rcpt_bcc;
+  size_t          rcpt_to_count;
+  size_t          rcpt_bcc_count;
+  size_t          rcpt_index;
+  size_t          rcpt_count;
+  int             bccing;
+  mu_message_t    msg;		/* Destroy this if not same argmsg. */
+
+  off_t           offset;
 
   /* The mu_mailer_send_message() args. */
-  mu_message_t argmsg;
-  mu_address_t argfrom;
-  mu_address_t argto;
+  mu_message_t    argmsg;
+  mu_address_t    argfrom;
+  mu_address_t    argto;
 };
 
 typedef struct _smtp *smtp_t;
@@ -163,35 +164,36 @@ typedef struct _smtp *smtp_t;
 #define AUTH_GSSAPI          0x00000010
 #define AUTH_EXTERNAL        0x00000020
 
-struct auth_mech_record {
-  unsigned long id;
-  char *name;
+struct auth_mech_record
+{
+  unsigned long   id;
+  char           *name;
 };
 
 static struct auth_mech_record auth_mech_list[] = {
-  { AUTH_LOGIN, "login" },
-  { AUTH_PLAIN, "plain" },
-  { AUTH_CRAM_MD5, "cram-md5" },
-  { AUTH_DIGEST_MD5, "digest-md5" },
-  { AUTH_GSSAPI, "gssapi" },
-  { AUTH_EXTERNAL, "external" },
-  { 0, NULL },
+  {AUTH_LOGIN, "login"},
+  {AUTH_PLAIN, "plain"},
+  {AUTH_CRAM_MD5, "cram-md5"},
+  {AUTH_DIGEST_MD5, "digest-md5"},
+  {AUTH_GSSAPI, "gssapi"},
+  {AUTH_EXTERNAL, "external"},
+  {0, NULL},
 };
 
-static void smtp_destroy (mu_mailer_t);
-static int smtp_open (mu_mailer_t, int);
-static int smtp_close (mu_mailer_t);
-static int smtp_send_message (mu_mailer_t, mu_message_t, mu_address_t,
-			      mu_address_t);
-static int smtp_writeline (smtp_t smtp, const char *format, ...);
-static int smtp_readline (smtp_t);
-static int smtp_read_ack (smtp_t);
-static int smtp_parse_ehlo_ack (smtp_t);
-static int smtp_write (smtp_t);
-static int smtp_starttls (smtp_t);
-static int smtp_auth (smtp_t);
-
-static int _smtp_set_rcpt (smtp_t, mu_message_t, mu_address_t);
+static void     smtp_destroy (mu_mailer_t);
+static int      smtp_open (mu_mailer_t, int);
+static int      smtp_close (mu_mailer_t);
+static int      smtp_send_message (mu_mailer_t, mu_message_t, mu_address_t,
+				   mu_address_t);
+static int      smtp_writeline (smtp_t smtp, const char *format, ...);
+static int      smtp_readline (smtp_t);
+static int      smtp_read_ack (smtp_t);
+static int      smtp_parse_ehlo_ack (smtp_t);
+static int      smtp_write (smtp_t);
+static int      smtp_starttls (smtp_t);
+static int      smtp_auth (smtp_t);
+
+static int      _smtp_set_rcpt (smtp_t, mu_message_t, mu_address_t);
 
 /* Useful little macros, since these are very repetitive. */
 
@@ -238,7 +240,8 @@ CLEAR_STATE (smtp_t smtp)
    as that which is ongoing. Check this. */
 static int
 smtp_check_send_resumption (smtp_t smtp,
-			    mu_message_t msg, mu_address_t from, mu_address_t to)
+			    mu_message_t msg, mu_address_t from,
+			    mu_address_t to)
 {
   if (smtp->state == SMTP_NO_STATE)
     return 0;
@@ -306,7 +309,7 @@ while (0)
 static int
 _mailer_smtp_init (mu_mailer_t mailer)
 {
-  smtp_t smtp;
+  smtp_t          smtp;
 
   /* Allocate memory specific to smtp mailer.  */
   smtp = mailer->data = calloc (1, sizeof (*smtp));
@@ -323,7 +326,8 @@ _mailer_smtp_init (mu_mailer_t mailer)
 
   /* Set our properties.  */
   {
-    mu_property_t property = NULL;
+    mu_property_t   property = NULL;
+
     mu_mailer_get_property (mailer, &property);
     mu_property_set_value (property, "TYPE", "SMTP", 1);
   }
@@ -334,7 +338,7 @@ _mailer_smtp_init (mu_mailer_t mailer)
 static void
 smtp_destroy (mu_mailer_t mailer)
 {
-  smtp_t smtp = mailer->data;
+  smtp_t          smtp = mailer->data;
 
   CLEAR_STATE (smtp);
 
@@ -360,9 +364,9 @@ An SMTP mailer must be opened before any messages can be sent.
 static int
 smtp_open (mu_mailer_t mailer, int flags)
 {
-  smtp_t smtp = mailer->data;
-  int status;
-  long port;
+  smtp_t          smtp = mailer->data;
+  int             status;
+  long            port;
 
   /* Sanity checks.  */
   if (!smtp)
@@ -371,7 +375,7 @@ smtp_open (mu_mailer_t mailer, int flags)
   mailer->flags = flags;
 
   if ((status = mu_url_get_port (mailer->url, &port)) != 0)
-     return status;
+    return status;
 
   switch (smtp->state)
     {
@@ -384,7 +388,7 @@ smtp_open (mu_mailer_t mailer, int flags)
 
       /* Fetch the mailer server name and the port in the mu_url_t.  */
       if ((status = mu_url_aget_host (mailer->url, &smtp->mailhost)) != 0)
-        return status;
+	return status;
 
       if (smtp->localhost)
 	{
@@ -420,7 +424,7 @@ smtp_open (mu_mailer_t mailer, int flags)
 	{
 	  status =
 	    mu_tcp_stream_create (&mailer->stream, smtp->mailhost, port,
-			       mailer->flags);
+				  mailer->flags);
 	  CHECK_ERROR (smtp, status);
 	  mu_stream_setbufsiz (mailer->stream, BUFSIZ);
 	}
@@ -428,9 +432,8 @@ smtp_open (mu_mailer_t mailer, int flags)
       smtp->state = SMTP_OPEN;
 
     case SMTP_OPEN:
-      MU_DEBUG2 (mailer->debug, MU_DEBUG_PROT, 
-                 "smtp_open (host: %s port: %ld)\n",
-		 smtp->mailhost, port);
+      MU_DEBUG2 (mailer->debug, MU_DEBUG_PROT,
+		 "smtp_open (host: %s port: %ld)\n", smtp->mailhost, port);
       status = mu_stream_open (mailer->stream);
       CHECK_EAGAIN (smtp, status);
       smtp->state = SMTP_GREETINGS;
@@ -446,7 +449,7 @@ smtp_open (mu_mailer_t mailer, int flags)
 	  return EACCES;
 	}
 
-ehlo:
+    ehlo:
       status = smtp_writeline (smtp, "EHLO %s\r\n", smtp->localhost);
       CHECK_ERROR (smtp, status);
 
@@ -475,26 +478,29 @@ ehlo:
 
 	  if (smtp->capa & CAPA_STARTTLS)
 	    smtp->state = SMTP_STARTTLS;
-	  else if (smtp->capa & CAPA_AUTH && mailer->url->user) {
-	    smtp->state = SMTP_AUTH;
-	  }
+	  else if (smtp->capa & CAPA_AUTH && mailer->url->user)
+	    {
+	      smtp->state = SMTP_AUTH;
+	    }
 	  else
 	    break;
 	}
 
     case SMTP_STARTTLS:
     case SMTP_STARTTLS_ACK:
-      if (smtp->capa & CAPA_STARTTLS) {
-	smtp_starttls (smtp);
-	goto ehlo;
-      }
+      if (smtp->capa & CAPA_STARTTLS)
+	{
+	  smtp_starttls (smtp);
+	  goto ehlo;
+	}
 
     case SMTP_AUTH:
     case SMTP_AUTH_ACK:
-      if (smtp->capa & CAPA_AUTH) {
-	smtp_auth (smtp);
-	break;
-      }
+      if (smtp->capa & CAPA_AUTH)
+	{
+	  smtp_auth (smtp);
+	  break;
+	}
 
     case SMTP_HELO:
       if (!smtp->extended)	/* FIXME: this will always be false! */
@@ -530,8 +536,9 @@ ehlo:
 static int
 smtp_close (mu_mailer_t mailer)
 {
-  smtp_t smtp = mailer->data;
-  int status;
+  smtp_t          smtp = mailer->data;
+  int             status;
+
   switch (smtp->state)
     {
     case SMTP_NO_STATE:
@@ -563,8 +570,9 @@ smtp_close (mu_mailer_t mailer)
 static int
 smtp_reader (void *iodata)
 {
-  int status = 0;
-  smtp_t iop = iodata;
+  int             status = 0;
+  smtp_t          iop = iodata;
+
   status = smtp_read_ack (iop);
   CHECK_EAGAIN (iop, status);
   return status;
@@ -573,8 +581,9 @@ smtp_reader (void *iodata)
 static int
 smtp_writer (void *iodata, char *buf)
 {
-  smtp_t iop = iodata;
-  int status;
+  smtp_t          iop = iodata;
+  int             status;
+
   if (mu_c_strncasecmp (buf, "EHLO", 4) == 0)
     status = smtp_writeline (iop, "%s %s\r\n", buf, iop->localhost);
   else
@@ -586,9 +595,10 @@ smtp_writer (void *iodata, char *buf)
 }
 
 static void
-smtp_stream_ctl (void *iodata, mu_stream_t *pold, mu_stream_t new)
+smtp_stream_ctl (void *iodata, mu_stream_t * pold, mu_stream_t new)
 {
-  smtp_t iop = iodata;
+  smtp_t          iop = iodata;
+
   if (pold)
     *pold = iop->mailer->stream;
   if (new)
@@ -600,9 +610,9 @@ static int
 smtp_starttls (smtp_t smtp)
 {
 #ifdef WITH_TLS
-  int status;
-  mu_mailer_t mailer = smtp->mailer;
-  char *keywords[] = { "STARTTLS", NULL };
+  int             status;
+  mu_mailer_t     mailer = smtp->mailer;
+  char           *keywords[] = { "STARTTLS", NULL };
 
   if (!mu_tls_enable || !(smtp->capa & CAPA_STARTTLS))
     return -1;
@@ -613,7 +623,7 @@ smtp_starttls (smtp_t smtp)
 			 smtp_stream_ctl, keywords);
 
   MU_DEBUG1 (mailer->debug, MU_DEBUG_PROT, "TLS negotiation %s\n",
-  	     status == 0 ? "succeeded" : "failed");
+	     status == 0 ? "succeeded" : "failed");
 
   return status;
 #else
@@ -625,11 +635,11 @@ static void
 cram_md5 (char *secret, char *challenge, unsigned char *digest)
 {
   struct mu_md5_ctx context;
-  unsigned char ipad[64];
-  unsigned char opad[64];
-  int secret_len;
-  int challenge_len;
-  int i;
+  unsigned char   ipad[64];
+  unsigned char   opad[64];
+  int             secret_len;
+  int             challenge_len;
+  int             i;
 
   if (secret == 0 || challenge == 0)
     return;
@@ -642,7 +652,7 @@ cram_md5 (char *secret, char *challenge, unsigned char *digest)
   if (secret_len > 64)
     {
       mu_md5_init_ctx (&context);
-      mu_md5_process_bytes ((unsigned char *)secret, secret_len, &context);
+      mu_md5_process_bytes ((unsigned char *) secret, secret_len, &context);
       mu_md5_finish_ctx (&context, ipad);
       mu_md5_finish_ctx (&context, opad);
     }
@@ -660,7 +670,7 @@ cram_md5 (char *secret, char *challenge, unsigned char *digest)
 
   mu_md5_init_ctx (&context);
   mu_md5_process_bytes (ipad, sizeof (ipad), &context);
-  mu_md5_process_bytes ((unsigned char *)challenge, challenge_len, &context);
+  mu_md5_process_bytes ((unsigned char *) challenge, challenge_len, &context);
   mu_md5_finish_ctx (&context, digest);
 
   mu_md5_init_ctx (&context);
@@ -672,11 +682,11 @@ cram_md5 (char *secret, char *challenge, unsigned char *digest)
 static int
 smtp_auth (smtp_t smtp)
 {
-  int status;
-  mu_mailer_t mailer = smtp->mailer;
+  int             status;
+  mu_mailer_t     mailer = smtp->mailer;
   struct auth_mech_record *mechs = auth_mech_list;
-  const char *chosen_mech_name = NULL;
-  int chosen_mech_id = 0;
+  const char     *chosen_mech_name = NULL;
+  int             chosen_mech_id = 0;
 
   status = mu_url_sget_auth (mailer->url, &chosen_mech_name);
   if (status != MU_ERR_NOENT)
@@ -716,15 +726,16 @@ smtp_auth (smtp_t smtp)
 
   if (smtp->auth_mechs & AUTH_CRAM_MD5)
     {
-      int i;
-      char *p, *buf = NULL;
-      const char *user = NULL;
-      mu_secret_t secret;
-      unsigned char *chl;
-      size_t chlen, buflen = 0, b64buflen = 0;
-      unsigned char *b64buf = NULL;
-      unsigned char digest[16];
-      static char ascii_digest[33];
+      int             i;
+      char           *p, *buf = NULL;
+      const char     *user = NULL;
+      mu_secret_t     secret;
+      unsigned char  *chl;
+      size_t          chlen, buflen = 0, b64buflen = 0;
+      unsigned char  *b64buf = NULL;
+      unsigned char   digest[16];
+      static char     ascii_digest[33];
+
       memset (digest, 0, 16);
 
       status = mu_url_sget_user (mailer->url, &user);
@@ -757,7 +768,7 @@ smtp_auth (smtp_t smtp)
       mu_rtrim_cset (p, "\r\n");
       mu_base64_decode (p, strlen (p), &chl, &chlen);
 
-      cram_md5 ((char *)mu_secret_password (secret), chl, digest);
+      cram_md5 ((char *) mu_secret_password (secret), chl, digest);
       mu_secret_password_unref (secret);
       free (chl);
 
@@ -780,12 +791,12 @@ smtp_auth (smtp_t smtp)
 
   else if (smtp->auth_mechs & AUTH_PLAIN)
     {
-      int c;
-      char *buf = NULL;
-      unsigned char *b64buf = NULL;
-      size_t buflen = 0, b64buflen = 0;
-      const char *user = NULL;
-      mu_secret_t secret;
+      int             c;
+      char           *buf = NULL;
+      unsigned char  *b64buf = NULL;
+      size_t          buflen = 0, b64buflen = 0;
+      const char     *user = NULL;
+      mu_secret_t     secret;
 
       status = mu_url_sget_user (mailer->url, &user);
       if (status == MU_ERR_NOENT)
@@ -825,10 +836,11 @@ smtp_auth (smtp_t smtp)
 }
 
 static int
-message_set_header_value (mu_message_t msg, const char *field, const char *value)
+message_set_header_value (mu_message_t msg, const char *field,
+			  const char *value)
 {
-  int status = 0;
-  mu_header_t hdr = NULL;
+  int             status = 0;
+  mu_header_t     hdr = NULL;
 
   if ((status = mu_message_get_header (msg, &hdr)))
     return status;
@@ -842,9 +854,9 @@ message_set_header_value (mu_message_t msg, const char *field, const char *value
 static int
 message_has_bcc (mu_message_t msg)
 {
-  int status;
-  mu_header_t header = NULL;
-  size_t bccsz = 0;
+  int             status;
+  mu_header_t     header = NULL;
+  size_t          bccsz = 0;
 
   if ((status = mu_message_get_header (msg, &header)))
     return status;
@@ -895,11 +907,11 @@ The correct algorithm is
 */
 
 static int
-smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom,
-		   mu_address_t argto)
+smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg,
+		   mu_address_t argfrom, mu_address_t argto)
 {
-  smtp_t smtp = NULL;
-  int status;
+  smtp_t          smtp = NULL;
+  int             status;
 
   if (mailer == NULL)
     return EINVAL;
@@ -948,7 +960,7 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
     case SMTP_ENV_FROM:
     ENV_FROM:
       {
-	size_t size;
+	size_t          size;
 
 	if ((smtp->capa & CAPA_SIZE)
 	    && mu_message_size (smtp->msg, &size) == 0)
@@ -983,8 +995,8 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
     case SMTP_ENV_RCPT:
     ENV_RCPT:
       {
-	mu_address_t addr = smtp->rcpt_to;
-	const char *to = NULL;
+	mu_address_t    addr = smtp->rcpt_to;
+	const char     *to = NULL;
 
 	if (smtp->bccing)
 	  addr = smtp->rcpt_bcc;
@@ -1052,13 +1064,13 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 
     case SMTP_SEND:
       {
-	mu_stream_t stream;
-	size_t n = 0;
-	char data[256] = "";
-	mu_header_t hdr;
-	mu_body_t body;
-	int found_nl;
-	
+	mu_stream_t     stream;
+	size_t          n = 0;
+	char            data[256] = "";
+	mu_header_t     hdr;
+	mu_body_t       body;
+	int             found_nl;
+
 	/* We may be here after an EAGAIN so check if we have something
 	   in the buffer and flush it.  */
 	status = smtp_write (smtp);
@@ -1067,10 +1079,10 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 	mu_message_get_header (smtp->msg, &hdr);
 	mu_header_get_stream (hdr, &stream);
 	while ((status = mu_stream_readline (stream, data, sizeof (data),
-					  smtp->offset, &n)) == 0 && n > 0)
+					     smtp->offset, &n)) == 0 && n > 0)
 	  {
-	    int nl;
-	    
+	    int             nl;
+
 	    found_nl = (n == 1 && data[0] == '\n');
 	    if ((nl = (data[n - 1] == '\n')))
 	      data[n - 1] = '\0';
@@ -1089,7 +1101,7 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 	      }
 	    else
 	      nl = 0;
-	    
+
 	    if (nl)
 	      {
 		status = smtp_writeline (smtp, "\r\n");
@@ -1099,7 +1111,7 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 	      }
 	    smtp->offset += n;
 	  }
-	
+
 	if (!found_nl)
 	  {
 	    status = smtp_writeline (smtp, "\r\n");
@@ -1107,12 +1119,12 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 	    status = smtp_write (smtp);
 	    CHECK_EAGAIN (smtp, status);
 	  }
-	
+
 	mu_message_get_body (smtp->msg, &body);
 	mu_body_get_stream (body, &stream);
 	smtp->offset = 0;
 	while ((status = mu_stream_readline (stream, data, sizeof (data) - 1,
-					  smtp->offset, &n)) == 0 && n > 0)
+					     smtp->offset, &n)) == 0 && n > 0)
 	  {
 	    if (data[n - 1] == '\n')
 	      data[n - 1] = '\0';
@@ -1125,7 +1137,7 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 	    CHECK_EAGAIN (smtp, status);
 	    smtp->offset += n;
 	  }
-	
+
 	smtp->offset = 0;
 	status = smtp_writeline (smtp, ".\r\n");
 	CHECK_ERROR (smtp, status);
@@ -1168,10 +1180,10 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t argmsg, mu_address_t argfrom
 }
 
 int
-smtp_address_add (mu_address_t *paddr, const char *value)
+smtp_address_add (mu_address_t * paddr, const char *value)
 {
-  mu_address_t addr = NULL;
-  int status;
+  mu_address_t    addr = NULL;
+  int             status;
 
   status = mu_address_create (&addr, value);
   if (status)
@@ -1184,7 +1196,7 @@ smtp_address_add (mu_address_t *paddr, const char *value)
 static int
 _smtp_property_is_set (smtp_t smtp, const char *name)
 {
-  mu_property_t property = NULL;
+  mu_property_t   property = NULL;
 
   mu_mailer_get_property (smtp->mailer, &property);
   return mu_property_is_set (property, name);
@@ -1193,9 +1205,9 @@ _smtp_property_is_set (smtp_t smtp, const char *name)
 static int
 _smtp_set_rcpt (smtp_t smtp, mu_message_t msg, mu_address_t to)
 {
-  int status = 0;
-  mu_header_t header = NULL;
-  char *value;
+  int             status = 0;
+  mu_header_t     header = NULL;
+  char           *value;
 
   /* Get RCPT_TO from TO, or the message. */
 
@@ -1205,7 +1217,7 @@ _smtp_set_rcpt (smtp_t smtp, mu_message_t msg, mu_address_t to)
       if ((status = mu_mailer_check_to (to)) != 0)
 	{
 	  MU_DEBUG (smtp->mailer->debug, MU_DEBUG_ERROR,
-	 	    "mu_mailer_send_message(): explicit to not valid\n");
+		    "mu_mailer_send_message(): explicit to not valid\n");
 	  return status;
 	}
       smtp->rcpt_to = to;
@@ -1256,7 +1268,7 @@ _smtp_set_rcpt (smtp_t smtp, mu_message_t msg, mu_address_t to)
       if (smtp->rcpt_bcc && (status = mu_mailer_check_to (smtp->rcpt_bcc)))
 	goto end;
     }
-  
+
 end:
 
   if (status)
@@ -1287,9 +1299,9 @@ end:
 static int
 smtp_writeline (smtp_t smtp, const char *format, ...)
 {
-  int len;
-  va_list ap;
-  int done = 1;
+  int             len;
+  va_list         ap;
+  int             done = 1;
 
   va_start (ap, format);
   do
@@ -1298,8 +1310,9 @@ smtp_writeline (smtp_t smtp, const char *format, ...)
       if (len < 0 || (len >= (int) smtp->buflen)
 	  || !memchr (smtp->buffer, '\0', len + 1))
 	{
-	  char *buffer = NULL;
-	  size_t buflen = smtp->buflen * 2;
+	  char           *buffer = NULL;
+	  size_t          buflen = smtp->buflen * 2;
+
 	  buffer = realloc (smtp->buffer, buflen);
 	  if (smtp->buffer == NULL)
 	    return ENOMEM;
@@ -1324,20 +1337,21 @@ smtp_writeline (smtp_t smtp, const char *format, ...)
       MU_DEBUG2 (smtp->mailer->debug, MU_DEBUG_PROT, "> %.*s\n", len,
 		 smtp->buffer);
     }
-  
+
   return 0;
 }
 
 static int
 smtp_write (smtp_t smtp)
 {
-  int status = 0;
-  size_t len;
+  int             status = 0;
+  size_t          len;
+
   if (smtp->ptr > smtp->buffer)
     {
       len = smtp->ptr - smtp->buffer;
       status = mu_stream_write (smtp->mailer->stream, smtp->buffer, len,
-			     0, &len);
+				0, &len);
       if (status == 0)
 	{
 	  memmove (smtp->buffer, smtp->buffer + len, len);
@@ -1355,8 +1369,8 @@ smtp_write (smtp_t smtp)
 static int
 smtp_read_ack (smtp_t smtp)
 {
-  int status;
-  int multi;
+  int             status;
+  int             multi;
 
   do
     {
@@ -1377,8 +1391,8 @@ smtp_read_ack (smtp_t smtp)
 static int
 smtp_parse_ehlo_ack (smtp_t smtp)
 {
-  int status;
-  int multi;
+  int             status;
+  int             multi;
 
   do
     {
@@ -1386,48 +1400,52 @@ smtp_parse_ehlo_ack (smtp_t smtp)
       status = smtp_readline (smtp);
       if ((smtp->ptr - smtp->buffer) > 4 && smtp->buffer[3] == '-')
 	multi = 1;
-      if (status == 0) {
-	smtp->ptr = smtp->buffer;
-
-	if (!mu_c_strncasecmp (smtp->buffer, "250-STARTTLS", 12))
-	  smtp->capa |= CAPA_STARTTLS;
-	else if (!mu_c_strncasecmp (smtp->buffer, "250-SIZE", 8))
-	  {
-	    smtp->capa |= CAPA_SIZE;
-	    if (smtp->buffer[8] == '=')
-	      {
-		char *p;
-		size_t n = strtoul (smtp->buffer + 9, &p, 10);
-		if (*p != '\n')
-		  MU_DEBUG1 (smtp->mailer->debug, MU_DEBUG_ERROR,
-			     "suspicious size declaration: %s",
-			     smtp->buffer);
-		else
-		  smtp->max_size = n;
-	      }
-	  }
-	else if (!mu_c_strncasecmp (smtp->buffer, "250-AUTH", 8))
-	  {
-	    char *name, *s;
-	    smtp->capa |= CAPA_AUTH;
+      if (status == 0)
+	{
+	  smtp->ptr = smtp->buffer;
 
-	    for (name = strtok_r (smtp->buffer + 8, " ", &s); name;
-		 name = strtok_r (NULL, " ", &s))
-	      {
-		struct auth_mech_record *mechs = auth_mech_list;
-		for (; mechs->name; mechs++)
-		  {
-		    mu_rtrim_cset (name, "\r\n");
-		    if (!mu_c_strcasecmp (mechs->name, name))
-		      {
-			smtp->auth_mechs |= mechs->id;
-			break;
-		      }
-		  }
-	      }
-	  }
+	  if (!mu_c_strncasecmp (smtp->buffer, "250-STARTTLS", 12))
+	    smtp->capa |= CAPA_STARTTLS;
+	  else if (!mu_c_strncasecmp (smtp->buffer, "250-SIZE", 8))
+	    {
+	      smtp->capa |= CAPA_SIZE;
+	      if (smtp->buffer[8] == '=')
+		{
+		  char           *p;
+		  size_t          n = strtoul (smtp->buffer + 9, &p, 10);
+
+		  if (*p != '\n')
+		    MU_DEBUG1 (smtp->mailer->debug, MU_DEBUG_ERROR,
+			       "suspicious size declaration: %s",
+			       smtp->buffer);
+		  else
+		    smtp->max_size = n;
+		}
+	    }
+	  else if (!mu_c_strncasecmp (smtp->buffer, "250-AUTH", 8))
+	    {
+	      char           *name, *s;
+
+	      smtp->capa |= CAPA_AUTH;
+
+	      for (name = strtok_r (smtp->buffer + 8, " ", &s); name;
+		   name = strtok_r (NULL, " ", &s))
+		{
+		  struct auth_mech_record *mechs = auth_mech_list;
+
+		  for (; mechs->name; mechs++)
+		    {
+		      mu_rtrim_cset (name, "\r\n");
+		      if (!mu_c_strcasecmp (mechs->name, name))
+			{
+			  smtp->auth_mechs |= mechs->id;
+			  break;
+			}
+		    }
+		}
+	    }
 
-      }
+	}
     }
   while (multi && status == 0);
 
@@ -1441,15 +1459,15 @@ smtp_parse_ehlo_ack (smtp_t smtp)
 static int
 smtp_readline (smtp_t smtp)
 {
-  size_t n = 0;
-  size_t total = smtp->ptr - smtp->buffer;
-  int status;
+  size_t          n = 0;
+  size_t          total = smtp->ptr - smtp->buffer;
+  int             status;
 
   /* Must get a full line before bailing out.  */
   do
     {
       status = mu_stream_readline (smtp->mailer->stream, smtp->buffer + total,
-				smtp->buflen - total, smtp->s_offset, &n);
+				   smtp->buflen - total, smtp->s_offset, &n);
       if (status != 0)
 	return status;
 
@@ -1491,6 +1509,6 @@ smtp_readline (smtp_t smtp)
 #else
 #include <stdio.h>
 #include <registrar0.h>
-mu_record_t mu_smtp_record = NULL;
-mu_record_t mu_remote_smtp_record = NULL;
+mu_record_t     mu_smtp_record = NULL;
+mu_record_t     mu_remote_smtp_record = NULL;
 #endif


hooks/post-receive
-- 
GNU Mailutils



