Bug 473788 - mail -s option not recognized
mail -s option not recognized
Product: Fedora
Classification: Fedora
Component: mailx (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Ivana Varekova
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-30 11:01 EST by Henrique Martins
Modified: 2008-12-01 10:22 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-01 08:29:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Henrique Martins 2008-11-30 11:01:56 EST
Description of problem:
mail -s <subject> 
doesnt' work, spitting out:

send-mail: invalid option -- 's'
send-mail: invalid option -- 's'
send-mail: fatal: usage: send-mail [options]

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

How reproducible:


Steps to Reproduce:
  date | /bin/mailx root -s test
Actual results:
Error message above

Expected results:
Mail sent

Additional info:
It would be nicer if the error message said "mailx" insted of "send-mail".
It's also curious that the invalid option line is printed twice.
Comment 1 Ivana Varekova 2008-12-01 05:04:48 EST
the address to whom the message is sent have to be the last option so you have to use "date | /bin/mailx -s test root".
Comment 2 Dmitry Butskoy 2008-12-01 08:29:15 EST
It is a new implementation of the "mailx" command. Now it intertpetes its command line in well-known standard way: "options" should be before "arguments". The old behaviour of the previous mailx implementation seems to never be supported.

Sorry, but you have to change your scripts (if any) and habits.
Comment 3 Henrique Martins 2008-12-01 10:22:45 EST
It's not my script, but I'll fix it and file the bug upstream in another bugzilla.  As that script hasn't changed in a while, it had to be a change in mailx, as the old one accepted it as posted.

Note You need to log in before you can comment on or make changes to this bug.