Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use mail to send mail. I want change the "From" field and the -a flag should let me do this. However, it seems like my version of mail doesn't support -a. WHen I try to use it, I get this:

[me@host ~]$ mail -a
mail: invalid option -- a
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
            [-- sendmail-options ...]
       mail [-iInNv] -f [name]
       mail [-iInNv] [-u user]

That looks like an older set of options than the man page I found online:

How can I update mail? I tried doing sudo yum update mail but it said there is nothing to update. I am running on Centos 5.2. Is a newer version not available?

share|improve this question

Why do you assume its older?

According to the link you provided, the -a flag requires a parameter - so 'mail -a' would not be valid even with that version of mail.

I expect you'll find that this option is feature peculiar to the mail command shipping with (some versions of) BSD.

You might want to have a look at mutt (which allows you to specify the from address as an env var) and is available on Centos/Redhat. But do bear in mind that only trusted users can manipulate the from address when invoking mail locally rather than via SMTP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.