Bug 21570

Summary: [PATCH] Add -r option to /usr/bin/mail, quiet compiler warnings
Product: Base System Reporter: DougB <DougB>
Component: binAssignee: Doug Barton <dougb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.5.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description DougB 2000-09-26 23:10:01 UTC
	Unlike most /usr/bin/mail options, the reply-to header option lacks
	the ability to be set on the command line. In addition to convenience
	this also functions as a type of compatability option with SysV's mailx
	command.  (Adding this option has the additional benefit of 
	silencing some complaints from my sun-centric co-workers. :)

	The solaris version of the -r command actually sets the "From:" header,
	but that is very un-BSD-like. This seems to be an acceptable
	and useful alternative.

	While I'm here, silence a few compiler warnings about mktemp(). The
	resulting binary compiles, runs, and passes a cursory functionality
	test. mkstemp() is probably safer in this context anyway.

Fix: Apply the following patch. It applies cleanly to RELENG_5 and 
	RELENG_4, and runs on both. 

How-To-Repeat: 
	DNA
Comment 1 Lyndon Nerenberg 2000-09-26 23:25:25 UTC
>>>>> "DougB" == DougB  <DougB@gorean.org> writes:

    DougB> 	The solaris version of the -r command actually sets
    DougB> the "From:" header, but that is very un-BSD-like. This
    DougB> seems to be an acceptable and useful alternative.

Setting reply-to: instead of changing from: breaks group reply semantics.
If you want to change from:, change from:. mail(1) already gives you a
way to insert a reply-to: header if that's what you really need. (See
the drums mailing list archives for months of agonizing discussion on
this very topic.)

Why is changing from: un-BSD like? The behaviour is sanctioned by RFC822, 
and many MUAs allow it.

--lyndon
Comment 2 Doug Barton freebsd_committer freebsd_triage 2000-10-27 11:28:23 UTC
State Changed
From-To: open->feedback

The only response I've had so far has been mildly negative. I plan to solicit 
more commentary when I have time to revisit this. 


Comment 3 Doug Barton freebsd_committer freebsd_triage 2000-10-27 11:28:23 UTC
Responsible Changed
From-To: freebsd-bugs->dougb

Take charge of my own PR
Comment 4 Doug Barton freebsd_committer freebsd_triage 2006-12-30 21:20:24 UTC
State Changed
From-To: feedback->closed


Close a prehistoric PR that I opened before I became a 
committer, which is no longer relevant.