Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Often when I'm working on a terminal, I'll see the "you have new mail in..." message. I know I can see this mail by looking in my system's mail folder, but this is inconvenient. Also, if the message is important, such as a notice about low system resources, or drive problems, or a failed cron job, I may not see that message or check the system's mail folder for weeks or more. How can I set it up so that all these messages get sent to a real email service, like Gmail, which I check daily?

share|improve this question
up vote 2 down vote accepted

See this:

Users can control their own mail delivery by specifying destinations in a file called .forward in their home directories.

So, when you do this:

echo "" > ~/.forward

the mails should be forwarded to the e-mail you've specified (in this case,

share|improve this answer
But you also need to be certain that the messages will be received. most IPs from residential ISPs from which email is sent from (i.e. the sending server originates at a residential IP) get marked as spam and/or ignored by people. You may be able to make it work, but the issue is then dealing with spam. – Thomas Ward Aug 24 '11 at 14:43
@The Evil Phoenix: I'm not suggesting to send this mail to just some random guy out there - I have the forwarding set to my regular mail inbox, so that the mail intended for me goes somewhere where I'll see it (I did whitelist the equivalent of, but that's about it). On a side note, SMTP is a best-effort protocol - you can never be completely certain the messages will be delivered. – Piskvor Aug 24 '11 at 14:56
@The Evil One, This is my problem, as I get my internet through Comcast or Verizon. So getting sendmail to send email is easy. Getting sendmail to send email and get it to reach the recipient is hard, because both Comcast and Verizon block outgoing email sent without authorization. – Cerin Sep 30 '11 at 18:32
On system's I've confirmed have working sendmail, adding ~/.forward doesn't seem to have any effect. – Cerin Oct 15 '11 at 14:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.