From owner-freebsd-bugs Tue Jul 25 5:50: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6072037B63C for ; Tue, 25 Jul 2000 05:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA45882; Tue, 25 Jul 2000 05:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from orbitel.bg (ns.orbitel.bg [195.24.32.2]) by hub.freebsd.org (Postfix) with SMTP id 233DC37BD84 for ; Tue, 25 Jul 2000 05:41:35 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 25501 invoked from network); 25 Jul 2000 12:41:17 -0000 Received: from unknown (HELO ringwraith.oblivion.bg) (192.168.0.98) by ns.orbitel.bg with SMTP; 25 Jul 2000 12:41:17 -0000 Received: (qmail 36508 invoked by uid 0); 25 Jul 2000 12:41:44 -0000 Message-Id: <20000725124144.36507.qmail@ringwraith.oblivion.bg> Date: 25 Jul 2000 12:41:44 -0000 From: Peter Pentchev Reply-To: Peter Pentchev To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: gnu/20173: send-pr(1) cannot override From: address [PATCH] Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20173 >Category: gnu >Synopsis: send-pr(1) cannot override From: address [PATCH] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 25 05:50:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Peter Pentchev >Release: FreeBSD 4.1-RC i386 >Organization: Orbitel JSCo >Environment: FreeBSD 4.1-RC #3: Thu Jul 20 18:59:37 EEST 2000 root@ringwraith.oblivion.bg:/usr/obj/usr/src/sys/BEL-4 i386 >Description: As can be seen from the above, I am using a local DNS domain oblivion.bg, comprised of several virtual websites on the corporate LAN. For various reasons I prefer the primary hostname of my machine to be in that fake domain. Whenever I try to submit a PR, send-pr invokes sendmail as root@ringwraith.oblivion.bg, and sometimes a picky SMTP relay along the way rejects the mail. >How-To-Repeat: Invoke send-pr(1) from a machine with a primary hostname, unresolvable by most of the world. >Fix: Enclosed is a patch which checks if the environment variable FROM is set, and if so, passes -f to sendmail. I don't know if this is the best solution; it entails local changes, yet the change is trivial. I am also in doubt as to the name of the environment variable which should hold the From: address of outgoing mails; is there some convention as to that? Anyway, here's a trivial patch. diff -ur src/gnu/usr.bin/send-pr/send-pr.sh mysrc/gnu/usr.bin/send-pr/send-pr.sh --- src/gnu/usr.bin/send-pr/send-pr.sh Wed Jun 21 02:41:52 2000 +++ mysrc/gnu/usr.bin/send-pr/send-pr.sh Tue Jul 25 15:26:38 2000 @@ -57,6 +57,8 @@ # What mailer to use. This must come after the config file, since it is # host-dependent. MAIL_AGENT="/usr/sbin/sendmail -oi -t" +# From: address override? +[ ! -z "$FROM" ] && MAIL_AGENT="$MAIL_AGENT -f $FROM" ECHON=bsd >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message