Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Location
    Alberta, Canada
    Posts
    76

    How-to - Get eMail Sent to Root.

    Every night your system does the cron.daily routine and emails you a good deal of information to root@localhost; namely log highlights etc. This shows whos been logging in, and whos be "trying" to log in.

    This will send "all" email directed to root@localhost to your specified email address..

    Usage: (you must be root for this)

    1. cd /root
    2. vi .forward

    type the following into .forward
    root:youremail@yourdomain.com
    3. chmod 755 .forward

    All done.

    Removal:

    Simply remove the .forward file.

    1. rm .forward

    Regards,

    Ryan
    Last edited by MjrGaelic; 01-21-2004 at 05:24 AM.

  2. #2
    Join Date
    May 2003
    Location
    Philadelphia
    Posts
    968
    you may want to specify which MTA this is for, not all SMTP servers honour the .forward and even if they do there are different formats for these files.

    <edit>signature removed</edit>
    Last edited by choon; 02-17-2004 at 03:32 PM.

  3. #3
    Join Date
    Aug 2002
    Location
    UK
    Posts
    846
    Agreed, you may also with to add in that you can set up similar redirects using /etc/aliases


    I'll write a tutorial on exim 4 w/mysql support soon

    <edit>signature removed</edit>
    Last edited by choon; 02-17-2004 at 03:32 PM.

  4. #4
    Join Date
    Jan 2004
    Location
    Alberta, Canada
    Posts
    76
    My appologies..

    This works for using Sendmail as your MTA, I have not tested it with other MTAs.

    Ryan

  5. #5
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    785

    FreeBSD 4.x / 5.x root mail

    For folks running FreeBSD + Sendmail or any other MTA which uses the mailerconfig file you can do the following to get your root mail.


    % vi or ee /etc/mail/aliases

    Edit the entry for

    # root: me@my.domain

    Replace it with your email address.

    root: foo@barfoo.com

    Then save the file and type
    % newaliases

    You will see a message about success rebuild of the aliases db and you will be good to go from there.

  6. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •