Sending root mail to an external mail account
Hi All,
I was just thinking that it would be very convenient to have system mail for root, sent to an external pop account. I've been looking online but haven't come up with much. Help much appreciated. I have exim4 installed by default (sid). Thanks, ab |
Ok, I found this:
1) forward root's mail to your local mailbox 2) create /home/yourusername/.forward 3) add the external email address to this file and finish with an empty line. this works on my box. But there is no mailbox in /root, /home/my_user, or /var/mail Confused, ab |
More:
I found that the mailbox files are created at first email. I used: mail -s "test mail" root </dev/null to send a test mail to the user listed in /etc/aliases (root: basic_user and then changed it to root: root and resent the test). Now I have a "mail" file and a "basic_user" file which both received the test mail. With it set to "basic_user" I created a .forward file in /home/basic_user with my pop address: basic_user@email.com No mail was rceived by that external pop account. (yes the account works and receives other mail ;-) -ab |
|
Thanks for the reply. I checked running processes to make sure that exim4 is running. It is:
102 2890 0.0 0.0 6296 928 ? Ss 16:22 0:00 /usr/sbin/exim4 -bd -q30m Then followed your directions to edit the aliases file, making sure to run newaliases when finished. # more /etc/aliases mailer-daemon: postmaster postmaster: root nobody: root hostmaster: root usenet: root news: root webmaster: root www: root ftp: root abuse: root noc: root security: root root: chris@example.com I resent the test mail to root: mail -s "test mail" root </dev/null but still get nothing in my pop account. -ab |
I'd take that email address out of the previous post if I were you (or make it example.com).
Is anything showing up in your maillogs when this happens? |
Nothing in the following /var/logs logs:
mail.log mail.error mail.info mail.warn all blank files Thanks, ab |
found this line in the exim4 log:
2008-11-19 16:08:08 1L2x5c-0006BM-IT ** chris@example.com <root@example.com> R=nonlocal: Mailing to remote domains not supported I guess that's the problem. Now I need to figure out if there is a way to enable support. -ab |
Sounds exim specific, and I can't help there. Note your root email address is showing above.
Quick question though - can you send any external mail or is it just aliases? Try mail -s "test mail" chris@example.com </dev/null |
Thanks for the help and the security tips. ;-)
-ab |
Did you choose local delivery only when configuring exim for the first time?
"dpkg-reconfigure exim4-config" and choose another profile. |
Thanks for the reconfig tip. I'll give that a try.
-ab |
Quote:
I'm trying to do the same thing and can't get any mail sent out externally, I guess all the other mail servers are blocking it. |
Well, I tried to reconfigure but got bogged down in options that I wasn't exactly clear on. Not to say that you shouldn't give dpkg-reconfigure exim4-config a try, just hope you have better luck than I did. If you get it working, will you please post your results?
Many Thanks, ab |
All times are GMT -5. The time now is 03:10 AM. |