Wednesday, April 06, 2005
QMQP and SMTP
RUCUS is a big Qmail shop. They run Qmail as a mail
server on one of their machines, and make use of QMQP to queue mail from their
other machines. This avoids the need for a full-blown mail server package
on all except the actual mail server and works very well when the QMQP
server is running.
Unfortunately it's been helluva unstable recently and has been crashing a
lot. This is irritating because you can't send mail from any of the
machines (you've lost the benefit of a local queue). So what we need is
another QMQP server to act as a backup in case the main one dies. A normal
mini-qmail install supports this, but
unfortunately there isn't a convenient place to house the backup QMQP
server.
All this got me wondering whether one could do QMQP -> SMTP protocol
translation and use a standard SMTP server instead. The backup MX server,
for instance, which runs Exim and doesn't
know diddly-squat about QMQP. Google didn't seem to think so, which bugged
me.
So being JAPH I decided that I'd
make one. It wasn't too difficult. It just required getting your head
around netstrings and
realising that Text::Netstring
wasn't going to do what I needed it to do.
Believing this might be useful to someone else, the source code is available. It isn't
terribly complicated and relies on the tcpserver from DJB's ucspi-tcp package to do
networking. I think it honours the QMQP protocol fairly well.
So now I can run a QMQP to SMTP gateway on the QMQP client machine and use
it to fall over when the QMQP server fails. It sort of defeats the idea of
mini-qmail, but might help
minimise the effects of a server crashing.
YMMV and all that.
posted by guy at: 12:27 SAST |
path: /systems |
permanent link
