Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

What is SMTP, and what does an SMTP server do?

Every email you send is handed from program to program until it reaches someone's inbox, and SMTP is the protocol that does the handing. This guide explains what SMTP and an SMTP server are, how SMTP differs from IMAP and POP3, the route a message takes, the checks that decide whether it lands in the inbox, and how to send mail from a VPS when outbound port 25 is closed.

Short answer: SMTP (Simple Mail Transfer Protocol) is the internet standard for sending email, defined in RFC 5321. An SMTP server accepts mail: your provider's submission server takes your message on port 587 or 465 after you log in, then relays it over port 25 to the recipient's server, found by an MX lookup. Reading mail uses IMAP or POP3 instead.

What is SMTP?

SMTP, the Simple Mail Transfer Protocol, is the internet standard for sending email. Your mail app uses it to hand a new message to your provider, and mail servers use it to pass that message along until it reaches the recipient's provider. The current specification is RFC 5321, published in October 2008; the protocol itself goes back to RFC 821 in August 1982, which is why so much of it still looks like a typed conversation between two machines.

SMTP only moves mail forwards. It does not let you read a mailbox, list folders or mark messages as read. That job belongs to IMAP or the older POP3, which is why every mail client asks you for two servers: an incoming one and an outgoing one. The outgoing one is the SMTP server.

What is an SMTP server?

An SMTP server is a program that accepts mail over SMTP. RFC 5321 calls the side that opens the connection the "SMTP client" and the side that accepts it the "SMTP server", so the same mail server is both: a server while it receives a message, and a client while it delivers that message onwards. Postfix, Exim and Microsoft Exchange are common examples of software that plays both roles.

When a mail app, a WordPress plugin or a contact form asks for "the SMTP server", it means something narrower: your provider's submission server, the one that checks your password and accepts mail from you. It usually has a name like smtp.yourprovider.com or mail.yourdomain.com. You never configure the recipient's servers; your provider finds those itself with a DNS lookup.

SMTP vs IMAP vs POP3

The three protocols are often listed together, but they do opposite jobs. SMTP pushes mail towards the recipient. IMAP and POP3 let the recipient pull it out of their mailbox.

SMTP, IMAP and POP3 compared by what they do
SMTPIMAPPOP3
DirectionSends and relays mailReads mail from a mailboxReads mail from a mailbox
Who talks to whomApp to provider, and server to serverMail app to your own providerMail app to your own provider
Where mail ends upHanded on; nothing is stored for you to readStays on the server, synced across devicesDownloaded to one device, usually removed from the server
Folders and read statusNot applicableYes, kept on the serverNo
Current standardRFC 5321RFC 9051 (IMAP4rev2, 2021)RFC 1939 (1996)

So "what is IMAP?" has a short answer: IMAP, the Internet Message Access Protocol, is how a mail app reads and organises mail that stays on the server. RFC 9051 describes it as letting a client access and manipulate messages on a server, including folders and flags. Use IMAP whenever you read mail on more than one device. POP3 still works, but it was designed to download and delete, which is a poor fit for a phone plus a laptop. The port numbers for all three are in our IMAP, POP3 and SMTP port numbers guide, so they are not repeated here.

How an email travels: MUA, MSA, MTA and MDA

RFC 5598, the Internet Mail Architecture, names the pieces a message passes through. Knowing the names helps, because error messages and provider documentation use them.

The agents in an email's journey, as named in RFC 5598
AgentFull nameWhat it doesExamples
MUAMessage User AgentThe program a person writes and reads mail inOutlook, Thunderbird, the Gmail app, a script in your web app
MSAMessage Submission AgentAccepts new mail from an authenticated sender and checks itYour provider's submission server on 587 or 465
MTAMessage Transfer AgentRelays mail between servers using SMTP on port 25Postfix, Exim, a provider's outbound relays
MDAMessage Delivery AgentPuts the message into the recipient's mailboxDovecot's delivery agent, a provider's mailbox store

