Bug 121781

Summary: usage text and man page don't have correct delimiter for sendmail-options
Product: [Fedora] Fedora Reporter: Andrew Jorgensen <andrew+redhat+bugzilla>
Component: mailxAssignee: Ivana Varekova <varekova>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-03 10:36:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Jorgensen 2004-04-27 19:23:18 UTC
Description of problem:

The usage message contains the following:

Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
            [- sendmail-options ...]
             ^
This is incorrect, it should be [-- sendmail-options ...] on Linux. 
GNU getopt reorders options unless you tell it not to, so options
placed after the last to-addr are interpreted by mail instead of by
sendmail.  Apparently the -- will separate them so that the options
are interpreted by sendmail instead.  This is an acceptable fix for
the problem, but it needs to be documented correctly.

Version-Release number of selected component (if applicable):

Arch   : i386
Version: 8.1.1
Release: 31.1

How reproducible:

Always.

Steps to Reproduce:

according to the usage message (the manpage says nothing at all about
passing options to sendmail): 

mail recipient@host - -f sender@otherhost

should pass '-f sender@otherhost' to sendmail, but it doesn't.  This
commandline gives an error message from 'mail' that says, "Cannot give
-f and people to send to."  On the other hand:

mail recipient@host -- -f sender@otherhost

properly passes the -f option to sendmail and sets the From: header to
the specified address.

Comment 1 Ivana Varekova 2004-11-03 12:20:18 UTC
Thank you for your notice.
The problem was fixed.
IV

Comment 2 Ivana Varekova 2004-12-03 10:36:03 UTC
Solved with -40.