LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-31-2009, 06:10 PM   #1
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
no mail for local users


Hello everyone,

I am using Slack 12.2 and I am not able to read my local mails. For instance, I use an user X session to send a mail to another user Y. When I type `mail` in the user Y session, I got the message `no mail for Y`. The permission for rc.sendmail is set to 755. Any idea about what's going on? Thanks.
 
Old 05-31-2009, 10:47 PM   #2
lyle_s
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 392

Rep: Reputation: 55
Do you have procmail installed?

Lyle.
 
Old 05-31-2009, 11:23 PM   #3
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
Yep, I have procmail installed. I even tried a re-install of that package but it did not change anything to the problem.
 
Old 06-01-2009, 02:35 AM   #4
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
Exactly how are you trying to use sendmail?

First, I would make sure sendmail was running (ps aux | grep sendmail), if it isn't, start it: /etc/rc.d/rc.sendmail start
Test if sendmail works: echo "<content>" | sendmail -s "<subject>" <user>

where user should at this point be a local user. I.e. I'm loged in as my regular user, and type
echo "Test" | sendmail -s "Testmail" root
then I would log in as root and check my e-mail.

Does this work?
 
Old 06-01-2009, 06:47 PM   #5
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Dinithion View Post
Exactly how are you trying to use sendmail?

First, I would make sure sendmail was running (ps aux | grep sendmail), if it isn't, start it: /etc/rc.d/rc.sendmail start
Test if sendmail works: echo "<content>" | sendmail -s "<subject>" <user>

where user should at this point be a local user. I.e. I'm loged in as my regular user, and type
echo "Test" | sendmail -s "Testmail" root
then I would log in as root and check my e-mail.

Does this work?
The (ps aux | grep sendmail) gave:

Quote:
root 3438 0.0 0.0 6784 1920 ? Ss 17:26 0:00 sendmail: accepting connections
smmsp 3441 0.0 0.0 6440 1620 ? Ss 17:26 0:00 sendmail: Queue runner@00:25:00 for /var/spool/clientmqueue
freespirit 4206 0.0 0.0 2088 660 pts/1 S+ 17:36 0:00 grep sendmail
The echo (echo "Test" | sendmail -s "Testmail" root) gave:

Quote:
WARNING: RunAsUser for MSP ignored, check group ids (egid=100, want=25)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
And naturally, when I logged in as root, there was no mail for root.
 
Old 06-03-2009, 06:46 PM   #6
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
Any new suggestions?
 
Old 06-04-2009, 02:41 AM   #7
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
I get the same error when I do
/etc/rc.d/rc.sendmail stop
before trying to send e-mails. I doubt this is what's wrong, since sendmail is running according to ps.

Of course you could try to run '/etc/rc.d/rc.sendmail start' and retry sending emails.

Other then that, I think it might be something wrong with inetd, but inetd are used when remote clients are sending email to the local machine, not when a local user sends an email to another local user, so that sound unlikely as well. Anyway, I haven't used inetd in a few years so I can't help you there. Other then these tips, I can't really think of something else to be wrong.
 
Old 06-05-2009, 11:20 PM   #8
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
Does anyone else have some ideas about the possible source of the issue?
 
Old 06-06-2009, 01:37 PM   #9
e5150
Member
 
Registered: Oct 2005
Location: Sweden
Distribution: Slackware and Alpine
Posts: 132

Rep: Reputation: 100Reputation: 100
DISCLAIMER: I don't really know shit about sendmail, this might be bad advice.

I've had similar problems, I think it was due to erroneous permissions, and the warning message:
"WARNING: RunAsUser for MSP ignored, check group ids (egid=100, want=25)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser."
seem to hint at that as well.

What are your permissions on /usr/sbin/sendmail? It ought to be owned by root:smmsp with 2555 for setgid.
And /var/spool/clientmqueue should be owned by smmsp:smmsp and be group writable.

So, this might fix your problem:

chown root:smmsp /usr/sbin/sendmail
chmod 2555 /usr/sbin/sendmail
chown smmsp:smmsp /var/spool/clientmqueue
chmod 770 /var/spool/clientmqueue

