qmail

04th March
2010
written by Chris

Suppose you would like to send a copy of an incoming email to another account while the email still goes to the original account. You can do this by modifying the .qmail file of the original recipient and adding an entry that looks like the following:

&user@domain.com

On a Plesk server, a full .qmail file with the above changes looks like this:

| true
&user@domain.com
| /usr/bin/deliverquota ./Maildir

Keep in mind that if you do this on a Plesk server, these changes will be overwritten with mchk or upgrades so you will have to take measures to deal with this. I set the files immutable so they can't be changed by Plesk. This causes its own problems so you will have to decide if it is worth it.

29th April
2009
written by Chris

I may be wrong here, but I believe the default queue lifetime for a message sitting in the qmail queue is 7 days. To me, that's entirely too long to wait to deliver a defunct message considering most of them are probably SPAM bounces anyway.

Here is how to shorten the lifetime.

Change to the qmail control directory, assuming you use default locations on your server.

cd /var/qmail/control

Set the timeout to the number of seconds you want the message to remain in the queue. This is done in the queuelifetime file. This file doesn't normally exist by default. I'll use 24 hours (86,400 seconds) as an example.

echo "86400" > queuelifetime

Restart qmail.

/etc/init.d/qmail restart

That's it. Messages that don't get delivered in 24 hours will be gone.

Tags: , ,
24th April
2009
written by Chris

First, copy the smtp_psa file.

cp /etc/xinetd.d/smtp_psa /etc/xinetd.d/smtp_additional

Edit the newly copied file and replace the first line. Replace 'service smtp' with 'service submission'

vi /etc/xinetd.d/smtp_additional

Restart xinetd.d

service xinetd restart

Check that port 587 is listening on the server

netstat -ltnp
19th April
2009
written by Chris

qmHandle is a handy tool to aid in administering the queue on qmail enabled servers.

Get and install qmHandle

wget http://ns.nywtc.co.uk/qmHandle && chmod +x qmHandle && cp -a qmHandle /usr/local/bin/

Get and replace existing qmHandle

wget http://ns.nywtc.co.uk/qmHandle && chmod +x qmHandle && cp qmHandle `which qmHandle`

Usage is simple. After installing, just issue qmHandle without any arguments and you will be presented with a list of options.

Tags: , ,