This is killing me. I have been trying for hours to fix this problem and it's got me beat.
This server normally just receives mail, so I didn't notice the problem for a few days. But today a user told me that his forwarding from .procmailrc wasn't working (forwarding does work from .forward). I narrowed the problem down to the fact that unprivileged users cannot send mail now:
as root:
# echo test | mail
test@somewhere.com -- works fine
as an unprivileged user:
$ echo test | mail
test@somewhere.com -- fails
$ /home/luser/dead.letter... Saved message in /home/luser/dead.letter
Here is what maillog says:
sending mail as root:
Mar 6 19:58:22 dev1 sendmail[7994]: l273wMNr007994: from=root, size=5, class=0, nrcpts=1, relay=root@localhost
Mar 6 19:58:22 dev1 sendmail[7994]: l273wMNr007994: to=test@somewhere.com, ctladdr=root (0/0), delay=00:00:00, xd elay=00:00:00, mailer=relay, pri=30005, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l273wMpO007995 Message accepted for delivery)
sending mail as unprivileged user:
Mar 6 20:03:43 dev1 sendmail[8144]: l2743hWi008144: from=luser, size=5, class=0, nrcpts=1, relay=luser@localhost
Mar 6 20:03:43 dev1 sendmail[8144]: l2743hWi008144: to=test@somewhere.com, ctladdr=luser (649/649), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30005, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error
I think everything is the same, except root gets "stat=Sent" while the unprivileged user gets "stat=Data format error".
I believe my important file and directory permissions are correct:
drwx------ 2 root mail 15360 Mar 6 21:16 /var/spool/mqueue/
drwxrwx--- 2 smmsp smmsp 5120 Mar 6 21:09 /var/spool/clientmqueue/
-r-xr-sr-x 1 root smmsp 640449 Mar 6 18:40 /usr/sbin/sendmail
drwxr-xr-x 31 root root 3072 Mar 6 20:53 /etc
drwxr-xr-x 2 root root 1024 Mar 6 19:49 /etc/mail
-r--r--r-- 1 root bin 60646 Mar 6 17:48 /etc/mail/sendmail.cf
-r--r--r-- 1 root bin 41339 Mar 6 17:48 /etc/mail/submit.cf
I'm trying to think what I might have done a few days ago to break this. I was trying a lot of things to debug another problem. One thing I remember is that I upgraded procmail to v.3.22. But I don't think that should have any effect on outgoing mail.
Does anyone have a clue for me?
Thanks.