1752567 Members
5146 Online
108788 Solutions
New Discussion юеВ

mailx sender's name

 
WWY
New Member

mailx sender's name

Hi All,

I'd like to specific a sender's name instead of the default one. Could anyone tell me how I can do it.

My unix version:
HP-UX etjisux2 B.11.11 U 9000/800

Thanks,
Kevin
5 REPLIES 5
Ivan Krastev
Honored Contributor

Re: mailx sender's name

Try this:

sendmail -f sender@domain ...

Or rewrite senders names - http://docs.hp.com/en/B2355-90147/ch04s03.html#cciecbcb


regards,
ivan
Wouter Jagers
Honored Contributor

Re: mailx sender's name

Try the -r option to mailx:

# echo test | mailx -s "some subject" -r some@mailaddress.com recipient@email.com

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Yogeeraj_1
Honored Contributor

Re: mailx sender's name

hi Kevin,

e.g.

cat /etc/hosts |mailx -r "from name " -s "Mail subject" destname@domain.mu

in fact, you can specify *any* name/email address when specifying the value for the -r switch

hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Doug O'Leary
Honored Contributor

Re: mailx sender's name

Hey;

The options specified above work for individual runs. If you *always* want a user's name to be rewritten, you can use the genericstable. You may have to rebuild the sendmail.cf file to support it, but that's pretty easy. Let me know if you want specifics.

Once sendmail supports the genericstable, just create a file /etc/mail/genericstable with the format:

${source} ${rewrite}

For instance:

oleary dkoleary@olearycomputers.com

would rewrite any mail coming from oleary to appear as if it were coming from dkoleary@olearycomputers.com

Works pretty well.

Doug


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
WWY
New Member

Re: mailx sender's name


Many many thank for all of your answers!