Help forward root email to me

Discussion in 'Technical' started by domino, Aug 18, 2005.

  1. domino

    domino New Member

    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?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you tried to make a file

    /root/.forward

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

    domino New Member

    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
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    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
     
  5. domino

    domino New Member

    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:
     
  6. linuxfast

    linuxfast New Member

    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
     
  7. domino

    domino New Member

    Yea, I already set log watch to high. Now I get mail from logwatch I completely don't understand :eek:.
     
  8. themachine

    themachine New Member HowtoForge Supporter

    /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.
     
  9. transops.net

    transops.net New Member

    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. :)
     
  10. falko

    falko Super Moderator Howtoforge Staff

    I've also used this once, and it is really good! :)
     
  11. geekgoddess

    geekgoddess New Member

    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
     

Share This Page