I've been a Linux admin off/on for about 2 years at work working with other O/S'es at the same time. Have been a UNIX admin for about 20 years so I'm not a newb by any means. But this one has me stumped as I can't see any reason for it.
Situation - a non-root user tries to send email and then receives an error:
---------------------------------------------------------------------------
sendmail -s "Test"
joe@somewhere.org < (some text file)
WARNING: RunAsUser for MSP ignored, check group ids (egid=100, want=51)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
where 100 is the userID sending the email and 51 is the userID of smmsp.
---------------------------------------------------------------------------
Here's what I have on this server:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
# rpm -qa | grep -i mail
mailcap-2.1.31-2.el6.noarch
sendmail-8.14.4-8.el6.x86_64
libreport-plugin-mailx-2.0.9-19.el6.x86_64
procmail-3.22-25.1.el6_5.1.x86_64
mailx-12.4-7.el6.x86_64
# ls -ld *queue
drwxrwx---. 2 smmsp smmsp 3559424 Jan 23 09:40 clientmqueue
drwx------. 2 root mail 4096 Jun 17 2010 mqueue
sendmail itself (from the final link, and yes, all the links are correct):
# ls -l /usr/sbin/sendmail.sendmail
-rwxr-sr-x. 1 root smmsp 833512 Jun 17 2010 /usr/sbin/sendmail.sendmail
From passwd and group:
# grep smmsp /etc/passwd /etc/group
/etc/passwd:smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
/etc/group:smmsp:x:51:
resolv.conf is also correct.
And finally from the sendmail and submit config files:
# grep smmsp submit.cf sendmail.cf
submit.cf:O RunAsUser=smmsp
submit.cf:O TrustedUser=smmsp
[root@<server_name> mail]# grep RunAsUser submit.cf sendmail.cf
submit.cf:O RunAsUser=smmsp
sendmail.cf:#O RunAsUser=sendmail
---------------------------------------------------------------------------
So everything looks as it should.
I did a ton of searches all day yesterday trying to figure this out and they all say that it's a perms issue with either sendmail itself or the queue directories. As you can see, they are all correct. So what gives? Why the error?
Any help will be greatly appreciated.