[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: set from: address in standard command-line mailer (/usr/bin/mail)



Hi,

On Tue, Oct 18, 2005 at 11:04:17AM +0900, Miles Bader wrote:
> When I send mail using /usr/bin/mail, the From: address is wrong; it's
> apparently just prepending my user-id to my domainname.
> 
> How can I tell mail to use a different From: address?  I've trawled
> through the docs, but not found an answer... [the docs are pretty weird
> to tell the truth -- they're a flashback to about 1983, and make it
> sound like network email is something of a novelty.]

The documentation (man page) is actually very well written and clear:

     -a      Specify additional header fields on the command line such as "X-
             Loop: foo@bar" etc.  You have to use quotes if the string con-
             tains spaces.  This argument may be specified more than once, the
             headers will then be concatenated.

so.. 'mail -s "blah" -a "From: my.address@foobar.org" to.whoever@something.com

Good luck,
Cameron Matheson



Reply to: