Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i am a beginner of linux, i trying to start mail server, but i have a question.... why mail server need to set [hostname]...web server name also.....? as i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    1

    about mail server or web server hostname


    hi, i am a beginner of linux, i trying to start mail server, but i have a question....

    why mail server need to set [hostname]...web server name also.....?
    as i know, when someone send a http request out, it get a ip from dns, send request to the IP, through the router then address and port redirection, to the destinction machine......
    so.....this already know the target machine....why need to config a [hostname]??

    best regards
    ming

  2. #2
    Just Joined!
    Join Date
    Apr 2012
    Posts
    10
    You can certainly use just an IP to communicate with your web server.

    For a proper mail server, valid domain, hostnames and MX (or at minimum A records) are required.

    You can also use just the IP with a mail server, for testing purposes or for internal mail, but it gets a bit harder and you won't be able to use it to communicate with the rest of the world.
    The address takes the form user@[xxx.xxx.xxx.xxx] - the square brackets are required.
    This is known as a domain-literal address and is generally not supported by most real-world mail services.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Location
    California
    Posts
    98
    There is a simple reason for the web server and mail server needing to set a hostname.

    It is for logging and error message purposes. Lets take a simple scenario which applies to both web server and mail server.
    Your browser connects to www.somedomain.com

    www.somedomain.com has a single IP address in DNS which is the address of the load balancer. The load balancer dispatches the request to one of ten different web servers.
    Lets say you get an error message (like a 404) in your browser and you want to report it to the web master. You cut and paste the error and send it to them with email. It would be more helpful for the web master to know that "web18.somedomain.com is having problems" instead of just a generic message or an IP address.

    Same thing for mail servers. It's helpful to have an actual name for the logs and for the messages.
    oc5471246066/home/abarclay$ telnet woody.unixpeople.com 25
    Trying 208.106.26.186...
    Connected to woody.unixpeople.com.
    Escape character is '^]'.
    220 mail.unixpeople.com ESMTP Postfix


    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •