What Are Incoming and Outgoing Mail Servers?

An incoming mail server is the server that receives and stores email for a domain, and an outgoing mail server is the SMTP server that sends messages to other domains. Every email account depends on both: the outgoing mail server delivers what users write, and the incoming mail server holds what they receive until an email client fetches it over IMAP or POP3.

This guide defines each mail server, compares the two side by side, and follows a message from sender to inbox. You will also learn when to choose IMAP or POP3, what are the exact incoming and outgoing mail server settings and ports, and many more.

Quick facts about incoming and outgoing mail servers are listed below:

  • Incoming mail reaches the server over SMTP on port 25, and email clients read it over IMAP (port 993) or POP3 (port 995).
  • Outgoing mail leaves an email client over SMTP on port 587 (STARTTLS) or port 465 (SSL/TLS).
  • The MX record in a domain’s DNS tells other mail servers which incoming mail server accepts its email.
  • Gmail’s sender rules, in force since February 2024, require every sender to use SPF or DKIM, and senders of more than 5,000 messages a day to use SPF, DKIM, and DMARC.

What Is an Incoming Mail Server?

An incoming mail server accepts email addressed to a domain, stores it in the recipient’s mailbox, and lets email clients retrieve it. The incoming mail server’s address is published in the domain’s MX record, which tells every other mail server on the internet where to deliver mail.

The incoming mail server does two jobs, which are usually handled by two separate programs:

  • Receiving: A mail transfer agent (MTA) such as Exim or Postfix accepts messages from other servers over SMTP, runs spam and authentication checks, and files each message into the right mailbox.
  • Serving: A mailbox access server such as Dovecot lets email clients like Outlook, Apple Mail, or Thunderbird read that mailbox over IMAP or POP3.

When an email app asks for the “incoming mail server,” it wants the hostname of that IMAP or POP3 service, such as mail.yourdomain.com. It doesn’t want the MX record itself, although on many hosting accounts both point to the same machine. Our guide to the email hostname explains where that name comes from.

What Is an Outgoing Mail Server?

An outgoing mail server, also called an SMTP server, accepts messages from an email client and delivers them to the recipient’s incoming mail server. The outgoing mail server authenticates the sender, queues the message, finds the recipient domain’s MX record, and retries delivery if the receiving server is temporarily unavailable.

The steps an outgoing mail server takes for every message are listed below:

  1. Accepts the message. The email client connects on port 587 or 465 and logs in with the mailbox username and password. This step is called SMTP submission with authentication.
  2. Signs and queues it. The server adds a DKIM signature when one is configured, then places the message in its delivery queue.
  3. Looks up the MX record. A DNS query reveals which incoming mail server handles the recipient’s domain.
  4. Delivers it over port 25. The server opens an SMTP connection to the receiving server, encrypted with STARTTLS when both sides support it.
  5. Retries or bounces. A temporary error (a 4xx code) puts the message back in the queue for another attempt. A permanent error (a 5xx code) returns a bounce message to the sender.

Some setups send outgoing mail through an SMTP relay, also called a smarthost: a third-party service that delivers messages on the server’s behalf. The steps stay the same; only the server making the final delivery changes.

SMTP by itself doesn’t encrypt or authenticate anything. TLS protects the connection, and SPF, DKIM, and DMARC prove the message really came from the sending domain.

Incoming vs. Outgoing Mail Server: Key Differences

The difference between an incoming and an outgoing mail server is direction. An outgoing server sends messages from users to other domains, while an incoming server receives mail and holds it until an email client downloads or syncs it.

The table below compares incoming and outgoing mail servers across the settings and records that matter most:

AttributeIncoming Mail ServerOutgoing Mail Server
Main jobReceives and stores emailSends email to other domains
ProtocolsSMTP (from other servers), IMAP and POP3 (to clients)SMTP
Ports email clients useIMAP 993, POP3 995SMTP 587 or 465
Typical hostnamemail.yourdomain.com or imap.provider.commail.yourdomain.com or smtp.provider.com
DNS records it depends onMXSPF, DKIM, DMARC, and reverse DNS (PTR)
Common softwareDovecot (with Exim or Postfix receiving)Exim, Postfix
Typical client error“Authentication failed” or “Cannot connect”“Relay access denied” or “Authentication required”

