Learn about Centmin Mod LEMP Stack today
Register Now

Sysadmin STOP... you've got mail!

Discussion in 'System Administration' started by Jimmy, Feb 17, 2017.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    How to change default root@ email address linux / postfix / centos?

    Change Root Email
    Stop getting "You have new mail in /var/spool/mail/root"

    Code:
    # nano /etc/aliases
    Enter at bottom (you'll see another root entry there with a #):
    Code:
    root:  email@domain.com
    Remove existing file:
    Code:
    # rm /var/spool/mail/root
    Wa La, no more notices.


    @eva2000 maybe this could be populated when the person enters their email during the setup process - since you're asking for an email there too and the user is root.
     
    Last edited: Feb 17, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    55,248
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    12:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Getting Started Guide step 18 ;)

    But yes the intended purpose is eventually take those prompted primary and secondary email address questions on first centmin.sh run and use them for email related stuff.
     
  3. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    Must have missed that in the setup guide.

    Thought I remembered a few people posting about the notice, so I figured I'd post it.
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,248
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,833
    Local Time:
    12:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. RB1

    RB1 Active Member

    292
    75
    28
    Nov 11, 2016
    California
    Ratings:
    +122
    Local Time:
    7:24 AM
    Nginx 1.21.x
    MariaDB 10.1.x
    Cool...I was wondering why I was getting these new mail messages even though I have a primary and secondary mail setup.