Operating System - HP-UX
1834126 Members
2022 Online
110064 Solutions
New Discussion

Re: unable to use sendmail command as user

 
SOLVED
Go to solution
Jade Bulante
Frequent Advisor

unable to use sendmail command as user

I modified the .profile and .dtprofile to have path for sendmail /usr/sbin/sendmail but unable to execute. I get error sh sendmail not found. How do I fix this?
6 REPLIES 6
Sanjay_6
Honored Contributor
Solution

Re: unable to use sendmail command as user

Hi,

Have you tried using the absolute path to sendmail. if /usr/sbin/sendmail works then check your path once again.

Hope this helps.

regds
Jade Bulante
Frequent Advisor

Re: unable to use sendmail command as user

Absolute path works but I want user to just issue sendmail command.
Sanjay_6
Honored Contributor

Re: unable to use sendmail command as user

Hi,

then check the path syntax. You might be making a mistake. Are you exporting the PATH variable after adding /usr/sbin to it.

Hope this helps.

regds
Jade Bulante
Frequent Advisor

Re: unable to use sendmail command as user

Yes, part of the .profile is to export the path. Could it be that you need to be a super user to send mail?
Sanjay_6
Honored Contributor

Re: unable to use sendmail command as user

Hi,

You don't need to be root to use sendmail. If you are able to use sendmail from the command line using the absolute path for sendmail, then you should be able to use sendmail without the absolute path if the search path "/usr/sbin" is added into your .profile.

export PATH=$PATH:/usr/sbin

hope this helps.

Regds
Jade Bulante
Frequent Advisor

Re: unable to use sendmail command as user

Thanks. It works.