On most hosting plans, one machine runs both services, so the incoming and outgoing mail server share a hostname. Large mailbox providers often split them across separate hostnames, such as imap.provider.com and smtp.provider.com.

How an Email Travels From Sender to Recipient

An email travels from sender to recipient in five steps. 

The sender’s client submits it to the outgoing mail server while DNS identifies the recipient’s incoming mail server. The two servers then exchange it over SMTP, and the recipient’s client fetches it over IMAP or POP3.

A message from anna@studio-example.com to ben@client-example.com takes these steps:

  1. Submit. Anna’s email app sends the message to her outgoing mail server over SMTP on port 587 and logs in with her mailbox credentials.
  2. Look up. Her outgoing mail server queries DNS for the MX record of client-example.com.
  3. Transfer. Her server connects to Ben’s incoming mail server on port 25. The receiving server checks SPF, DKIM, and DMARC, consults blocklists, and scores the message for spam.
  4. Store. Ben’s incoming mail server accepts the message and files it in his inbox or Spam folder.
  5. Retrieve. Ben’s phone syncs the inbox over IMAP on port 993, and the message appears.

The whole journey normally takes a few seconds. When a message is late or missing, the cause usually shows up at step 3: a delivery deferred for a later retry, a failed authentication check, or a spam filter decision.

IMAP vs. POP3: Which Incoming Mail Server Protocol to Use

IMAP is the better incoming mail server protocol for most users because it keeps the mailbox on the server and syncs read status, folders, and deletions across every device. POP3 downloads messages to one device and is often set to remove them from the server, which suits single-device or offline-archive setups.

The table below compares IMAP and POP3 on the points that usually decide the choice:

FeatureIMAPPOP3
Where mail livesOn the serverOn the device that downloads it
Multi-device sync✅ Read status, folders, and deletions sync❌ Each device sees its own copy
Secure port (SSL/TLS)993995
Legacy port (STARTTLS)143110
Server storage useHigher, because mail stays on the serverLower, if mail is deleted after download
Offline accessCached copies onlyFull local copies
Best forTeams and anyone using a phone plus a computerOne device, local archiving

Incoming and Outgoing Mail Server Settings and Ports

Incoming and outgoing mail server settings consist of five values: 

  • Server hostname
  • Protocol
  • Port
  • Encryption method
  • Login credentials. 

For most accounts, the secure combination is IMAP on port 993 with SSL/TLS for incoming mail, and SMTP on port 587 with STARTTLS or port 465 with SSL/TLS for outgoing mail.

The standard mail server ports and when to use each are shown below:

ProtocolDirectionPortEncryptionUse in an Email Client?
IMAPIncoming993SSL/TLS✅ Recommended
IMAPIncoming143STARTTLS⚠️ Only with STARTTLS turned on
POP3Incoming995SSL/TLS✅ If you need POP3
POP3Incoming110STARTTLS⚠️ Only with STARTTLS turned on
SMTP (submission)Outgoing587STARTTLS✅ Recommended
SMTP (submission)Outgoing465SSL/TLS✅ Recommended
SMTP (relay)Server to server25STARTTLS❌ Not for email clients

RFC 8314 recommends implicit TLS (ports 993, 995, and 465) for client connections, so pick those when your provider supports them. Avoid port 25 in email apps: many internet providers block it on home and office connections to stop spam.

The username is usually the full email address, and the password is the mailbox password, not the hosting control panel password.

How to Find Your Incoming Mail Server

Your incoming mail server is listed in your email provider’s setup instructions or in the email section of your hosting control panel, and it often follows the format mail.yourdomain.com. 

