Red Hat Bugzilla – Bug 121781
usage text and man page don't have correct delimiter for sendmail-options
Last modified: 2007-11-30 17:10:41 EST
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
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.
Thank you for your notice.
The problem was fixed.
Solved with -40.