Here is the journey when asha@example.in writes to ravi@example.com:

  1. Submission. Asha's mail app (the MUA) connects to her provider's MSA, logs in, and submits the message over SMTP. RFC 6409 reserves port 587 for this, and its section 4.3 says the MSA must, by default, refuse mail from a session that has not authenticated.
  2. MX lookup. Her provider's MTA takes the recipient domain, example.com, and asks DNS for its MX records. RFC 5321 section 5.1 requires this lookup; when there are several MX records, the one with the lowest preference number is tried first, and if a domain has no MX record at all, the sender falls back to its A or AAAA record. Our guide to what DNS is explains MX and the other record types.
  3. Relay. The MTA opens a connection to the recipient's mail server on port 25 and transfers the message with SMTP. This hop is server to server and involves no password, which is exactly why port 25 is abused by spammers.
  4. Checks. The receiving server checks SPF, DKIM and DMARC for the sending domain, looks at the sending IP's reputation and reverse DNS, and runs its spam filters.
  5. Delivery. The MDA files the message into Ravi's mailbox.
  6. Reading. Ravi's phone fetches it over IMAP. SMTP's part ended at step 3.

If the receiving server is down or returns a temporary error, the sending MTA keeps the message in a queue and tries again. RFC 5321 says the retry interval should generally be at least 30 minutes and that the give-up time generally needs to be at least 4 to 5 days, which is why a "delayed delivery" warning can arrive hours after you pressed Send.

What an SMTP conversation looks like

SMTP is a text protocol of short commands and three-digit replies. This trimmed example follows the one in RFC 5321, appendix D; C is the sending client and S is the receiving server:

S: 220 foo.com Simple Mail Transfer Service Ready
C: EHLO bar.com
S: 250-foo.com greets bar.com
S: 250 HELP
C: MAIL FROM:<Smith@bar.com>
S: 250 OK
C: RCPT TO:<Jones@foo.com>
S: 250 OK
C: DATA
S: 354 Start mail input; end with <CRLF>.<CRLF>
C: (headers and body of the message)
C: .
S: 250 OK
C: QUIT
S: 221 foo.com Service closing transmission channel

The first digit of each reply tells you most of what you need when reading a bounce. A 2xx reply means success. A 4xx reply is a temporary failure, so the sender will retry. A 5xx reply is permanent: the address does not exist, the message was rejected as spam, or authentication failed, and retrying will not help.

Note that MAIL FROM (the envelope sender, where bounces go) is separate from the From: header the reader sees. Spoofing works by setting that header to someone else's address, which is the problem SPF, DKIM and DMARC exist to solve.

SMTP authentication and encryption

The original protocol had no login at all. Two additions fixed that for submission. SMTP AUTH (RFC 4954) lets the client prove who it is, with a username and password or a token, before sending. TLS encrypts the session so the password and message do not cross the network in clear text: either with STARTTLS on port 587, where the connection starts plain and is upgraded, or with implicit TLS on port 465, where it is encrypted from the first byte. RFC 8314, published in January 2018, prefers implicit TLS for submission, asks for TLS 1.2 or later, and asks providers to deprecate cleartext submission. In practice both 587 and 465 work with every mainstream provider; use whichever your provider lists.

On the server-to-server hop over port 25, encryption is opportunistic: MTAs use STARTTLS when the other side offers it, and there is no user login, because the receiving server only accepts mail addressed to its own domains.

SPF, DKIM and DMARC: why your mail gets accepted

Receiving servers do not trust the From: address on its own. Three DNS-based checks tell them whether a message really came from the domain it claims. All three are TXT records in your domain's DNS.

The three email authentication records and what each proves
CheckWhat it provesExample recordDefined in
SPFWhich servers may send mail using your domain as the envelope senderexample.com TXT "v=spf1 include:_spf.mailprovider.example -all"RFC 7208
DKIMThe message was signed with a key the domain published, and was not altered on the ways1._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIIB..."RFC 6376
DMARCSPF or DKIM passed for the same domain as the visible From address, and what to do if neither did_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"RFC 7489

Your sending service gives you the exact SPF include and DKIM key to publish. Start DMARC at p=none so you receive reports without blocking anything, then move to quarantine or reject once the reports show all your real mail passing. If you send from a server's own IP, the receiving side will also check that the IP has reverse DNS (a PTR record) pointing to a hostname that resolves back to the same IP. Our note on hosts and hostnames covers how those names fit together.

You can see what any domain publishes with dig:

dig example.com MX +short
dig example.com TXT +short
dig _dmarc.example.com TXT +short
dig -x 203.0.113.10 +short

Why outbound port 25 is closed on most VPS

