Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change "Sender" using Linux mail?

Status
Not open for further replies.

jeffchel

MIS
Sep 13, 1999
4
US
In Solaris, if I used the mailx command I could use -r to have it substitute whatever I wanted as the sender name. (mailx -s "Test" -r "Myself" john_doe@mycompany.com < /tmp/file.doc) - This would send an e-mail to john_doe@mycompany.com with the contents of /tmp/file.doc having the subject line of Test and showing it was sent by Myself (even though I was sending it as root).

The mail program in Linux doesn't seem to have this capability. Anyone know of a way to make this work? Thanks.
 
Hi,

Doing a google for "mailx" eventually yielded an open-source program called "nail". nail appears to be a mailx clone, among many other things, and it looks like it has the option you are looking for.

Here are the first few lines from nail's manpage:

NAME
nail - send and receive Internet mail

SYNOPSIS
nail [-BDdFintv~] [-s subject] [-a attachment ] [-c cc-addr] [-b bcc-
addr] [-r from-addr] [-h hops] [-A account] [-S vari-
able[=value]] to-addr . . .
nail [-BDdeHiInNRv~] [-T name] [-A account] [-S variable[=value]] -f
[name]
nail [-BDdeinNRv~] [-A account] [-S variable[=value]] [-u user]

DESCRIPTION
Nail is an intelligent mail processing system, which has a command syn-
tax reminiscent of ed(1) with lines replaced by messages. It is based
on Berkeley Mail 8.1, is intended to provide the functionality of the
POSIX mailx command, and offers extensions for MIME, IMAP, POP3, SMTP,
and S/MIME. Nail provides enhanced features for interactive use, such
as caching and disconnected operation for IMAP, message threading,
scoring, and filtering. It is also usable as a mail batch language,
both for sending and receiving mail.

More details available at:
<
Hope this helped. --David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top