How do I change the computers domain and name

Posted on 2005-04-28
Last Modified: 2010-03-18
I am a newbie. I am sending e-mails using mail

The problem is that it shows the wrong domain name. It shows  myname@localhost.localdomain. I want it to show in the email as

How do i do that. Do i need to change the file?

Question by:syedasimmeesaq
    LVL 38

    Expert Comment

    LVL 9

    Author Comment

    hmm...any easy way?
    LVL 38

    Expert Comment

    Download webmin
    And login from browser
    http://<IP address of Linux>:10000/
    root and root passwd
    Then you can change the sendmail configuration through web GUI.
    LVL 9

    Author Comment

    I don't know for some reason its not working. Can you tell me why I can send e-mail to other accounts but not to the clients who have aol or netscape account????
    LVL 1

    Expert Comment

    most of the mail servers in the internet will not accept mail comes from user@localhost.localdomain because it cannot be replied. You can send mails to your local users whos mail box resides in the mail server.

    Suppose if you have a domain named configure your sendmail as follows
    in the /etc/mail/ file modify the and uncomment the following lines


    then enter the following commands as root

    # make -C /etc/mail
    # service sendmail restart

    Note: If your encounter errors in make command make sure that sendmail-cf rpm package is installed (if you are using Redhat based distro)
    this will modify the domain part as on all mails send by users except root.

    LVL 38

    Expert Comment

    Hi syedasimmeesaq,

       apsivam's suggestion is the same as my first post. You still need to do the same thing for your sendmail.

       For your emails to be accepted by AOL, you need to have a vailid internet domain, DNS A/PTR record
     as well as MX record pointing to your mail server. Otherwise, your emails will still be treated as spam.

       Without a valid internet domain nowaday, most of email server won't accept your emails.
    LVL 9

    Author Comment


    How do I fix that aol problem. Any Idea?

    Thank you
    LVL 38

    Accepted Solution

    1. Did you register yor "" on or some other internet registeror?
       Most of ISP will provide this kind of service with less extra charge.
    2. Once your domain name is registered, then you need to assign WAN IP to your email server or map
      your WAN IP to your email server on your firewall/router.
    3. Ask whoever host your DNS (your ISP or the domain registeror) for your domain, add
       <WAN IP of your email server>
       into the DNS for A record, PTR record, and MX record.
    4. send a test mail to AOL email account.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now