Set up own mailserver with Plesk
Create a production‑ready mail setup in Plesk (Linux) using Postfix (SMTP) and Dovecot (IMAP/POP3).
Mail Server Ports
Protocol | Port | Direction | Description |
---|---|---|---|
SMTP | 25 | Outgoing | Standard port for mail transfer between mail servers. Used for relaying messages. Often blocked by ISPs for spam prevention. |
SMTP (Submission) | 587 | Outgoing | Recommended port for sending emails from clients (authenticated). Supports STARTTLS encryption. |
SMTP (SMTPS) | 465 | Outgoing | Legacy port for sending mail over SSL/TLS. Still supported for compatibility. |
IMAP | 143 | Incoming | Retrieves emails from the mail server while keeping them stored on the server. Supports STARTTLS encryption. |
IMAPS | 993 | Incoming | Secure version of IMAP using SSL/TLS encryption. |
POP3 | 110 | Incoming | Downloads emails from the server and usually removes them from it. Supports STARTTLS. |
POP3S | 995 | Incoming | Secure version of POP3 using SSL/TLS encryption. |
These ports are used by Postfix (for SMTP) and Dovecot (for IMAP/POP3) in Plesk to handle both incoming and outgoing mail traffic securely.
Difference between IMAP and POP3
-
IMAP (Internet Message Access Protocol) stores emails on the server and synchronizes them across all devices. Messages, folders, and read status remain consistent everywhere.
-
POP3 (Post Office Protocol v3) downloads emails to a single device and typically removes them from the server. It’s suited for one-device setups without synchronization.
Setup
This guide focuses on SMTP submission and IMAPS.
- Open ports 587 for SMTP and 993 for IMAPS in your firewall.
Some people reported problems receiving emails, which was related to port 25 being closed. If you encounter the same error, open port 25 in the firewall and try again.
Prerequisites
- Root or administrator access to Plesk.
- A domain in Plesk with DNS managed either in Plesk or your external DNS provider.
- A valid SSL certificate for your domain.
In most cases, the mail server is already set up in plesk and only needs to be customized to suit your own requirements.
Check current mail configuration
Navigate to Tools & Settings
> Mail
> Mail Server Settings
and check the following settings:
- Enable mail management functions in Plesk
- Postifx is installed as mailserver
- Dovecot is installed as IMAP/POP3 server
- Enable SMTP service on port 587 on all IP addresses
If everything is set up correctly, you can go to the next step.
Add a new mail user
Navigate in the sidebar to Mail
and click on Create email adress
.
You can now add a new mail user, choose a username and password, select wether you can login to plesk, add a automatic reply and forwarding
Add mail account to email client
Now you’re ready to add your new mail account to your email client like Outlook, Thunderbird or your smartphone. For this read the documentation of Plesk
Don’t forget to use the correct ports for SMTP submission (587) - Outgoing and IMAPS - Incoming (993).