(And maybe the user who is trying to run sendmail has to be a member of the smmsp group, somehow that doesn't seem quite right...)
 
Old 06-06-2009, 07:25 PM   #10
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by e5150 View Post
DISCLAIMER: I don't really know shit about sendmail, this might be bad advice.

I've had similar problems, I think it was due to erroneous permissions, and the warning message:
"WARNING: RunAsUser for MSP ignored, check group ids (egid=100, want=25)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser."
seem to hint at that as well.

What are your permissions on /usr/sbin/sendmail? It ought to be owned by root:smmsp with 2555 for setgid.
And /var/spool/clientmqueue should be owned by smmsp:smmsp and be group writable.

So, this might fix your problem:

chown root:smmsp /usr/sbin/sendmail
chmod 2555 /usr/sbin/sendmail
chown smmsp:smmsp /var/spool/clientmqueue
chmod 770 /var/spool/clientmqueue

(And maybe the user who is trying to run sendmail has to be a member of the smmsp group, somehow that doesn't seem quite right...)
I checked the permissions and ownerships of all the files you mentioned and they are exactly set as you described them. So obviously, the issue doesn't reside in the files permissions and ownerships. One more thing I've noticed is that when I try to open the mailbox of the user X using `mutt`, I get a message saying: /var/spool/mail/X : No such file or directory (errno=2)
 
Old 06-07-2009, 05:21 PM   #11
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
The echo (echo "Test" | sendmail -s "Testmail" root) gave:

Quote:
WARNING: RunAsUser for MSP ignored, check group ids (egid=100, want=25)
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
The "-s" bit is what's causing the errors
Quote:
One more thing I've noticed is that when I try to open the mailbox of the user X using `mutt`, I get a message saying: /var/spool/mail/X : No such file or directory (errno=2)
This is because the sendmail command is failing and not sending to that user so the directory isn't created.

Try this as user Y:

Code:
echo "Hello user X" | sendmail X
su - X
mail
to see if mail is being sent from Y to X.
 
Old 06-07-2009, 11:30 PM   #12
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
I logged in as user Y and I did echo "Hello user X" | sendmail X". The result was:

/home/Y/dead.letter... Saved message in /home/Y/dead.letter

And of course, the `su - X; mail` gave:

No mail for X
 
Old 06-08-2009, 02:39 AM   #13
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
The next test is to see if sendmail thinks it's deliverable to user X with :

Code:
su -c "sendmail -bv X"
Next have a look at the end of the file /var/log/mailog to see what's reported.
 
Old 06-08-2009, 07:45 AM   #14
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
su -c "sendmail -bv X" gave:

X... deliverable: mailer local, user X

and this is the last line of maillog:

Jun 8 06:41:39 FreeCity sendmail[12237]: gethostbyaddr(192.168.0.102) failed: 1
 
Old 06-08-2009, 08:47 AM   #15
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Ok - sendmail appears to know about the user but not the host. I take it your host is FreeCity and it's IP is 192.168.0.102.

Probably the easiest fix is, as root, run netconfig and set up your host name, IP/DHCP settings and domain name. It may be easiest after all that to reboot if thats possible but if not you may be OK by running "/etc/rc.d/rc.inet1 restart" and "/etc/rc.d/rc.sendmail restart" as root.

Next try the echo "Hello" | sendmail X from user Y and check the bottom of /var/log/maillog if there is a failure.

It would appear that possibly something is wrong in the /etc/hosts file as sendmail is trying to get the name of your host from it's IP address and failing.
 
  


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
Mail(x) on Slackware 12.2 does not send mail to local users wilson47 Linux - Software 4 03-03-2009 03:46 PM
postfix local users send mail restriction y_zl Linux - Security 3 01-04-2009 11:04 PM
mail and local unix users OTIM Linux - Server 4 12-04-2007 03:50 AM
Postfix: Do not allow local users to send mail Termina Linux - Server 1 03-22-2007 05:15 PM
local users can't see website or get mail Michele Linux - Newbie 8 07-01-2004 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:52 AM.

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