How to get a copy of root’s email or forward it to an smtp email address

We can edit the aliases file for the system and set our address as the destination for root. so you can edit /etc/aliases (or wherever the aliases file has gone) and look at the existing aliases. There is probably an entry for root (possibly commented out) that shows a fictitious user. Add an entry like:

root: your_id@your_email.address

and save the file. Run the newaliases command and all mail to root will go to you.

Example:

# cat /etc/aliases
# @(#)87        1.3  src/bos/usr/sbin/sendmail/aliases, cmdsend, bos530 6/15/90 23:21:43
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# bos530 src/bos/usr/sbin/sendmail/aliases 1.3
#
# Licensed Materials – Property of IBM
#
# (C) COPYRIGHT International Business Machines Corp. 1985,1989
# All Rights Reserved
#
# US Government Users Restricted Rights – Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# IBM_PROLOG_END_TAG
#
# COMPONENT_NAME: CMDSEND aliases
#
# FUNCTIONS:
#
# ORIGINS: 10  26  27
#
# (C) COPYRIGHT International Business Machines Corp. 1985, 1989
# All Rights Reserved
# Licensed Materials – Property of IBM
#
# US Government Users Restricted Rights – Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
##
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/bellmail.
#
#       >>>>>>>>>>      The command “sendmail -bi” must be run after
#       >> NOTE >>      this file is updated for any changes to
#       >>>>>>>>>>      affect sendmail operation.
##

# Alias for mailer daemon
MAILER-DAEMON:root

# Following alias is required by the new mail protocol, RFC 822
postmaster:root

# Aliases to handle mail to msgs and news
nobody: /dev/null

# Alias to which SSA related warnings are mailed
ssa_adm: root
root:Unix-Support@123software.com
#

 

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.