Port 993 (IMAPS)
Key facts
- Port
- 993
- Protocols
- TCP
- Range
- System port (Well-Known), 0-1023
- IANA service name
- imaps
IANA assigns ports in this range to well-known services, under RFC 6335.
About port 993
Port 993 is the port of IMAP over an encrypted connection (IMAPS), which email clients and phones use to read a mailbox stored on the server, over TCP. The connection is encrypted with TLS from the very start, so the username, password, and messages always travel encrypted.
IMAP is defined in RFC 9051 (and its previous version in RFC 3501), and RFC 8314 recommends port 993 for encrypted mailbox access. IANA registers TCP port 993 for the imaps service.
What port 993 is used for
- Sync across devices: with IMAP, messages stay on the server, so your computer, phone, and webmail show the same mailbox, including folders and read messages.
- Email clients: in the incoming mail server settings, choose IMAP, port 993, and SSL/TLS security.
- Mailbox migration: mailbox migration tools connect to the old server and the new server on port 993, and copy the messages and folders.
Port 993 is for reading mail only. Sending mail uses SMTP, on port 465 or port 587.
Port 993 in the firewall
On a mail server that serves users, open port 993 to incoming traffic. Users read mail from anywhere, so it's usually not possible to limit the port to specific IP addresses.
- UFW:
ufw allow 993/tcp - firewalld:
firewall-cmd --permanent --add-service=imaps
When all users connect on port 993, you can close port 143 (IMAP with STARTTLS) in the firewall. A server that isn't a mail server doesn't need port 993 open.
Risks and security
The connection on port 993 is always encrypted, so protection focuses on the accounts themselves and on the server's encryption settings:
- Use strong, unique passwords for mailboxes.
- Temporarily block addresses that make repeated failed login attempts, for example with fail2ban.
- Set up a valid SSL certificate for the server name clients connect to, so email clients connect without warnings.
- Allow only current TLS versions.
Commands to check and configure
-
ss -tlnp | grep ':993 'Checks whether the IMAP server is listening on port 993.
-
nc -zv mail.example.com 993Checks whether port 993 on the mail server is open and reachable from your computer.
-
openssl s_client -connect mail.example.com:993 -crlfConnects over an encrypted connection and shows the certificate and the IMAP server's greeting line.
-
curl -v --user name@example.com imaps://mail.example.com/Connects to the mailbox and lists its folders. The password is prompted for separately.
-
ufw allow 993/tcpOpens port 993 to incoming traffic (UFW).
-
firewall-cmd --permanent --add-service=imapsOpens port 993 to incoming traffic in firewalld. Then run firewall-cmd --reload.
Port 993 in the IANA registry
| Port | Protocol | Service | IANA registry description |
|---|---|---|---|
| 993 | TCP | imaps | IMAP over TLS protocol |
| 993 | UDP | Reserved | Reserved |
Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)
Port 993 FAQ
What's the difference between IMAP and POP3?
With IMAP, messages are stored on the server and synced across all your devices, so it suits anyone who reads mail on both a computer and a phone. With POP3, messages are downloaded to one device and usually deleted from the server. Over an encrypted connection, IMAP runs on port 993 and POP3 runs on port 995.
Which security setting do I choose in my email client for port 993?
Choose SSL/TLS. On port 993 the connection is encrypted from the start, so the STARTTLS setting doesn't apply to it. STARTTLS is used on port 143.
Is port 993 also used to send mail?
No. Port 993 is used only to read mail from the server. Sending is set up separately, in the outgoing mail server (SMTP) settings, on port 465 or 587.
How do I move a mailbox to a new server with IMAP?
Mailbox migration tools connect to the old server and the new server over IMAP, usually on port 993, and copy all the messages and folders. This way, the mailbox arrives on the new server with all its content, without moving messages by hand.