Exim4 and /var/mail/mail

Posted: March 23, 2013 in Debian, Debian package, Server, Troubleshooting
Tags: , , , , , , ,

Exim4 does not transfer mails to the root user by default. If you’re trying to test Exim4 by sending an email to the root user, it will never be delivered to root user.That’s a default configuration from Debian. Instead, all emails for root user are transferred to /var/mail/mail.
Here is where it is configured :

root@localhost:~# cat /etc/exim4/conf.d/router/mmm_mail4root

### 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
If you need to redirect emails to root, then add the right user in /etc/aliases at line where root word stands. Then run the command newaliases to take this change into account. Send a test email to root and log in to the user you’ve just configured and check its email box with the mail command. You should be able to read the email you’ve just sent a few seconds before.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s