Zimbra Collaboration Administrator Guide

Add to My manuals
402 Pages

advertisement

Zimbra Collaboration Administrator Guide | Manualzz

Appendix C ZCS Crontab Jobs

The crontab is used to schedule commands to be executed periodically on the

Zimbra servers.

How to read the crontab

Each entry in a crontab file consists of six fields, specified in the following order

minute hour day month weekday command

The fields are separated by blank spaces or tabs.

Field

minute

hour

day of month

month

day of week

command

Description

0 through 59

0 through 23

1 through 31

1 through 12

0 through 7 (0 or 7 is Sunday, 1 is Monday, etc., or use names)

This is the complete sequence of commands to be executed for the job

When an asterisk (*) is displayed, it means all possible values for the field. For example, an asterisk in the hour time field would be equivalent to “every hour”

ZCS Cron Jobs

You can view the ZCS crontab by logging on as zimbra and typing

crontab -l

.

The following cron jobs are scheduled to run for ZCS

Log pruning

The log pruning deletes logs from /opt/zimbra/log that are over eight days old.

The job runs at 2:30 a.m.

Status logging

zmstatuslog calls zmcontrol status and outputs it data into syslog.

This is primarily so that logger can read the data and keep the administration

Zimbra Collaboration Network Edition 385

Administrator Guide

console status up-to-date.

Status logging job runs every 2 minutes.

Backups

Full and increment backups are scheduled to run according to the schedule defined by zmschedulebackup command. By default the full backup is scheduled for 1:00 a.m., every Saturday. The incremental backups are scheduled for

1:00 a.m., Sunday through Friday.

By default, backups older then a month are deleted on the first of each month at

12 a.m.

Jobs for crontab.store

Log pruning

The log pruning deletes logs from /opt/zimbra/mailboxd/logs that are over eight days old. The job runs at 2:30 a.m.

Clean up the quarantine dir

Mail identified with a virus or spam are not dropped immediately, but are put in quarantine. Messages older than seven days are deleted at 1:00 a.m daily.

Table maintenance

The ANALYZE TABLE statement is run on all tables in the database to update the statistics for all indexes. This is done to make sure that the MySQL query optimizer picks the correct es when executing SQL statements. This script is run 1:30 a.m.on Sunday.

Report on any database inconsistencies

zmdbintegrityreport is run weekly to check the MySQL database for corruption and will notify the administrator if any corruption is found. When this is run, it may consume a significant amount of I/O. If you find that it is an issue, you may want to change the frequency with which zmdbintegrityreport is run by editing the ZCS crontab entry. This report runs at 11:00 p.m. Sundays.

Large sites may opt to disable this by setting zmlocalconfig -e zmdbintegrityre-

port_disabled=TRUE.

If you choose to disable this, it is recommended that the integrity report be run by hand during the normal maintenance windows and prior to running any ZCS upgrades.

Monitor for multiple mysqld tp prevent corruption

A script is executed to see if mysqld process is running to detect cases where corruption is likely to be caused. An email is generated if it finds more than 1 mysqld process running. The script runs every 5 minutes.

Jobs for crontab.logger

process logs

zmlogprocess runs every 10 minutes to parse logs and produce MTA metrics

(as/av, volume, count, etc).

386 Network Edition Zimbra Collaboration

Daily reports

When the logger package is installed, a daily mail report is automatically scheduled in the crontab. The report runs every morning at 11:30 and is sent to the administrator’s email address.

Jobs for crontab.mta

Queue logging

The zmqueue report status via the syslog is reviewed. This is logger data. The status is updated every 10 minutes.

Spam training

The zmtrainsa script is enabled to feed mail that has been classified as spam or a non-spam to the SpamAssassin application. SpamAssassin learns what signs are likely to mean spam or ham. This job should run only on one Zimbra MTA. The job runs at 11:00 p.m.

Spam training cleanup

zmtrainsa empties the spam and ham mailboxes each day. The job runs at 11:45 p.m.

Spam Bayes auto-expiry

Spam bayes auto-expiry maintains the spam-assassin Bayes database.

This keeps the database to manageable size ensuring spam processing remains as quick as possible. This runs every day at 11:20 p.m.

Clean up amavisd/tmp

This job is used to clean up the amavisd temp files. It runs at 5:15 a.m. and at 8:15 p.m.

Zimbra Collaboration Network Edition 387

advertisement

advertisement

Table of contents