After my CentOS 6.4 install, sendmail-related components were set up as follows:
mail:x:12:mail,postfix in /etc/group
drwx------ 2 root mail 4096 Sep 6 14:06 /var/spool/mqueue
And I was getting these errors when invoking a shell script to send email with an attachment, but not a plain
mail -s "subject" recipient < /dev/null on the command line
Sep 6 12:46:08 localhost sendmail: NOQUEUE: SYSERR(ics): can not chdir(/var/spool/mqueue/): Permission denied
This is what I did to fix the problem, but why did I have to do it, and what else could I have done? Those are my questions.
mail:x:12:mail,postfix,smmsp in /etc/group
drwxrwx--- 2 root smmsp 4096 Sep 6 14:06 /var/spool/mqueue
To make matters stranger, a CentOS 5.9 system set up just the way my system was set up works fine without the error.