If an email app on another device already works, open that account’s server settings to copy the incoming and outgoing mail server names. ScalaHosting customers can also ask the 24/7 support team to confirm the exact hostname for any mailbox.

How to Set Up the Incoming Mail Server in an Email Client

To set up the incoming mail server, follow these steps in any desktop or mobile email client:

  1. Add a new account and choose manual or advanced setup instead of automatic detection.
  2. Select IMAP as the account type (or POP3, if you only use one device).
  3. Enter the incoming server details: the hostname, port 993 (or 995 for POP3), and SSL/TLS encryption.
  4. Enter your login: the full email address as the username and the mailbox password.
  5. Save the account and send yourself a test message to confirm it arrives.

How to Set Up the Outgoing Mail Server (SMTP)

To set up the outgoing mail server, complete these steps in the same account:

  1. Open the outgoing (SMTP) server settings.
  2. Enter the outgoing server details: the hostname, port 587 with STARTTLS, or port 465 with SSL/TLS.
  3. Turn on SMTP authentication, usually labeled “My outgoing server requires authentication,” and use the same credentials as the incoming server.
  4. Send a test email to an address at a different provider and check that it lands in the inbox, not in spam.

Common Incoming and Outgoing Mail Server Problems and Fixes

Most incoming and outgoing mail server problems come from four causes: the wrong port or encryption setting, SMTP authentication turned off, missing or incorrect DNS records (MX, SPF, DKIM, or DMARC), and a sending IP or domain on a blocklist.

The most common symptoms, their causes, and the fixes are listed in the table below:

ProblemLikely CauseFix
Email client can’t connect to the incoming serverWrong hostname, or a port that doesn’t match the encryptionUse port 993 with SSL/TLS (IMAP) or 995 (POP3) and recheck the hostname
“Authentication failed”Wrong password, or a username that isn’t the full addressEnter the full email address and reset the mailbox password
You can receive email but can’t send itSMTP authentication is off, or port 25 is blockedTurn on SMTP authentication and switch to port 587 or 465
“Relay access denied” (often error 554 5.7.1)The outgoing server doesn’t see you as a logged-in userTurn on SMTP authentication
Sent messages land in spamMissing SPF, DKIM, or DMARC, or no reverse DNSPublish the records and confirm the sending IP has a matching PTR record
Email sent to your domain bouncesMissing or wrong MX record, or a full mailboxCheck that the MX record resolves, and free up mailbox space
Messages arrive hours lateThe receiving server deferred delivery (4xx error)Check the mail logs; the outgoing server retries automatically

Bounce messages include an SMTP error code that points to the cause. Our knowledge base article on common email delivery problems decodes the most frequent ones.

How to Secure Incoming and Outgoing Mail Servers

Securing incoming and outgoing mail servers means encrypting every connection with TLS, authenticating the sending domain with SPF, DKIM, and DMARC, protecting mailbox logins, and filtering spam and malware before it reaches the inbox.

The essential security measures for both servers are listed below:

  • Encrypt every connection. Use ports 993, 995, and 465, or port 587 with STARTTLS, so passwords and messages never travel in plain text. Google’s email sender guidelines also require a TLS connection for mail sent to Gmail accounts.
  • Authenticate the sending domain. SPF lists the servers allowed to send for a domain, DKIM signs each message, and DMARC tells receivers what to do when those checks fail. Gmail requires SPF or DKIM from all senders, and all three from senders of more than 5,000 messages a day.
  • Publish reverse DNS. The sending IP’s PTR record should resolve to the server’s hostname, and that hostname should point back to the same IP.
  • Protect mailbox logins. Use a unique, strong password for every mailbox, use app passwords where the provider offers two-factor authentication, and watch for repeated failed logins over IMAP and POP3.
  • Filter incoming mail. Spam scoring and virus scanning filter junk and malware at the incoming mail server, before it reaches the inbox. Our overview of hosted spam filtering explains what a good filter should include.
  • Watch the outgoing queue. A sudden spike in messages from one account usually means stolen credentials or a hijacked script, and it can get the server’s IP added to blocklists.

