How to Determine the SMTP and IMAP Servers for a Domain
When configuring an email client (e.g., Outlook, Thunderbird, Gmail), you need the SMTP (Simple Mail Transfer Protocol) server to send emails and the IMAP (Internet Message Access Protocol) server to receive them. These servers are tied to the email service provider of the domain you're working with, and determining their correct addresses typically involves a bit of research. This guide explains several methods to identify the appropriate SMTP and IMAP servers for an email domain.
Methods to Determine SMTP and IMAP Servers
Step 1. Check the Provider's Documentation
The easiest way to get the correct server addresses is by consulting your email provider's official documentation. Major email providers like Google (Gmail), Yahoo, and Microsoft (Outlook/Office 365) maintain detailed guides outlining their:
- SMTP and IMAP server names
- Required encryption settings
- Port numbers for secure communication
For example:
| Provider | SMTP Server | IMAP Server | SMTP Port | IMAP Port |
|---|---|---|---|---|
| Gmail | smtp.gmail.com |
imap.gmail.com |
587 (STARTTLS) / 465 (TLS) | 993 (SSL) |
| Yahoo Mail | smtp.mail.yahoo.com |
imap.mail.yahoo.com |
465 (SSL) | 993 (SSL) |
| Microsoft Outlook | smtp-mail.outlook.com |
outlook.office365.com |
587 (TLS) | 993 (SSL) |
Step 2. Let Your Email Client Auto-Detect Settings
Most modern email clients, such as Apple Mail or Thunderbird, have built-in tools to automatically detect server settings. To use this:
- Open your email client and start the process of adding a new account.
- Enter your email address and password.
- The client will attempt to locate the correct SMTP and IMAP server settings.
If successful, the client will configure the account automatically. Pro Tip: Cross-check the auto-detected settings with your provider's documentation, as minor discrepancies can sometimes occur.
Step 3. Search for Common Naming Patterns
Many email providers follow standard naming conventions for their SMTP and IMAP servers. Your domain's server addresses might follow these common patterns:
- SMTP (Outgoing Mail):
smtp.[yourdomain].com - IMAP (Incoming Mail):
imap.[yourdomain].com
In some cases, providers use a shared server address for both sending and receiving emails, such as mail.[yourdomain].com. Be sure to verify these details with your provider, as not all domains adhere to these conventions.
Step 4. Consult the Domain Administrator or Check Another Email Account
If you're using a custom domain or an email provider without readily available documentation, reaching out to the domain administrator or examining the settings of an existing email account associated with the same domain can help you identify the correct SMTP and IMAP server details.
Option a: Contact the Domain Administrator
The domain administrator is typically the person or organization managing the email service for the domain (e.g., your IT department, hosting provider, or website administrator). Here's what to ask for:
- The SMTP server address (for outgoing mail).
- The IMAP server address (for incoming mail).
- Any required authentication settings (such as your username or specific credentials).
- Port numbers for both protocols (e.g., SMTP: 587, IMAP: 993).
- Encryption requirements (e.g., SSL, TLS, or STARTTLS).
A quick email or support ticket to the administrator can save you significant time if other methods don't yield clear results.
Option b: Check an Existing Email Account
If someone else already uses the email service for the same domain, or you have another configured email account, you can inspect their settings for valuable clues:
- Ask a Colleague or Peer:
- Reach out to someone using the same email domain and request their SMTP and IMAP server details.
-
Be sure to confirm the associated port numbers and encryption methods as well.
-
Inspect an Email Client Configuration:
- If you or someone else has an existing account set up in an email client (e.g., Outlook, Thunderbird, Apple Mail), you can examine the account's settings directly:
- In Outlook, go to:
File > Account Settings > Select the Account > Server Settings. - In Thunderbird, go to:
Edit > Account Settings > Server Settings.
- In Outlook, go to:
- Look for both incoming (IMAP) and outgoing (SMTP) server details, along with their respective ports and encryption protocols.
By leveraging these options, you can gather the most accurate information specific to your domain with minimal effort. Whether you reach out to an administrator or reference an existing setup, these clues can help you configure your email client correctly.
Step 5. Check MX Records
MX records define how incoming emails are routed to a domain's mail servers. While they don't reveal SMTP or IMAP submission servers directly, looking up MX records can tell you which provider handles the domain's email — and from there, you can look up that provider's documented server settings.
Don't rely on MX record hostnames as guesses for SMTP or IMAP addresses. A record like mail.example.com does not reliably imply that smtp.example.com or imap.example.com exist — these are separate services with no guaranteed naming relationship.
Step 6. Test Server Connectivity on Common Ports
If you've identified potential SMTP or IMAP server addresses but want to confirm their functionality, testing their connectivity on common ports can be a helpful diagnostic step. Ports act as communication gateways that allow email clients to exchange data with servers. Here's how you can test server connectivity and ensure you're using the correct settings.
Common Ports for SMTP (Sending Emails)
SMTP (Simple Mail Transfer Protocol) is responsible for sending outgoing emails. The table below lists the most commonly used ports for SMTP:
| Port | Purpose | Encryption | Notes |
|---|---|---|---|
| 587 | Sending emails (modern standard) | STARTTLS | Recommended for secure email sending from email clients. |
| 465 | Sending emails (modern alternative) | Implicit TLS | Reassigned as SMTPS by RFC 8314 (2018); actively recommended by providers like Gmail and Yahoo. |
| 25 | Server-to-server email relay | None | Avoid for email client use; often blocked by ISPs to prevent spam abuse. |
- Port 587 is the standard port for most email clients, using STARTTLS to upgrade the connection to encrypted after initial handshake.
- Port 465 was historically deprecated, but RFC 8314 (2018) officially reassigned it for implicit TLS (SMTPS). It is now a valid modern choice and is actively recommended by providers including Gmail and Yahoo.
- Port 25 is primarily used for server-to-server email relay but is widely blocked by ISPs to prevent spamming. Avoid using Port 25 for email client configuration.
Common Ports for IMAP (Receiving Emails)
IMAP (Internet Message Access Protocol) is used to retrieve emails and sync them across devices. The following table outlines the two main ports used for IMAP:
| Port | Purpose | Encryption | Notes |
|---|---|---|---|
| 993 | Receiving emails (secure) | SSL/TLS | Recommended for secure email retrieval in most environments. |
| 143 | Receiving emails (legacy, less secure) | STARTTLS (optional) | Unencrypted by default; STARTTLS supported but rarely enforced. Not recommended for modern setups. |
- Port 993 is widely used and considered the standard for encrypted IMAP connections.
- Port 143 supports STARTTLS but does not enforce encryption by default, making it unsuitable for most modern deployments. Use only in controlled environments where encryption is guaranteed by other means.
How to Test Server Connectivity
Once you have the server address and port number, you can test their functionality using tools like Telnet or OpenSSL. These tools attempt to establish a connection to the server on the specified port.
Using Telnet:
Open your command line and use the following format:
telnet smtp.example.com 587
Replace smtp.example.com with the SMTP server's address and 587 with the port you wish to test. Successful responses indicate the server is reachable.
Note: Telnet is not installed by default on modern Windows or macOS. On those systems, use nc (netcat) as an alternative: nc -zv smtp.example.com 587.
Using OpenSSL:
To test IMAP or older protocols that require SSL, use this command:
openssl s_client -connect imap.example.com:993
Replace imap.example.com with the IMAP server's address and 993 with the port. If the connection is successful, you will see the server's SSL certificate information.
If these tools fail to connect, the server address or port configuration may be incorrect, or the ports may be blocked by firewalls or ISPs.
Featured Merch
Latest Posts
- How to Inspect All Cron Jobs on a Linux System: A Sysadmin's Guide
- Building a 3D Elevation Photo Diary with deck.gl
- Thunderbird Keeps Threading Emails? Here's the Fix
- Social Media Dimensions Cheat Sheet 2025
- How Limiting My Internet Usage Changed the Way I Work and Live
Featured Book

Subscribe to RSS Feed
Published by Ramiro Gómez on . Subscribe to the Geeksta RSS feed to be informed about new posts.
Disclosure: External links on this website may contain affiliate IDs, which means that I earn a commission if you make a purchase using these links. This allows me to offer hopefully valuable content for free while keeping this website sustainable. For more information, please see the disclosure section on the about page.