Outbound mail control
This page stops one compromised website sending spam from your server: it sets a server-wide default, measures what your websites normally send, puts a limit on, and tightens one website that is misbehaving. It also says exactly which half of this a broken-into site can get around, because that is the half worth knowing.
Why bother
One website takes the whole server with it.
A website that is broken into is worth something to whoever broke in mainly as a way to send mail, and the first sign is usually a customer saying their mail is bouncing. By then the server’s address is on a blocking list, getting off takes days, and until it is done nobody else on that machine can send either.
Step 1
Turn on counting, and limit nothing.
Open Server, then Outbound mail. Set the server default to through this server, leave the hourly limit at 0, and set what happens over the limit to count only. Nothing is refused and the numbers start appearing.
Sending through this server Hourly limit 0 (no limit) Over the limit count only Apply to new yes
Leave it like that for a week. You cannot pick a sensible threshold for traffic nobody has measured, and a limit guessed on day one is a limit that stops a legitimate newsletter.
Counting has to be on for any limit to mean anything. Without it nothing is counted and every number on the page is one nobody is checking, which the panel says rather than implies. If counting stops while limits are set, the health page treats it as critical: that state looks exactly like a quiet server.
Step 2
Read what your websites actually send.
The page reports, per website and per hour, how many messages went out, to how many recipients, and how many were refused. Recipients are counted separately on purpose: one message to four hundred addresses and four hundred messages are the same spam, and only the second shows up in a count of messages.
Take the busiest normal hour you see and roughly double it. That is a starting limit.
Step 3
Put the limit on.
A worked example for a server of ordinary business websites, where a few hundred an hour is plenty and a few thousand means something is wrong:
Sending through this server Hourly limit 300 Over the limit hold the rest of the hour Apply to new yes
And for one website you already know has been taken over:
Sending nothing at all Hourly limit 0 Over the limit stop until released
A website’s own setting overrides the server’s. Leaving a website’s limit empty means it follows the server, which is different from setting it to 0: empty is “whatever the server says”, and 0 is “no limit, for this website, whatever the server says”.
Where a website may send
Three answers.
| Setting | What it does | Use it when |
|---|---|---|
| Through this server | Mail goes to the server’s own mail service, where it can be counted and limited. The default. | Nearly always. |
| Direct to the internet | The website may reach a remote mail server itself on port 25. Nothing counts what it sends that way. | A website that genuinely needs it, which is rare. Sending through a mail provider on the submission ports is unaffected by this setting and is the thing worth encouraging. |
| Nothing at all | No outbound mail, by either route. | A website you already know has been taken over. Read the note below about which half of this the kernel enforces. |
How much it may send
A number per hour, and what happens past it.
| Over the limit | What happens | Use it when |
|---|---|---|
| Count only | The numbers appear and nothing is refused. | Measuring, before you have chosen a threshold. |
| Hold the rest of the hour | Further mail is deferred until the hour turns, then resumes on its own. | Normally. A busy website that had one unusual afternoon recovers with nobody doing anything. |
| Stop until released | The website stays stopped until an administrator releases it, and is marked for somebody to look at. | When passing the limit means something has gone wrong rather than something is busy. |
A website stopped by its own limit is shown differently from one an administrator stopped, because “we stopped it” and “it stopped itself” lead somewhere different.
The fields
What each input means, and what it refuses.
| Field | What it is for | Limits and refusals |
|---|---|---|
| Sending | Where this website may send. | Through this server, direct to the internet, or nothing at all. On a website, empty means follow the server. |
| Hourly limit | Messages per hour. | 0 to 1,000,000. Zero means no limit and everything is still counted. On a website, empty means follow the server, which is not the same as zero. |
| Over the limit | What happens once the limit is passed. | Count only, hold the rest of the hour, or stop until released. |
| Apply to new websites | Whether a website created tomorrow starts with the server’s policy. | On or off. Off means each new website has to be set by hand, which is how a gap appears. |
Counts survive a restart. An agent updated in the middle of a spam run would otherwise forget what the run had done so far and start it again at zero.
What it looks at
Volume, never content.
Dashmox does not read your customers’ mail. It counts how many messages a website sends, to how many recipients, and how that compares with what the same website normally does.
The honest part
A boundary, a control, and which is which.
Whether a website may go direct is a boundary. It is a kernel rule, so it holds whether or not the panel, the agent or anything else is running, and there is no way around it from inside a website.
How much it may send is a control. It stands in front of the program websites use to send mail, which catches every piece of ordinary software: a contact form, a mailing list plugin, a script. A website running code that deliberately avoids that program can send uncounted. No hosting panel can prevent that, because the mail system is reachable by any local process by design, and a panel that told you otherwise would be selling you a feeling.
The counter also fails open: if it stops answering, mail goes through rather than every customer’s being held. That is the right failure for a control and the wrong one for a boundary, which is why the two are described separately.
So “nothing at all” is half kernel and half not. The direct route out is closed by the kernel. Handing a message to this server’s own mail service is a file written into a directory rather than a connection, so no firewall sees it, and that half is the same program that does the counting. On a server where counting is off, only the direct route is closed, and the panel says so on the page rather than leaving you to find out.
Upgrades
It cannot be removed quietly.
Counting puts a small program where the system’s sendmail is, using the mechanism package upgrades are told about, so upgrading Postfix does not silently remove it. Turning counting off withdraws it and puts the server back exactly as it was.