Read this before you install

Ports, firewalls, and the one that almost never works: 25

A mail server is the one piece of software that depends on other people's networks. Almost every "it does not send" call we take comes down to a port that was never open. This page is the whole picture, so you can check it before the installation day rather than after.

The ports

What SAInbox listens on, and what it dials out to

Two different directions, and they fail for different reasons. Inbound is a firewall on your own server. Outbound is your internet provider's policy, and you do not control it.

Inbound: what mail clients connect to on your server
ServicePlainEncryptedWho needs it open
POP3110995Outlook and Thunderbird on your network
IMAP143993Outlook and Thunderbird; the recommended setting
SMTP submission587465Clients sending mail through your server
Web client80443Browsers; HTTPS strongly recommended
Outbound: what your server connects to, on the internet
PurposePortBlocked often?What to use instead
Collecting mail from your provider993 (IMAP), 995 (POP3)RarelyNothing - these almost always work
Sending through your provider587 STARTTLS, or 465 SSLRarelyThis is the right choice
Sending through your provider25Almost alwaysUse 587 or 465. Port 25 is for server-to-server delivery, not for your server
The usual culprit

Port 25 outbound is blocked, and it is not your server's fault

Port 25 is the port mail servers use to talk to each other. Because that is also the port spam is sent from, almost everyone blocks it for ordinary connections:

  • Most internet providers in India block outbound 25 on broadband, and many business leased lines too
  • Cloud platforms - AWS, Azure and Google Cloud - block it by default on new accounts, and unblocking it needs a support request
  • Shared hosting usually refuses it, and offers its own mail server instead
  • Office firewalls often block it as a matter of policy

A blocked port does not refuse the connection. It swallows it: the server waits, and waits, and eventually reports a timeout. That is why a relay on port 25 looks like a wrong password, a wrong host, or a hung program.

The one line to remember. Your server sends mail through your provider's submission port - 587 with STARTTLS, or 465 with SSL - with the mailbox's own credentials. It does not send mail on port 25, and it does not relay through itself.
"localhost" is not a relay. Setting the outgoing server to localhost:587 means this server, which can deliver inside your network and nowhere else. External mail needs the provider's submission server.
Reading the error

What the message actually means

SAInbox prints the relay's own words, then its own reading of them. These are the six you will meet, and what each one is really saying.

Error on screen, cause, and the fix
What you seeWhat it meansWhat to do
No answer within 12 seconds The port is filtered - open but silent. On port 25 this is almost certain Change to 587 with STARTTLS, or 465 with SSL
535-5.7.8 Username and Password not accepted The server was reached and refused the credentials, so host, port and encryption are all correct Use an app password, not the account password. Fill the relay password, or leave it empty to use the incoming one
Connection refused Something is listening, and it said no - usually the wrong port for that service Check the port matches the service, and the encryption matches the port
Cannot deliver outside: relay is this server The outgoing server is set to localhost or this machine's own name Set the provider's submission server and credentials
Certificate name does not match The server's TLS certificate is for a different host name Use the host name printed on the certificate, not an IP address
Stuck under "Sending now" with a growing time The attempt was cut off mid-send, and the message was left marked in flight Open Admin, Send queue: abandoned attempts are released automatically, or press Release stuck
Before installation day

Seven things to confirm, in writing

Take this list to whoever manages your network. Each line is a question with a yes or no answer, and a "no" found now is a day saved later.

Installation checklist
QuestionWhy it matters
Is outbound 587 and 465 open?Sending depends on one of them. Ask for both.
Is outbound 25 open?If not - and it usually is not - we use 587 or 465. No problem, but it must be known.
Can the server reach your provider's mail host on 993 or 995?Collecting mail uses these. They are rarely blocked.
Which port will mail clients use, and from which subnet?Decides the firewall rule: 143 and 587 from the office, nothing from outside.
Is there a static IP, or a name on your internal DNS?Clients need to find the server by name rather than by an address that may change.
Is there a TLS certificate for the web site and the mail host?Without one, passwords and mail cross the network in clear text.
Does the provider allow IMAP or POP3 on this account?Gmail needs IMAP switched on. Outlook.com and Microsoft 365 need OAuth2 and are refused.
Security

What is protected, and what is your job

We would rather you knew both halves before you buy. The first column is what the software does; the second is what no software can do for you.

In the product

  • TLS on every listener, and HTTPS for the web client
  • SMTP authentication required, so the server cannot become an open relay
  • A local-only domain refuses every outside address by design
  • Every page and service call checks the session token
  • Dangerous attachment extensions blocked for every mailbox at setup
  • Nothing is transmitted anywhere: no call home, no telemetry, no cloud copy

