My Zimbra email server cheat-sheet
- Introduction
- Relay or Route
- User management
- Domain management
- Mailbox management
- Delete any items that have a missing blob and delete items without exporting.
- Reindex a user mailbox
- Recalculate the mailbox quota usage and unread messages count
- Redirection and permissions
- User mailbox backup and restore
- Manage MySQL in Zimbra
- Check the MySQL database for corruption
Introduction
Here you can find my list of useful Zimbra
commands.
Relay or Route
Relay/Route emails to external smtp server
Relay/Route all mail destined for a particular domain
User management
Import user’s encrypted password
Place user account into maintenance mode
This will prevent delivery of new mail messages until we finish with the backup procedure.
Domain management
Get list of domains
Get list of all e-mail accounts for a domain
Mailbox management
Get mailbox id
Repair meta data for a mailbox
Do a verbose check for a mailbox id. This will generate a report
Delete any items that have a missing blob and delete items without exporting.
Reindex a user mailbox
Recalculate the mailbox quota usage and unread messages count
Redirection and permissions
Fix Permissions
Enable http and redirect to https
User mailbox backup and restore
backup user mailbox
restore user mailbox
(Change resolve=skip to resolve=modify or resolve=reset, as required, where:
- resolve=reset will delete all mails and import only ones in backup
- resolve=skip will skip and not replace and therefore make duplicate emails
-
resolve=modify will make duplicate
- skip Restore deleted items Ignore existing items completely
- modify Restore deleted items Update existing items to match backup (unread flags etc.)
- reset Delete all contents of the account Restore the backup into the now empty account
defailt explanations
“skip” ignores duplicates of old items, it’s also the default conflict-resolution. “modify” changes old items. “reset” will delete the old subfolder (or entire mailbox if /). “replace” will delete and re-enter them.
“resolve=skip” ignores duplicates of old items, it’s also the default conflict-resolution. “resolve=modify” changes old items. “resolve=reset” will delete the old subfolder (or entire mailbox if /). “resolve=replace” will delete and re-enter them.
Manage MySQL in Zimbra
Check the MySQL database for corruption
Activate MySQL backup
setting mysql_backup_retention to 3 will retain three rotating versions of mysqldump, allowing for a restore of all mysql date for the last three days:
location of mysql my.conf
/opt/zimbra/conf/my.cnf
login to mysql server
Run mysqlcheck