Operating System - HP-UX
1752636 Members
5717 Online
108788 Solutions
New Discussion юеВ

Re: Can I set the sender using mailx?

 
SOLVED
Go to solution
Tonya Underwood
Regular Advisor

Can I set the sender using mailx?

I would like to be able to do the following style of mail in a script:

mailx -s subject user@domain.com < file

However, because of security purposes within my environment, I need to be able to set the sender to drdrill.im@domain.com

Is there a way to do this with mailx?
6 REPLIES 6
RAC_1
Honored Contributor
Solution

Re: Can I set the sender using mailx?

man mailx

You need to add otion -r

Anil
There is no substitute to HARDWORK
Tonya Underwood
Regular Advisor

Re: Can I set the sender using mailx?

Ok... that did work.

How would you do the exact same thing with sendmail?
Kent Ostby
Honored Contributor

Re: Can I set the sender using mailx?

Tonya -- I had these questions for mailx and sendmail a couple of months ago.

Here's a link to that thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=685447
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Dave La Mar
Honored Contributor

Re: Can I set the sender using mailx?

Tonya-
More than you care to know in the attached.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."
Tonya Underwood
Regular Advisor

Re: Can I set the sender using mailx?

Weird thing is... mailx is appending .crypt to the end of my filename. Can I keep it from doing this?
Dave La Mar
Honored Contributor

Re: Can I set the sender using mailx?

Tonya-
Please share the syntax you are using.

Regards,

dl
"I'm not dumb. I just have a command of thoroughly useless information."