On your side

  • A firewall rule that allows mail ports from your network only
  • Never forwarding 25, 110 or 143 on the router to the internet
  • A long, unique administrator password, and one account per person
  • Monthly Windows and SQL Server patching
  • A nightly backup of the database and the mail store, kept off the server
  • A UPS, and a restart order written down
Two limits worth saying out loud. SAInbox blocks dangerous attachment extensions; it is not an anti-virus, and it does not scan file contents. And it signs in with a username and password, so accounts that require OAuth2 - Outlook.com and Microsoft 365 - are refused. Both are stated plainly rather than discovered later.
Copy and paste

What to ask your internet provider

Send this to your ISP or hosting company. It is written so a support desk can answer each line without knowing anything about SAInbox.

1. Is outbound TCP 587 and 465 permitted from our connection?
2. Is outbound TCP 25 permitted? If not, is there an unblock request we can raise?
3. Is outbound TCP 993 and 995 permitted?
4. Do we have a static public IP, and can you set a PTR record for it?
5. Is inbound TCP 443 permitted to our server?
6. Do you filter mail ports on business leased lines differently from broadband?
If the answer is no

There is almost always a way

  • 587 or 465 instead of 25 - solves sending in nearly every case
  • A different provider's relay - if your host refuses submission, a mailbox elsewhere can relay for you
  • A local-only domain - internal mail needs no internet at all, and works while the line is down
  • VPN for remote staff - instead of publishing mail ports to the internet
  • An unblock request - for a static IP on a business line, providers will often open 25 on request
Before you buy

What must be ready at your end

SAInbox is installed on a server that you own and control. Everything below is your side of the arrangement: we supply the software and the documentation, you supply the machine, the platform and the person who runs it. An installation cannot start until each line is true.

Prerequisites, and who provides each
ItemWhat is requiredProvided by
ServerA Windows Server or Windows 10/11 machine, dedicated or virtual, on your network, left switched onYou
Windows and IISWindows with IIS and ASP.NET 4.5 enabled, administrator rights on the machineYou
SQL ServerSQL Server 2014 or 2019 Express, mixed-mode authentication, a login with rights to create the databaseYou
NetworkA fixed internal address for the server, and the ports in the table above opened where your clients need themYou
Provider accountA working mailbox at your hosting provider, its POP3/IMAP settings, and SMTP credentials that allow sendingYou
Disk and backupRoom for the mail store, and a backup destination you have tested a restore fromYou
A technical personSomeone on your staff who can install, configure, run and maintain it - see belowYou
The softwareThe SAInbox build, the database scripts, the setup guide and the licence keyUs

A technical person on your side is not optional

This is infrastructure, not a web app you sign up to. Somebody at your end must be able to install IIS and SQL Server, run a script against a database, open a firewall port, read a Windows event log and change a configuration file. If nobody on your staff can do that, arrange it before you buy - a consultant, your hardware vendor, or your hosting provider's support desk.

What we do and do not do

We supply the software, the scripts, the documentation and email support for the software itself. We do not install it on your server, manage your Windows machine, administer your SQL Server, or run your network - those stay with you. Support is answered within one working day, and the licence agreement sets this out in full.

Your data

Your mail stays on your server, and stays your responsibility

This is the honest trade of self-hosting, and we would rather say it before you buy than bury it in clause twelve. We never hold, read or control your mail. That also means we cannot protect it for you, and we do not pretend otherwise.

After handover, the data is yours to keep safe

Once the system is installed and the acceptance test is signed, the server, its operating system, its SQL Server, its backups and its security are yours to run. We are not responsible for any loss, corruption, deletion or disclosure of data after that point - whether it comes from a failed disk, a power cut, a virus or ransomware, an operator mistake, a storage limit reached, or a hosting provider deleting a mailbox.

What protects you is a backup you have restored

Take a backup, and restore it once before you trust it. The software keeps every message in SQL Server and as a real .eml file on disk, so a copy of the storage folder plus a database backup is a complete copy of your mail. Keep at least one of those outside the server. Chapter 12 of the setup guide shows how, and the acceptance test does not pass until a restore has been proved.

Signed, dated, stamped - before you rely on it

Every installation ends with an acceptance test: a written sheet of the checks that matter, marked pass or fail in front of you, and signed by your representative with the company stamp. That sheet is the point at which responsibility for the data passes to you, and it is the only fair place to draw the line.

Not sure whether your network will allow it?

Tell us your provider and how your mail is hosted today, and we will tell you which ports you need before anyone books an installation.