Skip site navigation (1)Skip section navigation (2)
Date:      20 Apr 2002 03:21:55 -0000
From:      Jos Backus <jos@catnook.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   gnu/37267: send-pr does not add domain to the username
Message-ID:  <20020420032155.17208.qmail@lizzy.catnook.com>

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

>Number:         37267
>Category:       gnu
>Synopsis:       send-pr does not add domain to the username
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 19 20:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jos Backus
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
CatNook
>Environment:
System: FreeBSD lizzy.catnook.com 5.0-CURRENT FreeBSD 5.0-CURRENT #18: Mon Apr 15 23:20:45 PDT 2002 jos@lizzy.catnook.com:/disk0/usr/obj/disk0/usr/src/sys/LIZZY i386


>Description:
	
	send-pr does not attempt to determine the domain of the system when
	creating the From: and Reply-To: form fields, forcing the user to add
	the domain manually.

>How-To-Repeat:
	
	Run send-pr and observe that the e-mail address in the  From: and
	Reply-To: does not have a domain appended.
>Fix:

	The patch below adds the first domain found in /etc/resolv.conf, when
	present.

--- send-pr.sh.orig	Fri Apr 19 20:16:12 2002
+++ send-pr.sh	Fri Apr 19 20:16:59 2002
@@ -99,8 +99,9 @@
   rm -f $PTEMP
 fi
 
-FROM="$ORIGINATOR <$LOGNAME>"
-REPLY_TO="$ORIGINATOR <${REPLY_TO:-${REPLYTO:-$LOGNAME}}>"
+DOMAIN=`test -r /etc/resolv.conf && awk '$1 ~ /(search|domain)/ {print "@"$2; exit}' /etc/resolv.conf`
+FROM="$ORIGINATOR <$LOGNAME$DOMAIN>"
+REPLY_TO="$ORIGINATOR <${REPLY_TO:-${REPLYTO:-$LOGNAME$DOMAIN}}>"
 
 if [ -n "$ORGANIZATION" ]; then
   if [ -f "$ORGANIZATION" ]; then
>Release-Note:
>Audit-Trail:
>Unformatted:

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




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