Solution for adding disclaimers with Zimbra

I often find that administrator have problems with appending disclaimers to messages in own organizations. Why adding footer is such an issue? Mail signatures are not a problem when they're simple, but when we need something more sophisticated it's a big pain. Appending simple text to message is not enough to our bosses, marketing department, company compliance and our customers. Everyone need more.
1 answer

Solution for adding disclaimers with Zimbra

Workaround is not a solution

I've seen many workarounds to achieve functionality which should be out of the box in all mail servers, which isn't. Real solution should work tightly with MTA (Postfix, Sendmail), easy to install, configure and work almost without maintenance.
Many dirty solutions for disclaimers and signatures, like MIMEdefang, Alermime or Mailscanner, works perfectly fine and do the job. They're often based on scripts, which are fast and simple, but they've disadvantages. When there is a need to make something advanced the power ends.
We may thing that collaborative suites offer functionality in this field. Not quite. Zimbra have disclaimers, but only for single domain. If we want to add footer to multiple domains, we're on our own. HTML? Images? Personalized signatures with images and dynamic variables from LDAP? Forget about it. Built-in functionality is not even close to business needs.

Administrator it's not a programmer, it's not his task and he doesn't have time to implement everything. Writing bulletproof script isn't easy. For this job milter is needed. This piece of software it's a plug-in for Sendmail, Postfix and Zimbra. It can analyze headers and message body, accept or reject message, modify body and manipulate attachments.

MSH Disclaimer & Signatures it's a milter extension for common mail servers, like Postfix, Sendmail and Zimbra (use internally Postfix). It's a sophisticated application which works in background and does heavy email processing.
We'll add disclaimers in many ways: per user, per domain, in time range.
If we want personalized signatures and disclaimers for our users. Show them an example. Maybe they are not aware of this and we're still in dark ages of email disclaimers.
Pic. Built-in compose editor will help us to make simple and beautiful disclaimers.


I'll show how to install and configure application. Our goal is to make configuration which will append different disclaimers per domain. Go to download page and get proper files for our platform. Server module is mandatory to install, desktop module works on two platforms (Windows or Linux), so we can choose between them.

Install server module
Add execute permission and run with --auto parameter, it will use default values and will install in default directory /opt/msh-ds.
# chmod +x msh-ds-milter.bin
# ./msh-ds-milter.bin --auto
If we have customized environment see more about custom parameters. After installation MTA server will be reloaded and milter will automatically run.
Make sure that defaults TCP ports 1107, 1108 are not blocked but our firewall.
Install desktop module

If we choose Windows version then run setup.exe and click couple of times Next button. If we choose Linux version then add executable bit and run install script without parameters.
$ chmod +x msh-ds-admin.bin
$ ./msh-ds-admin.bin
Run and make some rules
Run Administrator Panel. On Windows desktop find a new position in menu start. On Linux desktop an application is installed in our home directory in msh-ds-admin directory. After installation we'll need to connect to server where we installed milter extension.
Create new rule in Disclaimer Rules node. The task is easy, we want to add company disclaimer at the bottom of each message, but different disclaimer per domain. Of course we don't want to duplicate disclaimers if recipients reply several times to the same message.
Pic. Message Sender condition. This condition matches messages that
are sent by senders within the specified scope.
1. Create disclaimer for both e-mail message formats: HTML and Plain Text.
2. Define which messages should have footer. Choose from menu Message Sender condition. Put here * value.
3. Probably some messages need to be skipped (cron jobs, mailing lists, etc.), use Exceptions to define exclusions. To skip adding another disclaimer choose Message Keyword Searching exception and put some text which you have in disclaimer template.
4. Rules execution path. Do we need to process another rules? Yes. Set proper options when disclaimer is added or not.
5. On the last step define rule name.
Now we're almost done. Create second rule and do exactly like previous, but set * in Message Sender condition and make different template.
Test it and have fun
Save the changes and we're ready to test our settings. Jump to our mail client and send test message to someone (it can be to ourself).