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?
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
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 . Now just wait to for the next email logs to get forwarded.
If you are running logwatch, you can also edit the line in your logwatch.conf which is: Code: MailTo = root to make sure that the logwatch files come to you directly. Personally, I also like to change the detail to high Code: # 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
/etc/aliases??? 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.
Converting MBOXes. 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.
Thanks to all! 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