MSH Software / blog

Sending Limits - Stop a Hacked Account Before It Sends 10,000 Messages

A stolen password turns a quiet mailbox into a spam cannon. Within an hour the account sends thousands of messages, the server lands on a blocklist, and the mail of every other user starts to bounce. By the time someone notices, the damage is done, and getting off the blocklist takes longer than the attack did. A sending limit stops the flood after the first hundred messages and keeps the damage to one account.

A limit for each sender

Limit rules, added in version 1.4, allow at most a number of messages, or a total size, per period: per minute, per hour, per day, or per calendar day, week or month. Each sender gets a counter of their own, or each domain, recipient or client network if that is what you want to limit.

Once the limit is reached, the server refuses every further message from that sender. It is not a warning that arrives after the spam has gone out: the next message, and the thousand after it, never leave your server. You choose whether they are deferred, so a legitimate sender’s server tries again later, or rejected for good, with a reply you can word yourself.

A sender who logged in is counted under the login, whatever address they put in the envelope, so a compromised account cannot escape the limit by changing its sender address. The rule’s conditions and exceptions decide what counts: only mail of users who logged in, for example, or everything except an address list of senders such as newsletters that may send more.

The Limit Rules page of MSH Zimbra Rules with rules such as Users limit, Domain limit, Burst protection, Hourly recipients per user, Daily cap per user and Inbound per client network

Several rules work side by side: a short burst limit that catches a sudden flood within minutes, an hourly limit per user, and a daily cap for the slow leak that stays under the hourly one.

Blocked first, then told

The block comes first and does not wait for anyone to read their mail. On top of it, when a counter is full, the addresses in Notify get one e-mail: which rule, which account, from which client address, and to whom it was sending. The Message Limits page shows every counter, fullest first. Once you have checked that a user simply sent a big mailing, Reset lets them send again at once.

MSH Zimbra Rules does not lock accounts by itself. When the notice shows an account that was taken over, you lock it in Zimbra, change the password and unlock it, and the notice names the commands to do it.

With several Zimbra MTAs, the counters are shared by all of them, so an attacker cannot get past a limit by spreading mail over the servers.

Read more in the Limit rules documentation and the Stop a compromised Zimbra account from sending spam article.

To learn more visit MSH Zimbra Rules website.

More about MSH Zimbra Rules

All posts