pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/35175: patch to pkgsrc/mail/msmtp to change the default hostname from "localhost" to the output of gethostname(3)
>Number: 35175
>Category: pkg
>Synopsis: patch to pkgsrc/mail/msmtp to change the default hostname from
>"localhost" to the output of gethostname(3)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 03 19:35:00 +0000 2006
>Originator: david l goodrich
>Release: 3.1
>Organization:
>Environment:
NetBSD build-31.dsrw.org 3.1 NetBSD 3.1 (XEN3_DOMU-pf) #0: Sat Oct 28 19:51:45
CDT 2006
root%yggdrasil-1.tproa.net@localhost:/local/src/usr/src/sys/arch/i386/compile/obj/XEN3_DOMU-pf
i386
>Description:
The default domain in msmtp is 'localhost.' The patch below changes this to
the output of gethostname(3), which is a little more useful.
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mail/msmtp/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo 14 Jan 2006 20:08:20 -0000 1.13
+++ distinfo 3 Dec 2006 19:28:23 -0000
@@ -5,7 +5,7 @@
Size (msmtp-1.4.5.tar.bz2) = 489336 bytes
SHA1 (patch-aa) = 30be9810fdbdd1de0c4727c94d5c799317548bdb
SHA1 (patch-ab) = 9ce732fb3258f0b5fcafaabaa92960489a62124e
-SHA1 (patch-ac) = 54b47760510320c08cf9703ce79ea431a69115e4
+SHA1 (patch-ac) = 641a4acff1ed1944466f956a50c8fa13727b6588
SHA1 (patch-ad) = 1191e01ccad89532badb4240cb1e190965f1ed40
SHA1 (patch-ae) = 1d5c4ece937ce23580ab2aef3d9362925023d7ad
SHA1 (patch-af) = 3810dba45fdf83a8534fdac118b9da66db5bafc8
Index: patches/patch-ac
===================================================================
RCS file: /cvsroot/pkgsrc/mail/msmtp/patches/patch-ac,v
retrieving revision 1.1
diff -u -r1.1 patch-ac
--- patches/patch-ac 8 Jan 2006 16:38:41 -0000 1.1
+++ patches/patch-ac 3 Dec 2006 19:28:23 -0000
@@ -1,12 +1,31 @@
-$NetBSD: patch-ac,v 1.1 2006/01/08 16:38:41 joerg Exp $
-
---- src/conf.c.orig 2006-01-08 16:30:23.000000000 +0000
+--- src/conf.c.orig 2006-12-03 12:58:36.000000000 -0600
+++ src/conf.c
-@@ -31,7 +31,6 @@
+@@ -31,7 +31,8 @@
#include <string.h>
#include <ctype.h>
#include <errno.h>
-extern int errno;
++#include <unistd.h>
++#include <sys/param.h>
#include "gettext.h"
#include "xalloc.h"
+@@ -54,6 +55,9 @@
+
+ account_t *account_new(const char *conffile, const char *id)
+ {
++ char hostname[MAXHOSTNAMELEN];
++ gethostname(hostname,MAXHOSTNAMELEN);
++
+ account_t *a;
+ a = xmalloc(sizeof(account_t));
+ a->id = id ? xstrdup(id) : NULL;
+@@ -63,7 +67,7 @@
+ a->port = 0; /* this must be set later */
+ a->timeout = 0;
+ a->protocol = SMTP_PROTO_SMTP;
+- a->domain = xstrdup("localhost");
++ a->domain = xstrdup(hostname);
+ a->auto_from = 0;
+ a->from = NULL;
+ a->maildomain = NULL;
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index