Find the answer to your Linux question:
Results 1 to 4 of 4
I found out here about how a postfix will get an MX record which could be several servers, and then try them on port 25 in order in order to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Mar 2013
    Posts
    354

    How does a mail client know which server to connect to?


    I found out here about how a postfix will get an MX record which could be several servers, and then try them on port 25 in order in order to find one that isn't busy, so it can deliver mail.
    My next question is, then when the user wants to get their mail (POP or IMAP), how do they know which of those servers to connect to?


    Thanks.

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,305
    Sending mail and receiving mail are different functions. An email address is bound to an IP address and that is where the mail goes - unless someone is using their own server it will be an address provided by their service provider.

  3. #3
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    942
    Quote Originally Posted by resetreset View Post
    My next question is, then when the user wants to get their mail (POP or IMAP), how do they know which of those servers to connect to?
    .
    The user configures their email client to point to which server to send to and to recieve from. The mail server the user has configured will try to send to the address in the header and the DNS MX record will say I have a mail server to recieve with.

  4. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,882
    Quote Originally Posted by docbop View Post
    The user configures their email client to point to which server to send to and to recieve from. The mail server the user has configured will try to send to the address in the header and the DNS MX record will say I have a mail server to recieve with.
    Aye, the client is configured with a mail server address, the name of which is normally published by the email providing service.

    The DNS MX records tell the email world where to send email, so you might have, say, mx1.example.com pointed at your mail receiver for your domain, with backups through other MX records.

    The mail clients will resolve their names as A (for ipv4), AAAA (for ipv6) or CNAME records in the DNS domain, and the name often set to be something memorable, along the lines of imap.example.com or mail.example.com. This is a good example of -why- the DNS system is so important.

    This can, of course, be the same physical machine as the mail receiver - you just don't look up its name with the MX record. The reason that works is because these services run from different TCP/IP ports. An imap over SSL connection (quite common) would run on port 993. Regular pop3, I believe, uses 110.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

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