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 Premium Member Premium Member

    222
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    12:47 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

    29,057
    6,594
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,790
    Local Time:
    8:47 PM
    Nginx 1.13.x
    MariaDB 5.5
    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 Premium Member Premium Member

    222
    22
    18
    Oct 15, 2016
    Cairo
    Ratings:
    +27
    Local Time:
    12:47 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

    29,057
    6,594
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,790
    Local Time:
    8:47 PM
    Nginx 1.13.x
    MariaDB 5.5
    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