Sieve, cbpolicyd or Zimbra Rules - Which Tool for Which Job
A Zimbra server already comes with two ways to act on mail. Sieve filters run in the mailbox server, and cbpolicyd, the policy daemon Zimbra bundles and leaves switched off, answers Postfix during the SMTP conversation. Add MSH Zimbra Rules and there are three tools that can read a header, refuse a message or count a sender. Picking between them is easier than it looks, because it mostly follows from one question: where on the mail path does each of them run?
Sieve: inside one mailbox
Sieve runs at final delivery, after Postfix, the spam filter and the virus scanner. That makes it
the only one of the three that sees the spam verdict, and the right tool for filing mail into
folders, per user or for everyone. But what Sieve changes exists only in the one mailbox it was
delivered to, and its reject comes after the message was accepted, so Zimbra has to send the
bounce itself, sometimes to a forged sender who never wrote to you.
cbpolicyd: at the door, envelope only
cbpolicyd answers during the SMTP conversation, before anything is accepted, and is free and already on the server. It sees the envelope: who connects, who sends, who receives and how often. It is good at greylisting and SPF checks, which MSH Zimbra Rules does not do. It is configured with SQL statements, keeps one database per server, and its upstream has not changed since 2013.
Zimbra Rules: at the door, and inside the message
MSH Zimbra Rules is a milter, so it also answers during the SMTP conversation, and since version 1.4 its SMTP rules and limit rules cover the jobs most people turn cbpolicyd on for: refusing clients and senders and capping how much a mailbox can send. Because it then reads the message too, the same tool adds signatures and disclaimers, removes attachments and verifies DKIM, for every recipient, on your server or someone else’s. The rules live in a web panel, can be tried in the Rules Tester first, and are shared by every MTA.
In short: Sieve for what happens inside a mailbox, cbpolicyd for greylisting and SPF, and MSH Zimbra Rules for everything that has to be decided at the door or changed in the message itself. They are not exclusive, and many servers will run two of them side by side.
Read more in the MSH Zimbra Rules vs Sieve and MSH Zimbra Rules vs cbpolicyd articles.
To learn more visit MSH Zimbra Rules website.