LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2012, 12:20 AM   #1
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Rep: Reputation: 17
Root mail going to user "mail" instead of root


I running Linux Mint Debian Edition tracking testing and have started a cron job that will send something to the root mailbox. Mint has heirloom and exim4 installed. However, root's mail was getting nothing. I realized that in /etc/aliases, there was a line

Code:
root: mint
Since you can't log into the mint user (and /var/mail had no mint file), I commented out the root: mint line and did a:

Code:
/etc/init.d/exim4 restart
Now, mail is going to the user mail not root. Roots mail can be found in /var/mail/mail.

For some reason, it is not going to the root user. As root, I can

Code:
su mail
But this is inconvenient. I would like root's mail to go to root.

Can someone let me know how to have root's mail actually go to root's mailbox?

There is no /root/.forward file, either.

Thanks,
Narnie

Last edited by narnie; 03-26-2012 at 12:37 AM.
 
Old 03-26-2012, 02:04 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,376
Blog Entries: 55

Rep: Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555
Quote:
Originally Posted by narnie View Post
Can someone let me know how to have root's mail actually go to root's mailbox?
That's the wrong approach. In /etc/aliases mail for root should go to an unprivileged account a human reads.
 
Old 03-26-2012, 05:30 PM   #3
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by unSpawn View Post
That's the wrong approach. In /etc/aliases mail for root should go to an unprivileged account a human reads.
On previous systems I've used (read, Ubuntu or Linux Mint Ubuntu derivatives), root mail went to root until I changed it to my username. I want to start from "scratch" if you will and know what is hijacking root's mail to stay in /var/mail/mail instead of /var/mail/root.
 
Old 03-26-2012, 06:45 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,376
Blog Entries: 55

Rep: Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555
Probably a catch-all delivery setting. In replies please include your Exim configuration so anyone using Exim can check it but best first check routers in Chapter 7 - The default configuration file.
 
Old 03-26-2012, 07:51 PM   #5
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by unSpawn View Post
Probably a catch-all delivery setting. In replies please include your Exim configuration so anyone using Exim can check it but best first check routers in Chapter 7 - The default configuration file.
I had done a:

Code:
grep -R mail /etc/exim4
And didn't see anything interesting.

I decided to do a:

Code:
grep -R root /etc/exim4
And got an interesting hit that fits along with what you said above about routers. In /etc/exim4/conf.d/mmm_mail4root (which should have giving me a hint but was among many other files so I couldn't see the forest for the trees) I found this:

Code:
### router/mmm_mail4root
#################################
# deliver mail addressed to root to /var/mail/mail as user mail:mail
# if it was not redirected in /etc/aliases or by other means
# Exim cannot deliver as root since 4.24 (FIXED_NEVER_USERS)

mail4root:
  debug_print = "R: mail4root for $local_part@$domain"
  driver = redirect
  domains = +local_domains
  data = /var/mail/mail
  file_transport = address_file
  local_parts = root
  user = mail
  group = mail
That was the smoking gun I needed. Now I know what was going on. Thanks!
 
1 members found this post helpful.
Old 03-26-2012, 08:05 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,376
Blog Entries: 55

Rep: Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555Reputation: 3555
Well done.
 
  


Reply


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
PostFix + ISPConfig mail return "unknown user" or "no such user here" Jacky444 Linux - Server 1 02-10-2010 04:21 PM
How do I enforce in Red hat linux that only root user be a member of the "root" group sultf Linux - Security 4 01-08-2009 04:42 PM
"MailScanner" wrong owner (expected mail but is root) mrlucio79 Linux - Software 1 01-05-2006 04:09 PM
Qmail problem: ISP mail and virtual mail, "sorry no mailbox, here by that user" barryw Linux - Networking 7 05-28-2005 12:43 PM
SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db? singying304 Linux - Networking 4 02-28-2005 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration