PDA

View Full Version : Help forward root email to me


domino
18th August 2005, 11:35
Root receives mail every now an again. Seeing that I have not found a way to fetch root email, I want to forward all email from root to my main email account on the same server. Please help?

till
18th August 2005, 12:06
Root receives mail every now an again. Seeing that I have not found a way to fetch root email, I want to forward all email from root to my main email account on the same server. Please help?

Have you tried to make a file

/root/.forward

that contains only the email address where the mail shall be forwarded to?

domino
18th August 2005, 12:12
Man, it's hard finding the simplist answers on google. Is it possible to forward existing mail? I have maybe 300kb of logs stuck in root mailbox.

Thank you

till
18th August 2005, 12:17
Man, it's hard finding the simplist answers on google. Is it possible to forward existing mail? I have maybe 300kb of logs stuck in root mailbox.

Thank you

If you have a maildir system, you can copy the mails simply in the maildir of another account, maybe you have to change tho owner too.

If you have mbox files, make shure thet the account that shall receive the mail has no mails inside, then copy the mbox file from the root user over the (empty) mbox file of the other user. It is a good idea to stop postfix while you are doing this :D

domino
18th August 2005, 12:26
Great! Will do that. Or if you're too lazy or have no idea what maildir or mbox is, just log into webmin and read the email then delete them :D. Now just wait to for the next email logs to get forwarded. :cool:

linuxfast
21st September 2005, 13:50
If you are running logwatch, you can also edit the line in your logwatch.conf which is:

MailTo = root

to make sure that the logwatch files come to you directly.

Personally, I also like to change the detail to high

# The default detail level for the report.
# This can either be Low, Med, High or a number.
# Low = 0
# Med = 5
# High = 10
Detail = High

domino
21st September 2005, 17:04
Yea, I already set log watch to high. Now I get mail from logwatch I completely don't understand :eek:.

themachine
9th October 2005, 00:31
I've always found that adding a "root: username_to_forward_to" line to your '/etc/aliases' file is the best option for forwarding root's email.

transops.net
17th December 2005, 12:56
Man, it's hard finding the simplist answers on google. Is it possible to forward existing mail? I have maybe 300kb of logs stuck in root mailbox.

Thank you

If you need to convert an MBOX style email repository to MAILDIR format, you can try this handy little script: http://batleth.sapienti-sat.org/projects/mb2md/

I used it on over 6 GB of mailboxes, and it was finished in about half an hour on my test rig. :)

falko
17th December 2005, 14:46
If you need to convert an MBOX style email repository to MAILDIR format, you can try this handy little script: http://batleth.sapienti-sat.org/projects/mb2md/

I used it on over 6 GB of mailboxes, and it was finished in about half an hour on my test rig. :)
I've also used this once, and it is really good! :)

geekgoddess
2nd May 2006, 16:01
I edited the last line of the /etc/aliases file to forward all root e-mails to my full personal e-mail address - as it resides on another e-mail server. Secondly, I had to cd /usr/bin then run ./newaliases to restart the service.
I jumped into webmin and forwarded the last e-mail sent to root back to root, then I opened my personal e-mail and there it was... the e-mail that I forwarded to root IN MY MAILBOX. Love it.

Thanks so much everyone! Keep up the great job!

Beth