Skip to main content

qmail

Queue Utilities

Posted in

Various utilities for the Qmail queue

qmHandle
qmqtool
Qmail-Remove
qfixpermissions
qfixq

Updates

Posted in
  • Qmail Core
    When updating the Qmail core, say to apply a new version of John Simpson's Combined Patch, be sure to stop all the Qmail services, including SMTP servers, before running make setup check. Otherwise, you'll run into errors as it tries to replace programs that are currently running.
  • vpopmail

Qmailtap

Posted in

qmailtap allows system administrators to archive email messages going to or from particular domains or users. The patch is included in John Simpson's Combined Patch.

Tap control file
Any taps should go into /var/qmail/control/taps
"Tap" an individual address

tappedaddress@domain.com:destination@example.com

Tap an entire domain

maildir2mbox

Qmail includes maildir2mbox for converting a Maildir to mbox format.

/var/qmail/bin/maildir2mbox

Nagios Monitoring

Posted in

Nagios has many useful plugins for monitoring this qmail server.

Prerequisites for Monitoring With Nagios
These instructions assume that you have a Nagios server already set up similar to the instructions on this site.

IP Address Change

Posted in

Changing the IP address of your mail server is more complicated than just modifying the network card settings. There's a few other places where the address needs to be changed.

dnscache
Change the IP address in /service/dnscache/env/IP, then restart the service (svc -t /service/dnscache).

SMTP
The run scripts for your SMTP service(s) need to be modified to reflect the new IP address you want them to listen on. Depending on which services you've enabled, you might need to edit:

/service/smtp-external/run
/service/smtp-internal/run
/service/smtp-ssl/run
/service/smtp-tls/run

Webmail
The IMAP server setting in your webmail configuration will need to be updated.

Backups

Posted in

Mirror/backup your vpopmail domains to another Qmail server. Run it through cron and have a hot-backup server ready for action in case your main server crashes.

To mirror the entire /home/vpopmail structure, on the destination server:

rsync -avx --delete -e ssh root@<source_server>:/home/vpopmail /home/

To mirror just a domain, on the destination server::
rsync -avx --delete -e ssh root@<source_server>:/home/vpopmail/domains/<domain> /home/vpopmail/domains

Instructions for setting up public keys so rsync won't require a password.

Automate using cron

Maintenance

Posted in

Maintenance tips for keeping your mail server running.

check_qmailq

Posted in

The original plugin is from http://www.openfusion.com.au/labs/nagios/
Download the check plugin:

cd /usr/local/nagios/libexec
wget http://www.dwadson.com/files/nagios/check_qmailq
chmod ugo+x check_qmailq

The check command takes the syntax of check_qmailq -w count -c count [-W pre_count] [-C pre_count] [-q /path/to/qmail-qstat]. The warning and critical message counts can be adjusted to your preference. Edit /usr/local/nagios/etc/nrpe.cfg and add entries for the services you want to check, such as:

check_qmailq

Posted in

OpenFusion has a set of Nagios plugins which include a check_qmailq plugin that monitors how many messages in the qmail-queue.

The original plugin is from http://www.openfusion.com.au/labs/nagios/
Download the check plugin:

cd /usr/local/nagios/libexec
wget http://www.dwadson.com/files/nagios/check_qmailq
chmod ugo+x check_qmailq

The check command takes the syntax of check_qmailq -w count -c count [-W pre_count] [-C pre_count] [-q /path/to/qmail-qstat]. The warning and critical message counts can be adjusted to your preference. Edit /usr/local/nagios/etc/nrpe.cfg and add entries for the services you want to check, such as:

Syndicate content