LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  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 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.
 
Old 03-08-2007, 11:49 AM   #2
Sagebrush Gardener
LQ Newbie
 
Registered: Mar 2007
Posts: 29

Original Poster
Rep: Reputation: 15
bump
bump
bump
 
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...

root@myhost.mydomain.com me@mydomain.com
@myhost.mydomain.com 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

Phew!

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:28 PM.

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