Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • Last Modified:

how can i get mail coming into /var/spool/mail/root forwarded on to an email address?

how can i get mail coming into /var/spool/mail/root forwarded on to an email address?
0
greenbug2000
Asked:
greenbug2000
1 Solution
 
yuzhCommented:
You can put a .forward file under the root home dir, and the .forward file looks like:

soemone@abc.com

or
root, soemone@abc.com    

the first one will forward to soemone@abc.com, the 2nd one root will keep a copy of
the email in the mail box.

You could also use mail aliase (sendmail), to make root's email pointing to soemone@abc.com    

0
 
paullamhkgCommented:
yuzh gave you the solution, I'm just expend a little on the aliases

vi /etc/aliases

root: someoneloginid

or

root: someone@abc.com

or

root: root, someoneloginid, someone@abc.com

after change save it and run newaliases

the 1st one is for send root mail to someone who have the login id/name on the same mail server, the 2nd one is send mail to someone in other mail server, the 3rd keep a copy for root and send mail to someone who have the login id/name on the same mail server and someone in other mail server.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now