Operating System - HP-UX
1826341 Members
4017 Online
109692 Solutions
New Discussion

Specify reply address using "mail"

 
Krishnan Viswanathan
Frequent Advisor

Specify reply address using "mail"

Hi,

I am trying to figure out a way of specifying a reply-to address while using "mail" command on linux. Although the "mailx" package is installed on my RH linux system, there is no corresponding "mailx" utility like HP-UX

Any thoughts ? (other than using "sendmail or mutt or pine ?)

Thanks
9 REPLIES 9
RAC_1
Honored Contributor

Re: Specify reply address using "mail"

You can set DM macro in sendmail.cf. That will apply to all users.
There is no substitute to HARDWORK
Krishnan Viswanathan
Frequent Advisor

Re: Specify reply address using "mail"

Thanks RAC, I do have masquerading enabled.

Each message would need to have a separate return address depending on the application functionality. Again, this is not just on one box, so installing and maintaining custom mail applications is out of question. It is never an issue on HP-UX or Solaris since they have both "mailx" in addition to "mail".
Mark Ellzey
Valued Contributor

Re: Specify reply address using "mail"

Krishnan,

There is the mailx utility on HP-UX. See man mailx. It's located at /usr/bin/mailx.

Regards,
Mark
Geoff Wild
Honored Contributor

Re: Specify reply address using "mail"

On the linux box, you should be able to use mail:

mail -s "my subject" you@yourdomain.com
Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Rick Garland
Honored Contributor

Re: Specify reply address using "mail"

The virtualhosting and/or genericstable may be of help to you.

Check out the web site
http://www.sendmail.org/virtual-hosting.html
Mel Burslan
Honored Contributor

Re: Specify reply address using "mail"

at the biginning of your outgoing message, if you happen to insert this line as follows:

Reply-To: user@domain.com

followed by a blank line,

you will set the return address of the email to user@domain.com address. So people who hit the reply button, will send an email to this address not the original sender address.

hope it helps

________________________________
UNIX because I majored in cryptology...
Tom Smith_9
Frequent Advisor

Re: Specify reply address using "mail"

Try using "mailx" with the "-r" option.

It works well for me.

-Tom
Krishnan Viswanathan
Frequent Advisor

Re: Specify reply address using "mail"

Thanks guys for the ideas. As I mentioned initially, this is needs to be implemented on a bunch of linux boxes (there is no "mailx" utility on linux and only "mailx" has the "-r" option)

Using "sendmail" seems to be the only option for setting a return address and I was hoping to avoid that since it involves changes to too many scripts and "sendmail" is not client friendly. The other option is to use perl's sendeasy and smtp modules which also involves lot of changes to our HP-Ux scripts that use mailx.

Thanks
-Krishnan
Krishnan Viswanathan
Frequent Advisor

Re: Specify reply address using "mail"

I have decided to use sendmail so it is easily portable to linux/hp

Thanks!