A chronological documentation test project, nothing serious, really!

21 Jul 2011 Migrate Zimbra mail filter rules between servers

This is a short HOWTO migrate Zimbra mail filter rules from one server to another or even copy the rules from one user and import them to another. These commands are useful to use when you migrate user accounts between servers since mail filters are not migrated using the Zimbra to Zimbra migration script, zmztozmig . I might write a short post about migrating users between Zimbra servers later.

Export the rules to a file named filter_rules.sieve as the zimbra user

# zmprov ga zimbraMailSieveScript > filter_rules.sieve

The content of the file could look something like this

# name
zimbraMailSieveScript require ["fileinto", "reject", "tag", "flag"];

# Filtername
if anyof (header :contains ["to"] "root@localhost") {
    fileinto "foldername";

Copy the filter_rules.sieve file to the other server and import the filter rules by enclosing the filter rules with a single qoutes around the rules

# zmprov ma zimbraMailSieveScript 'require ["fileinto", "reject", "tag", "flag"];

# Filtername
if anyof (header :contains ["to"] "root@localhost") {
    fileinto "foldername";

This has been tested on a Zimbra 7.1.1 OSE server after migrating some users mailboxes from a 32-bit Zimbra server to a new 64-bit server.

Tags: , , , , , ,

Posted by

17 Nov 2009 Zimbra distribution list commands

This is just a short post describing Zimbra distribution list (mailinglist) commands.

These commands should be run as the zimbra user

# su - zimbra

List all distribution lists

# zmprov gadl

Print only members addresses of a distribution list

# zmprov gdl | grep zimbraMailForwardingAddress: | awk {'print $2'}

Show if a list is member of another distribution list(s)

# zmprov gdlm

Tags: ,

Posted by

02 Feb 2008 ReIndexing a Zimbra mailbox

I had some problems with one of my mailaccounts periodically not receiving mail. A temporary way to fix it was to restart zimbra as zimbra user (zmcontrol stop; zmcontrol start; ) It worked for a while, but came back usually after a couple of hours.

The solution to this problem was to reindex the mailaccount as zimbra user.

# su - zimbra
# zmprov rim start
# zmprov rim status

Tags: , ,

Posted by