Operating System - HP-UX
1844080 Members
3615 Online
110227 Solutions
New Discussion

how to change "sender" while sending out email

 
SOLVED
Go to solution
Gary Yu
Super Advisor

how to change "sender" while sending out email

Hi all,

I'm trying to debug some outbound email issue, if the mail failed to reach the recipient, I wanna get the bounced back mail with error message from mail server to my company mail account instead of the login_name@hostname at the HP server.

is there anyway to change the "sender" to other account at other domain using mailx or elm? DM macro in sendmail.cf can only change domain name, plus I don't want to change sendmail's configure ( it will affect others), the best way is to do it at client side.

I tried to add "From" entry at .elm/elmheaders file, but in the /var/adm/syslog/mail.log, it still shows "from=mylogin_name" ... instead of the mail account I put in the header file.

any idea?

thanks,
Gary
2 REPLIES 2
Sridhar Bhaskarla
Honored Contributor
Solution

Re: how to change "sender" while sending out email

Hi,

To change the sender use sendmail with -f option.

cat file |sendmail -f(from_addr) to_addr

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Christopher Caldwell
Honored Contributor

Re: how to change "sender" while sending out email

cat yourfile | mailx -r address

Pass [address] to network delivery software.

The genericstable rewrites the sender address if you've got a large number of addresses you'd like to rewrite.