Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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 "yourmail@example.com" > ~/.forward

the mails should be forwarded to the e-mail you've specified (in this case, yourmail@example.com)

share|improve this answer
1  
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 W. Aug 24 '11 at 14:43
1  
@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 user@mybox.example.net, 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
1  
@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

 
discard

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.