From owner-freebsd-bugs Fri Apr 19 20:30:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D321837B41B for ; Fri, 19 Apr 2002 20:30:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3K3U1a36231; Fri, 19 Apr 2002 20:30:01 -0700 (PDT) (envelope-from gnats) Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id D8B0F37B405 for ; Fri, 19 Apr 2002 20:21:34 -0700 (PDT) Received: (qmail 17209 invoked by uid 1000); 20 Apr 2002 03:21:55 -0000 Message-Id: <20020420032155.17208.qmail@lizzy.catnook.com> Date: 20 Apr 2002 03:21:55 -0000 From: Jos Backus Reply-To: Jos Backus To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: gnu/37267: send-pr does not add domain to the username Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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