How do I email root?

6,792

In order to forward root's e-mails to another e-mail address, you could change the line related to root in the file /etc/aliases. For instance:

root: [email protected]

To forward e-mails of a UNIX user (let say myuser) to another e-mail address ([email protected]), had the file .forward in the home folder of myuser. This file should contain one line with the e-mail to which you would like to forward the e-mails to.

Regarding your problem with the command mail root, you should maybe have a look at the exim4 log files, located in /var/log/exim4. They may give you some clues about the problem.

Share:
6,792

Related videos on Youtube

Michael Mrozek
Author by

Michael Mrozek

Updated on September 18, 2022

Comments

  • Michael Mrozek
    Michael Mrozek almost 2 years

    I am on Debian squeeze and I'd like to forward my root emails to my real email. I setup exim to use gmail so when I write mail [email protected] it sends to my email. However, now I'd like to email root and have it forward my emails to my real email address.

    mail root does not send an email to root. If I create a different user and use the root email to that person it works. But that person or root emailing root does not. Did I break root emails? How do i fix this?

    I am using exim4, which was the default.

    • Stéphane Gimenez
      Stéphane Gimenez over 12 years
      You can move your edit to an answer (You will be able to mark it as the accepted answer later if there is no better answer).
  • Garrett Bluma
    Garrett Bluma over 12 years
    Perfect answer, do you happen to know the answer to this one? unix.stackexchange.com/questions/21574/…