SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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.
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.
(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)
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
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.
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.