Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
First thing to check is the user's details. When you create a user through the graphical tool, one of the options usually is "Receive System Mail" or something similar. Also check the MAILTO variable set in /etc/crontab and see if it points to test_user.
What about checking /var/log/mail? It should report about every mail activity and tell if messages to root are forwarded to a local user for some reason. Please provide other useful information about the OS running on your machine (you can put this on your LQ profile, so we can see it in the box on the right of your posts) and the mail service. If in doubt try the following command to find out:
Code:
netstat -anp | grep LISTEN | grep :25
to see which process is listening on port 25 (mail) on the localhost.
Moreover, have you tried to send a mail to root from test_user's command line? Is it correctly received?
I put info on my os in my LQ profile, however is Debian etch -4.0
The process listening on port 25 is exim4
I have sent a mail to root from user_test and also in this case the mail is readable from user_test shell and not from the root one, in which i have: No mail for root
In my mail.log file i have only rows as:
Jan 18 14:33:01 localhost sa-exim[7287]: Removed 0 of 0 greylist tuplets in 0 seconds
Jan 18 14:33:01 localhost sa-exim[7287]: Removed 0 of 0 greylist directories in 0 seconds
Ok. Maybe I'm wrong but it does not look like a mail problem, in the sense the mail service works and it probably acts following some "hidden" configuration. Another thing that comes in my mind (since mails are re-directed to the local user) is the presence of a .forward (hidden) file in root's home.
Regarding the crontab issue, not all systems send cron mails on a regular basis. On Fedora you will get a "Log Watch" mail every day, whereas on OpenSuse you get... nothing. I don't know about Debian. Anyway, even if Debian sends mail to root, they are forwarded to the local user in this case.
Ok
In fact it is not a problem about mail daemon, but mail configuration
With your suggestion, i have seen for forward rules, so i have found in /etc/aliases the entry:
root:user_test
present for security issue.Cut this entry, i can read mail from mail shell with type
mail -u mail
also this for secrity issue, because mail to root are delevered to mail user
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.