Learn about Centmin Mod LEMP Stack today
Register Now

Sysadmin emails @localdomain

Discussion in 'System Administration' started by dooma, Jul 6, 2017.

  1. dooma

    dooma Active Member

    320
    33
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +46
    Local Time:
    11:54 PM
    Hello,

    Although my /etc/hosts file has my server name configuration :
    Code (Text):
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    XX.XX.XX.XX hostname.MYdomain.com hostname



    The emails that I got from root comes from root@hostname.localdomain ?!

    How can I change this .localdomain to my domain used ?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    7:54 AM
    Nginx 1.25.x
    MariaDB 10.x
    that is normal and expected. You don't change it to @yourdomain.com as you don't have local email setup and use 3rd party @yourdomain.com email.

    or do you mean change to root @ hostname.domain.com ?

    that should of been done when you setup your main hostname when you initially got the server and when you did step 1 of Getting Started Guide to setup main hostname

    what's output for command
    Code (Text):
    postconf -d myhostname mydomain
    

    and
    Code (Text):
    uname -a
    
     
  3. dooma

    dooma Active Member

    320
    33
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +46
    Local Time:
    11:54 PM
    Yes. :)

    The first command:
    Code (Text):
    postconf -d myhostname mydomain
    myhostname = server1.localdomain
    mydomain = localdomain
    


    second one:
    Code (Text):
    Linux server1 4.9.15-x86_64-linode81 #1 SMP Fri Mar 17 09:47:36 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
     
  4. eva2000

    eva2000 Administrator Staff Member

    50,891
    11,791
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,246
    Local Time:
    7:54 AM
    Nginx 1.25.x
    MariaDB 10.x
    did you do step 1 of Getting Started Guide to setup main hostname ? uname -a should show your full main hostname

    if not, do step 1 of Getting Started Guide