From roam@orbitel.bg  Tue Jul 25 05:41:37 2000
Return-Path: <roam@orbitel.bg>
Received: from orbitel.bg (ns.orbitel.bg [195.24.32.2])
	by hub.freebsd.org (Postfix) with SMTP id 233DC37BD84
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <roam@orbitel.bg>
Reply-To: Peter Pentchev <roam@orbitel.bg>
To: FreeBSD-gnats-submit@freebsd.org
Subject: send-pr(1) cannot override From: address [PATCH]
X-Send-Pr-Version: 3.2

>Number:         20173
>Category:       gnu
>Synopsis:       send-pr(1) cannot override From: address [PATCH]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    steve
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 25 05:50:00 PDT 2000
>Closed-Date:    Sun Oct 29 13:53:15 PST 2000
>Last-Modified:  Sun Oct 29 13:53:49 PST 2000
>Originator:     Peter Pentchev <roam@orbitel.bg>
>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:
Responsible-Changed-From-To: freebsd-bugs->steve 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Jul 27 04:14:24 PDT 2000 
Responsible-Changed-Why:  
Steve is probably the best person to make a call on this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20173 

From: Peter Pentchev <roam@orbitel.bg>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: gnu/20173: send-pr(1) cannot override From: address [PATCH]
Date: Thu, 17 Aug 2000 19:25:21 +0300

 On Thu, Jul 27, 2000 at 04:14:51AM -0700, sheldonh@FreeBSD.org wrote:
 > Synopsis: send-pr(1) cannot override From: address [PATCH]
 > 
 > Responsible-Changed-From-To: freebsd-bugs->steve
 > Responsible-Changed-By: sheldonh
 > Responsible-Changed-When: Thu Jul 27 04:14:24 PDT 2000
 > Responsible-Changed-Why: 
 > Steve is probably the best person to make a call on this one.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=20173
 > 
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-bugs" in the body of the message
 >
 
 Actually, today's commit of jhb of send-pr.sh (MAIL_AGENT override)
 pretty much covers this.  This PR may safely be closed :)
 
 G'luck,
 Peter
 
 -- 
 .sith ekil ti gnidaer eb d'uoy ,werbeH ni erew ecnetnes siht fI
 
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Oct 29 13:53:15 PST 2000 
State-Changed-Why:  
As the originator pointed out this was fixed in revision 1.16 of 
send-pr.sh by nik@freebsd.org. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20173 
>Unformatted:
