Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-06-2007, 11:32 PM   #1
Sagebrush Gardener
LQ Newbie
Registered: Mar 2007
Posts: 29

Rep: Reputation: 15
sendmail - nonroot users can't send mail

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 -- works fine

as an unprivileged user:

$ echo test | mail -- 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:, ctladdr=root (0/0), delay=00:00:00, xd elay=00:00:00, mailer=relay, pri=30005, relay=[] [], 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:, ctladdr=luser (649/649), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30005, relay=[] [], 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/
-r--r--r-- 1 root bin 41339 Mar 6 17:48 /etc/mail/

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?

Old 03-08-2007, 11:49 AM   #2
Sagebrush Gardener
LQ Newbie
Registered: Mar 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Old 03-08-2007, 01:59 PM   #3
Sagebrush Gardener
LQ Newbie
Registered: Mar 2007
Posts: 29

Original Poster
Rep: Reputation: 15
Fixed it!

Using sendmail -bt, I determined that the sendmail rulesets were returning a "nouser" error for any local user but root. This is what was causing the "Data format error" when a nonroot user tried to send mail.

And why was anyone but root getting a "nouser" error? I had this in my virtusertable... error:nouser

I had set this up a long time ago to keep from getting spam in the mailboxes of pseudousers like bin, daemon, apache, etc.. I commented out the nouser line and everything works fine now. I still have no idea why it did not cause a problem until recently.

Time to find the problem: 5 hours
Time to fix it: 5 seconds


Last edited by Sagebrush Gardener; 03-08-2007 at 02:00 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail: how to send mail from my yahoo e-mail address harryhaller Slackware 3 11-13-2006 11:00 PM
Mail Server Issues; Can't Send E-mail (using sendmail) Vegetarian Smoker Linux - Software 1 06-18-2006 02:16 PM
Sendmail - Remote users cant send Skip-DMP Linux - Software 5 02-21-2006 01:53 PM
Help, how to only send mail to use sendmail ERBRMN Linux - General 2 01-13-2006 05:04 AM
Sendmail: How can I avoid some users send mail to outside domains? lordphantom82 Linux - Software 0 11-16-2004 07:23 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration