Next Previous Contents

12. Reliability

12.1 What types of filesystems are safe for mail?

qmail's queue (except for bounce message contents) is crashproof if the filesystem guarantees that single-byte writes are atomic and that directory operations are synchronous. These guarantees are provided by the BSD FFS and its derivatives, and by typical journaling filesystems.

Do not use async (or softupdates) filesystems; if you do, and if your system crashes at the wrong moment, you will lose mail. Under Linux, make sure that all mail-handling filesystems are mounted sync. The same comments apply to sendmail and other mailers.

It is safe to put qmail's queue on a noatime filesystem.

12.2 How do I back up and restore the queue disk?

You can't.

One difficulty is that you can't get a consistent snapshot of the queue while qmail-send is running. Another difficulty is that messages in the queue must have filenames that match their inode numbers.

However, the big problem is that backups --even hourly backups-- are far too unreliable for mail. If your disk dies, there will be very little overlap between the messages saved in the last backup and the messages that were lost.

There are several ways to add real reliability to a mail server. Battery backups will keep your server alive, letting you park the disk to avoid a head crash, when the power goes out. Solid-state disks have their own battery backups. RAID boxes let you replace dead disks without losing any data.


Next Previous Contents