Date: 25 Jul 2000 12:41:44 -0000 From: Peter Pentchev <roam@orbitel.bg> To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/20173: send-pr(1) cannot override From: address [PATCH] Message-ID: <20000725124144.36507.qmail@ringwraith.oblivion.bg>
next in thread | raw e-mail | index | archive | help
>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 <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: >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?20000725124144.36507.qmail>