Goal
Send email from an app on a VPS, or run your own mail server.Prerequisites
- A running VPS.
- For port 25: a dedicated IPv4 attached to the server.
Workflow
1
For app email (password resets, notifications), send through a mail provider on port 587 or 465. This works on every VPS today.
2
To run a mail server, first add a dedicated IPv4 to the server.
3
In Networking, under Dedicated IPv4, find Mail (port 25) and choose Request mail.
4
Describe what the server sends and submit. The row shows Pending review.
5
When support approves, the row shows Approved and port 25 opens on the dedicated IPv4.
Ports 465 and 587
These are mail submission ports: your app or mail client signs in to a provider such as Gmail, Zoho, Resend, SendGrid, Mailgun, SES or StackShift Mail, which then delivers the message. 587 uses STARTTLS and 465 uses TLS from the start. They stay open on every VPS, so WordPress SMTP plugins, Laravel, Ghost and Coolify email settings work without a request.Port 25
- Port 25 carries server-to-server delivery. It is closed in both directions on every VPS, on the shared IPv4, on IPv6 and on a dedicated IPv4, to protect the reputation of shared addresses.
- A mail request needs a dedicated IPv4. Without one, the server overview says so and links to Add a dedicated IPv4.
- The reason must be 10 to 1,000 characters. Say what the server sends, to whom, and how you handle bounces and unsubscribes.
- If support declines, the row shows Rejected with their note, and you can choose Request again.
- Removing the dedicated IPv4 closes port 25 again. A new address needs a new request.
- Set the reverse DNS of the dedicated IPv4 to your mail host name with support’s help before you start sending.
Expected result
App email leaves through your provider, or, once approved, your mail server sends and receives on port 25.
Common failures
Related guides
Dedicated IPv4 add-on
Attach an IPv4 address that only your VPS uses, for a fixed IP partners can allow-list, well-known ports on IPv4, or a mail server.
StackShift Mail overview
Mail APIs and workflows: isolated simulation, explicit brands, consent-aware campaigns, engagement, domain health, migration, spending, inbound delivery and diagnostics.