Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Mar 2002 21:04:09 -0800
From:      Scott Blachowicz <scott@sabami.seaslug.org>
To:        Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: ports/36307: nmh port cuts off last part of sender domain
Message-ID:  <20020331210409.A30281@sabami.seaslug.org>
In-Reply-To: <20020327084920.A84514@sabami.seaslug.org>; from scott@sabami.seaslug.org on Wed, Mar 27, 2002 at 08:49:20AM -0800
References:  <20020326201407.A55900@sabami.seaslug.org> <20020327144432.4CE71AEB8@reiher.informatik.uni-wuerzburg.de> <20020327084920.A84514@sabami.seaslug.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Mar 27, 2002 at 08:49:20AM -0800, Scott Blachowicz wrote:
> On Wed, Mar 27, 2002 at 03:44:32PM +0100, Matthias Buelow wrote:
> > ...
> > This is both a problem in nmh aswell as FreeBSD; nmh shouldn't rely
> > on uname(3) for getting a full Internet hostname as "nodename";
> > FreeBSD should raise SYS_NMLN to provide enough place for an Internet
> > hostname.
> > ...
> > My proposal:
> > 
> > Make nmh depend on sth. else than uname(3), and also push up
> > FreeBSD's SYS_NMLN (if not already done so in -CURRENT, haven't
> > checked.)
> 
> Well...I'll work on getting the nmh port modified to avoid uname(3).  It's
> already conditionalized on a HAVE_UNAME define, so just turning that define
> off should take care of it.  It looks like it'll use gethostname(3) instead
> and the calling code passes a BUFSIZ (1024) char buffer in...the
> gethostname(3) man page warns that it's limited to 256 chars, so that should
> do the trick, I think.

OK...the problem here was that the uname(3) call was truncating the hostname because of
the small fixed size buffer it uses.  So, I've patched the port to act like uname() isn't
there, so it'll use gethostname() instead.  Also, while there, I made some minor tweaks
to the Makefile.  So, the checkin comment could go like this:

    Make sure HAVE_UNAME doesn't get defined, so gethostname() is used instead of uname()
    to avoid problem with the too short buffer in uname(3).  Also, make --enable-pop an
    optional make variable and allow for optional extra configure args to be passed in 
    to help with another request I've had recently.

So, how do I go about getting someone to commit this patch to the mail/nmh port?

Thanx,
-- 
Scott Blachowicz (mail/nmh port maintainer)

--FCuugMFkClbJLl1L
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=nmh-port-patch

diff -Nru nmh/Makefile nmh-new/Makefile
--- nmh/Makefile	Sun Jan  6 04:50:41 2002
+++ nmh-new/Makefile	Sun Mar 31 18:23:24 2002
@@ -6,6 +6,25 @@
 #
 # Makefile variables of interest:
 #
+# NMH_EDITOR - pass an EDITOR specification through to nmh's configure
+#           script's '--with-editor' option.
+#
+# NMH_EXTRA_CONFIGURE_ARGS - extra args passed through to 'configure'.
+#
+# NMH_LOCKING - specify the style of locking to be used by nmh for the
+#           users' spool files (e.g. the 'inc' command). Must match the
+#           locking style used by your MTA - the default is FLOCK_LOCKING
+#           (the documented behavior for the 'mail.local' delivery program).
+#           Do a 'make patch', then look in the source directory (currently
+#           the config.h.in file) for more information on different locking
+#           settings. Current valid settings are:
+#             DOT_LOCKING FCNTL_LOCKING LOCKF_LOCKING FLOCK_LOCKING
+#
+# NMH_MASQUERADE - specify the type(s) of masquerading to allow.  This
+#           is passed through to nmh's "--enable-masquerade" configure
+#           option and the current syntax for that string is:
+#             'draft_from[ mmailid[ username_extension]]'
+#
 # NMH_MTS - pass an MTS specification through to nmh's configure
 #           script's "--with-mts" option.  Do a "make extract" and check
 #           the NMH distribution's "INSTALL" file for more info.
@@ -21,25 +40,11 @@
 #           rewriting facilities of "qmail-inject", if you are using qmail,
 #           may be available this way, but not via NMH_MTS=smtp.
 #
-# NMH_EDITOR - pass an EDITOR specification through to nmh's configure
-#           script's '--with-editor' option.
-#
 # NMH_PAGER - pass an PAGER specification through to nmh's configure
 #           script's '--with-pager' option.
 #
