[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Mailutils branch, master, updated. release-2.2-642-g9b2c819
From: |
Sergey Poznyakoff |
Subject: |
[SCM] GNU Mailutils branch, master, updated. release-2.2-642-g9b2c819 |
Date: |
Wed, 27 Mar 2013 07:38: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=9b2c81921aa7c32542db310c819586f81f0ed082
The branch, master has been updated
via 9b2c81921aa7c32542db310c819586f81f0ed082 (commit)
from 802150a165325d9d7a2824765c32852afc6e7797 (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 9b2c81921aa7c32542db310c819586f81f0ed082
Author: Sergey Poznyakoff <address@hidden>
Date: Wed Mar 27 09:36:20 2013 +0200
Fix the use of localname and localdomain in ~/.mtstailor.
* mh/send.c (read_mts_profile): Fix the handling of
localname vs. localdomain. The localname setting
used alone overrides the hostname as returned by
mu_hostname. The value of localdomain, if set, is
appended to the hostname (eventually modified by
localname), with a "." as a separator.
-----------------------------------------------------------------------
Summary of changes:
mh/send.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/mh/send.c b/mh/send.c
index f9617a0..2fd1e92 100644
--- a/mh/send.c
+++ b/mh/send.c
@@ -352,19 +352,9 @@ read_mts_profile ()
rc = mu_property_sget_value (mts_profile, "localdomain", &p);
if (rc == 0)
{
- char *newdomain;
-
- newdomain = mu_alloc (strlen (hostname) + 1 + strlen (p) + 1);
- strcpy (newdomain, hostname);
- strcat (newdomain, ".");
- strcat (newdomain, p);
- rc = mu_set_user_email_domain (newdomain);
- free (newdomain);
- if (rc)
- {
- mu_error (_("cannot set user mail domain: %s"), mu_strerror (rc));
- exit (1);
- }
+ hostname = mu_realloc (hostname, strlen (hostname) + 1 + strlen (p) + 1);
+ strcat (hostname, ".");
+ strcat (hostname, p);
}
else if (rc != MU_ERR_NOENT)
{
@@ -372,6 +362,14 @@ read_mts_profile ()
"localdomain", rc);
exit (1);
}
+
+ rc = mu_set_user_email_domain (hostname);
+ free (hostname);
+ if (rc)
+ {
+ mu_error (_("cannot set user mail domain: %s"), mu_strerror (rc));
+ exit (1);
+ }
rc = mu_property_sget_value (mts_profile, "username", &p);
if (rc == 0)
hooks/post-receive
--
GNU Mailutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Mailutils branch, master, updated. release-2.2-642-g9b2c819,
Sergey Poznyakoff <=