Operating System - HP-UX
1820096 Members
3567 Online
109608 Solutions
New Discussion юеВ

Change sender name using sendmail

 
SOLVED
Go to solution
Fuad_1
Regular Advisor

Change sender name using sendmail

Hi,

How to change the sender name using sendmail?

Thanks.
Set goals, and work to achieve them
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: Change sender name using sendmail

By saying "change sender name", I am assuming that you meant the email address where the email is coming from.

Example:

you are

root@server.domain.com

and you want your email messages sender to look like

someuser@somedomain.com

if this assumption is right, this should fix your problem

(echo "From: alibaba@somedomain.com";echo " ";cat file2send)|sendmail -v recipient@domain.com

Hope this helps
________________________________
UNIX because I majored in cryptology...
Arunvijai_4
Honored Contributor
Solution

Re: Change sender name using sendmail

You can do it using mailx easily,

mailx -r someone@somewhere.com -s "whatever" email_address.

Also, you can DM macro in /etc/mail/sendmail.cf

# Masquerade as (DM): #
# #
# If you wish to have mail appear to be from some host or location other than the loacl host, set macro M to the name you wish to masquerade as. This is also know as site hiding and was set using the DY macro in previous releases of hp-ux.

# who I masquerade as (null for no masquerading) (see also $=M)
DMcompany.com

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Fuad_1
Regular Advisor

Re: Change sender name using sendmail

Thanks Arunvijai.
Set goals, and work to achieve them