How ScalaHosting Runs Incoming and Outgoing Mail Servers

ScalaHosting runs incoming and outgoing mail servers for its customers through SPanel, its in-house control panel, so customers don’t have to handle mail setup, security, and deliverability checks. 

SPanel’s mail stack pairs Exim, which handles both incoming and outgoing SMTP, with Dovecot for IMAP and POP3 access. SpamAssassin scores incoming messages, and Sieve filters move flagged mail into the Spam folder automatically.

SPanel’s Email Server Manager adds the visibility that a basic mail setup lacks:

  • Deliverability audit: Scores each domain out of 100 across SPF, DKIM, DMARC, MX, and five domain blocklists (Spamhaus DBL, URIBL, SURBL, SORBS RHSBL, and NordSpam DBL), and explains how to fix every failed check. It also checks the server’s reverse DNS.
  • Automatic SPF, DKIM, and DMARC setup: Publishes all three records in one step: a 2048-bit DKIM key, an SPF record with the server’s sending IP, and a monitoring-mode DMARC policy.
  • Email logs viewer: Finds up to 500 recent messages for any address or domain and shows each recipient’s status (delivered, deferred, or bounced) with the receiving server’s response.
  • Mail server health view: Shows the queue size, frozen and deferred messages, live SMTP, IMAP, and POP3 connections by port, and the IPs behind failed logins.

The automatic setup works for domains whose DNS is managed in SPanel. Domains that use external DNS get the exact record values to add at their DNS provider.

Businesses that only need email can choose ScalaHosting’s business email hosting, which includes POP3, IMAP, and SMTP access, advanced spam filtering, daily offsite backups, and free email migration with no downtime.

Summary

Incoming and outgoing mail servers split email into two directions: SMTP sends it, IMAP or POP3 retrieves it, and DNS records connect the two. Get the hostname, port, encryption, and authentication right, publish SPF, DKIM, and DMARC, and you avoid the most common delivery failures. To have both servers configured, monitored, and secured for you, explore our managed cloud hosting deals.

What Are Incoming and Outgoing Mail Servers?
Supercharge Your Business with an All-inclusive Fully Managed Cloud
Free, Effortless & No-Downtime Migration
Anytime Unconditional Money-back Guarantee
Full Scalability & 24/7 Expert Cloud Support

Frequently Asked Questions

Q: What Is My Incoming Mail Server?

A: Your incoming mail server is the IMAP or POP3 hostname your email provider assigns, often mail.yourdomain.com or imap.provider.com. You’ll find it in your provider’s setup guide, in your hosting control panel, or in the account settings of an email app that already works.

Q: Is SMTP an Incoming or Outgoing Mail Server?

A: SMTP is the outgoing mail server protocol. Email clients use SMTP to send messages, and mail servers use SMTP to pass messages to each other, but clients read incoming mail over IMAP or POP3.

Q: Can the Incoming and Outgoing Mail Server Be the Same?

A: Yes. Most hosting accounts run both services on one server, so the incoming and outgoing mail servers share a hostname such as mail.yourdomain.com. Only the protocol and port differ: IMAP 993 or POP3 995 for incoming mail, and SMTP 587 or 465 for outgoing mail.

Q: What Port Should I Use for the Outgoing Mail Server?

A: Use port 587 with STARTTLS or port 465 with SSL/TLS for the outgoing mail server. Port 25 is for server-to-server delivery and is often blocked by internet providers, so email clients shouldn’t use it.

Q: Why Can I Receive Email but Not Send It?

A: You can receive but not send email when the outgoing mail server settings are wrong, even though the incoming settings work. Common causes include SMTP authentication being turned off, an internet provider blocking port 25, or mismatched port and encryption settings.

Was this article helpful?

Thank you for your feedback!
You have already answered. Thank you for your feedback!
Security check failed. Please try again.