Port 25 needs no login, so any compromised machine that can reach it can send spam claiming to be from anyone. Blocklists then list the IP, and often the range around it, which hurts every other customer nearby. That is why most cloud providers block outbound port 25 on new servers, and why many home broadband and mobile networks do the same. Inbound port 25 is not affected, so a server can still receive mail.

On a Bigdomainhost KVM VPS or dedicated server, outbound port 25 is closed by default. It can be opened on request once the account has a payment history and we have talked through what you plan to run. The questions we ask, and why, are set out in why port 25 is closed by default. You can check from any Linux server whether it is blocked:

# Outbound 25: times out when blocked
nc -vz -w 5 mx.example.com 25

# Submission on 587 with STARTTLS: should connect and show the certificate
openssl s_client -starttls smtp -connect smtp.example.com:587 -crlf -quiet

Replace the hostnames with your recipient's MX host and your provider's submission server. A timeout on 25 with a working 587 is the normal, expected result on a new server.

Sending email from a VPS: what to do instead

Most people who search for "SMTP server" while setting up a VPS do not need to run one. They need an application, a WordPress site or a scheduled job to send password resets, invoices or alerts. The reliable way to do that is:

  • Use a transactional email service for application mail. Connect to its SMTP endpoint on port 587 (or 465) with the credentials it issues, or use its HTTP API. It handles IP reputation, bounces and complaints for you.
  • Or use your existing mail provider's SMTP for low volumes, such as a contact form that mails you. Use a dedicated mailbox and an app password, not your main login.
  • Publish the records they give you: the SPF include, the DKIM key and a DMARC record. Without them, even correctly sent mail tends to land in spam.
  • Stop relying on PHP's mail() or a bare local sendmail. In WordPress, an SMTP plugin pointed at port 587 fixes most "emails not arriving" complaints. Reports sent from cron jobs should go out the same way.

Running your own outbound mail server is possible, but it is a job in itself: warming up a new IP, watching blocklists, handling bounces and abuse reports. Do it only when mail is part of your product. If you just need mailboxes on a website's domain, our Web & cPanel hosting plans include them, and the client settings are in the email section of our docs.

If a server you host with us cannot send mail, message us on WhatsApp at +91 75994 50220 at any time, call during IST working hours, or email support@bigdomainhost.com, and we will help you read the SMTP error. Setting up a fresh server first? Start with our Ubuntu VPS initial setup guide.

This guide was written by the Bigdomainhost team with AI assistance; facts were checked against the linked RFCs on 27 November 2026.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is SMTP in simple words?

SMTP, the Simple Mail Transfer Protocol, is the set of rules computers use to send email. Your mail app uses it to hand a message to your provider, and mail servers use it to pass the message on to the recipient's provider. It only sends; reading mail is done with IMAP or POP3.

What is an SMTP server?

An SMTP server is a program that accepts email over SMTP. In mail app settings, the SMTP or outgoing server means your provider's submission server, which checks your login on port 587 or 465 and then relays your message to the recipient's mail server, found through a DNS MX lookup.

What is IMAP, and how is it different from SMTP?

IMAP, the Internet Message Access Protocol, lets a mail app read and organise mail that stays on the server, so every device sees the same folders and read status. SMTP does the opposite job: it sends mail out. A mail client needs both, an IMAP incoming server and an SMTP outgoing server.

Should I use port 587 or 465 for SMTP?

Both are for sending mail with a login. Port 587 starts unencrypted and upgrades with STARTTLS; port 465 is encrypted from the first byte, which RFC 8314 prefers. Every mainstream provider supports at least one, so use the one your provider lists. Port 25 is only for server-to-server relay.

Why can't my VPS send email on port 25?

Most hosts, including Bigdomainhost, close outbound port 25 by default because compromised servers use it to send spam and get whole IP ranges blocklisted. Send through a transactional email service or your mail provider on port 587 instead. On our VPS and dedicated servers, port 25 can be opened on request after a conversation.

Do I need SPF, DKIM and DMARC to send email?

In practice, yes. They are DNS TXT records that prove mail using your domain really came from you. Without them, major mailbox providers often send your messages to spam or reject them. Your email service gives you the SPF include and DKIM key; start DMARC at p=none and tighten it later.

Does Bigdomainhost sell an SMTP or email service?

No. Bigdomainhost does not sell email hosting or an SMTP relay. From a VPS, use a transactional email service or your existing mail provider over port 587. If you only need mailboxes on a website's domain, our Web and cPanel hosting plans include them.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.