Hmm, that's odd. Anyway, try a full path of /usr/sbin/sendmail maybe ? That's where it's most likely to be found.
Also: were you typing whereis as one word (which would be correct, and as per RudiC's post) or were you typing it as two words (which wouldn't have worked) ?
Anyway, see how you get on with that path (which should be correct for RHEL/CentOS 6 x86_64, which is what I'm guessing you're using from that rpm output).
It's a symbolic link - not a file itself, but a pointer to somewhere else. Entirely normal, and the way that Red Hat do things as part of their alternatives system.
Now, please just try typing /usr/sbin/sendmail in your command or script or whatever it is you're doing. You should find it works, where typing sendmail on its own doesn't. This is because /usr/sbin (the directory in which this link lives) is not in your path, as you saw previously.
[hyperion@vdcalq04108 /]$ usr/sbin/sendmail -s "test" devipriya.challa@ge.com
WARNING: RunAsUser for MSP ignored, check group ids (egid=10, want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
[hyperion@vdcalq04108 /]$
I'm starting to get the feeling there's some very unusual things about the way your system is set up. Is it a full, complete and otherwise normal install of Red Hat Enterprise Linux 6 or one of its derivatives (e.g. CentOS, Scientific Linux, etc) ? If this has been installed in a non-standard way or otherwise customised heavily, or if you're running in a chroot'd environment or some other kind of cut-down system, it would be handy to know that.
In any case, this error points to a potential permissions problem with the Sendmail binary itself, which shouldn't really happen in a normal out-of-the-box Red Hat system. Could you let us know what you get as the output of ls -l /usr/sbin/sendmail.sendmail , please ?
Hmm, OK - that looks like I'd expect it to. Normally errors like that appear if the SETGID bit isn't properly set on the binary (the 's' in the r-s group permissions), but it appears to be.
Does your Sendmail log shed any light on this ? On RHEL this would normally be /var/log/maillog . You could also take a look at the other logs in /var/log while you're at it, in case something there sheds light on why this isn't working.
Also - is SELinux enabled on this system ? If it is, do you need it to be ?
---------- Post updated at 04:55 PM ---------- Previous update was at 04:49 PM ----------
Hi,
Also, another follow-up: I've just really realised you're running this as a regular user, sorry. If you try using the mail command instead, does it work ? So something like this:
I didn't get any error message while running the command. But I am getting blank email. can anyone tell the attachment parameter for sendmail command.I tried but "a" parameter won't work I guess.