Sending email from a cloud server
Outgoing connections on port 25 are blocked on every new Barbrick Cloud server. Port 25 is how mail servers hand email to each other, and it's the port spammers abuse most when a server is hacked. Blocking it keeps our addresses off spam blocklists, which protects your mail and everyone else's.
Most apps don't need port 25. This article shows how to send email without it, and how to ask us to open it if you run a real mail server.
Send email without port 25
Ports 587 and 465 are open on every server. They're the ports apps use to send mail through an email service, with a username and password. This is the setup we recommend for almost everyone:
| Option | Good for |
|---|---|
| Your Barbrick hosting mailbox | Low volumes, like contact forms and alerts. Use mail.example.ca, port 465 (SSL/TLS) or 587 (STARTTLS), and the full email address as the username |
| A transactional email service | Password resets, receipts and notifications from an app, at any volume |
| A newsletter service | Marketing email to a list. See Sending newsletters: use a dedicated service |
For example, to send through your hosting mailbox from an app that reads SMTP settings from its environment:
SMTP_HOST=mail.example.ca
SMTP_PORT=465
SMTP_SECURE=ssl
SMTP_USER=alerts@example.ca
SMTP_PASSWORD=your-mailbox-password
Receiving email on your server (incoming port 25) isn't blocked.
Ask us to open port 25
If you run a mail server that delivers straight to other mail servers, ask us to open port 25. We review each request by hand.
Before you ask
- Your first invoice for the server is paid.
- The server has reverse DNS set to a hostname you own. See Set reverse DNS for a cloud server.
- Your sending domain has SPF, DKIM and DMARC records. See Set up SPF, DKIM, and DMARC step by step.
- The server isn't an open relay. Only your own users and apps can send through it.
Send the request
- Sign in at barbrick.ca/account and open a support request.
- Name the server, like
mail-1. - Tell us what you'll send, who receives it, and roughly how many messages a day.
- Tell us how people sign up to receive it, if you send to a list.
We usually reply within 1 business hour. If we approve, we open port 25 for that server only.
Important: Some server lines can't have port 25 opened at all. If yours is one, we'll help you send through port 587 instead.
When we close it again
We close port 25 again, without notice, if the server:
- Sends spam, or mail people didn't ask for
- Lands on a public blocklist
- Starts relaying mail for others
We tell you why, and work with you on a fix. Repeated problems mean it stays closed. See Acceptable use.
If something goes wrong
Your app times out when it sends mail. It's probably trying port 25. Change it to 465 or 587, with your email service's username and password.
Mail sends but lands in spam. Check your SPF, DKIM and DMARC records, and that reverse DNS matches your server's hostname.
You're not sure whether you need port 25. You almost certainly don't. If your app has SMTP settings, use port 465 or 587.
Still stuck? Ask us and we'll walk you through it.