NetBSD Problem Report #35175
From www@NetBSD.org Sun Dec 3 19:32:09 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
id 61DC463B90D; Sun, 3 Dec 2006 19:32:09 +0000 (UTC)
Message-Id: <20061203193209.61DC463B90D@narn.NetBSD.org>
Date: Sun, 3 Dec 2006 19:32:09 +0000 (UTC)
From: dlg@dorkzilla.org
Reply-To: dlg@dorkzilla.org
To: gnats-bugs@NetBSD.org
Subject: patch to pkgsrc/mail/msmtp to change the default hostname from "localhost" to the output of gethostname(3)
X-Send-Pr-Version: www-1.0
>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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 03 19:35:00 +0000 2006
>Closed-Date: Tue Mar 05 14:46:30 +0000 2013
>Last-Modified: Tue Mar 05 14:46:30 +0000 2013
>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:/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:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: shattered@NetBSD.org
State-Changed-When: Sat, 21 Apr 2012 21:15:35 +0000
State-Changed-Why:
Is this truly useful? Domain name is configurable:
`domain ARGUMENT'
This command sets the argument of the SMTP EHLO (or LMTP LHLO)
command. The default is `localhost', which is stupid but should
always work. Possible choices are the domain part of your mail
address (`provider.example' for `joe@provider.example') or the
fully qualified domain name of your host (if available).
From: david l goodrich <dlg@dsrw.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: pkg/35175
Date: Tue, 5 Mar 2013 08:39:34 -0600
--f46d042445324297a804d72e71ae
Content-Type: text/plain; charset=ISO-8859-1
Please close.
--f46d042445324297a804d72e71ae
Content-Type: text/html; charset=ISO-8859-1
Please close.
--f46d042445324297a804d72e71ae--
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 05 Mar 2013 14:46:30 +0000
State-Changed-Why:
Retracted by submitter
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.