-# NMH_LOCKING - specify the style of locking to be used by nmh for the
-#           users' spool files (e.g. the 'inc' command). Must match the
-#           locking style used by your MTA - the default is FLOCK_LOCKING
-#           (the documented behavior for the 'mail.local' delivery program).
-#           Do a 'make patch', then look in the source directory (currently
-#           the config.h.in file) for more information on different locking
-#           settings. Current valid settings are:
-#             DOT_LOCKING FCNTL_LOCKING LOCKF_LOCKING FLOCK_LOCKING
-#
-# NMH_MASQUERADE - specify the type(s) of masquerading to allow.  This
-#           is passed through to nmh's "--enable-masquerade" configure
-#           option and the current syntax for that string is:
-#             'draft_from[ mmailid[ username_extension]]'
+# NMH_POP - specify "enable" or "disable" for --enable-pop (or --disable-pop).
+#           Default is "enable".
 #
 # NMH_SMTPSERVERS - specify a blank-separated list of SMTP servers -
 #           passed through to nmh's configure scripts '--with-smtpservers'
@@ -58,26 +63,35 @@
 
 USE_AUTOCONF_VER=213
 CONFIGURE_ARGS=	--libdir=${PREFIX}/libexec/nmh \
-		--sysconfdir=${PREFIX}/etc/nmh --enable-nmh-pop
-.ifdef NMH_MTS
-CONFIGURE_ARGS+= --with-mts=${NMH_MTS}
-.endif
+		--sysconfdir=${PREFIX}/etc/nmh
 .ifdef NMH_EDITOR
 CONFIGURE_ARGS+= --with-editor=${NMH_EDITOR}
 .endif
 .ifdef NMH_MASQUERADE
 CONFIGURE_ARGS+= --enable-masquerade="${NMH_MASQUERADE}"
 .endif
+.ifndef NMH_LOCKING
+NMH_LOCKING=FLOCK_LOCKING
+.endif
+.ifdef NMH_MTS
+CONFIGURE_ARGS+= --with-mts=${NMH_MTS}
+.endif
 .ifdef NMH_PAGER
 CONFIGURE_ARGS+= --with-pager=${NMH_PAGER}
 .endif
+.ifdef NMH_POP
+CONFIGURE_ARGS+= --${NMH_POP}-pop
+.else
+CONFIGURE_ARGS+= --enable-pop
+.endif
 .ifdef NMH_SMTPSERVERS
 CONFIGURE_ARGS+= --with-smtpservers="${NMH_SMTPSERVERS}"
 .endif
 
-.ifndef NMH_LOCKING
-NMH_LOCKING=FLOCK_LOCKING
+.ifdef NMH_EXTRA_CONFIGURE_ARGS
+CONFIGURE_ARGS+= ${NMH_EXTRA_CONFIGURE_ARGS}
 .endif
+
 CFLAGS+= -D${NMH_LOCKING}
 
 MAN1=	ali.1 anno.1 burst.1 comp.1 dist.1 flist.1 folder.1 forw.1 \
diff -Nru nmh/files/patch-ac nmh-new/files/patch-ac
--- nmh/files/patch-ac	Wed Dec 22 09:32:01 1999
+++ nmh-new/files/patch-ac	Sun Mar 31 19:05:48 2002
@@ -1,6 +1,6 @@
---- ../../nmh-1.0.2-DIST/configure.in	Tue Oct 26 14:12:37 1999
-+++ ./configure.in	Sat Dec 11 11:54:28 1999
-@@ -160,6 +160,11 @@
+--- ../../../nmh-1.0.4/configure.in	Wed Mar 15 15:37:30 2000
++++ ./configure.in	Sun Mar 31 18:55:06 2002
+@@ -193,6 +193,11 @@
  dnl ------------------
  AC_PROG_MAKE_SET	dnl Does make define $MAKE
  AC_PROG_INSTALL		dnl Check for BSD compatible `install'
@@ -12,3 +12,12 @@
  AC_PROG_RANLIB		dnl Check for `ranlib'
  AC_PROG_AWK             dnl Check for mawk,gawk,nawk, then awk
  AC_PROG_LEX             dnl Check for lex/flex
+@@ -389,7 +394,7 @@
+ AC_FUNC_VFORK
+ AC_CHECK_LIB(mkstemp,mkstemp)
+ AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
+-               sighold sigrelse writev lstat uname tzset killpg mkstemp \
++               sighold sigrelse writev lstat tzset killpg mkstemp \
+                sethostent)
+ 
+ dnl solaris screws this up

--FCuugMFkClbJLl1L--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020331210409.A30281>