Ron Bickers
2004-01-10 00:47:26 UTC
Howdy all,
I'm in the process of considering migrating from qmail to Postfix, but the
biggest roadblock is the lack of dot-qmail behavior and the many ezmlm lists
my customers have. FYI, I have 7 years of experience with qmail, and about
1 week with Postfix, though I've managed to understand a good bit of how
Postfix works.
After reading all I could find on this subject, I toyed with using the
qmail-local program as a transport and I have what appears to be a working
solution without having to run any qmail daemons.
I have an unmodified mini-qmail installation per
http://cr.yp.to/qmail/mini.html with qmqpservers containing 127.0.0.1.
In Postfix, I've enabled qmtpd and set qmqpd_authorized_clients.
In master.cf I defined a qmail-local transport as follows:
qmail-local unix - n n - - pipe
user=postqml argv=/usr/bin/sudo -u $user -H
/usr/local/libexec/postqmail-local ${mailbox} ${extension}
${nexthop} ${sender}
That's one part I wish could be different, but I don't know any other way.
I don't know if/how I can run a transport under the recipient user, and I
can't run it as root with something like setuidgid, so I setup a user
(postqml) and allow him to sudo to any user and run postqmail-local. I
previously tried qmail-local as a mailbox_command so It would run as the
recipient user, but quickly found out that wouldn't fly due to the headers
added by the local transport.
/usr/local/libexec/postqmail-local contains the following:
#!/bin/sh
# $1 = $LOCAL
# $2 = $EXTENSION
# $3 = $DOMAIN
# $4 = $SENDER
/usr/local/bin/seekablepipe /var/qmail/bin/qmail-local -- "$USER" "$HOME"
"$1" "${2:+-}" "$2" "$3" "$4" ./Maildir/
e=$?
(($e == 111)) && exit 75
(($e == 100)) && exit 77
exit $e
It runs qmail-local and converts qmail-style exit codes to the Postfix
equivalents. I stole the codes from TMDA; I have zero knowledge of Postfix
exit codes, but this seems to do the job.
I defined transport_maps as a regexp table and selectively choose the
recipient addresses to use the qmail-local transport, though it appears that
I could set local_transport for a global effect. I'm mostly interested in
this as a migration tool, so I don't particularly want it global.
I'm running ezmlm-idx-0.53-40, without QMQP support enabled. It appears
that the mini-qmail setup (where qmail-queue is a symlink to qmail-qmqpc)
works just fine.
Based on my tests, everything works as I would expect, but I'd like some
feedback to see what might be wrong that I don't see and if it could be
improved.
Thanks!
I'm in the process of considering migrating from qmail to Postfix, but the
biggest roadblock is the lack of dot-qmail behavior and the many ezmlm lists
my customers have. FYI, I have 7 years of experience with qmail, and about
1 week with Postfix, though I've managed to understand a good bit of how
Postfix works.
After reading all I could find on this subject, I toyed with using the
qmail-local program as a transport and I have what appears to be a working
solution without having to run any qmail daemons.
I have an unmodified mini-qmail installation per
http://cr.yp.to/qmail/mini.html with qmqpservers containing 127.0.0.1.
In Postfix, I've enabled qmtpd and set qmqpd_authorized_clients.
In master.cf I defined a qmail-local transport as follows:
qmail-local unix - n n - - pipe
user=postqml argv=/usr/bin/sudo -u $user -H
/usr/local/libexec/postqmail-local ${mailbox} ${extension}
${nexthop} ${sender}
That's one part I wish could be different, but I don't know any other way.
I don't know if/how I can run a transport under the recipient user, and I
can't run it as root with something like setuidgid, so I setup a user
(postqml) and allow him to sudo to any user and run postqmail-local. I
previously tried qmail-local as a mailbox_command so It would run as the
recipient user, but quickly found out that wouldn't fly due to the headers
added by the local transport.
/usr/local/libexec/postqmail-local contains the following:
#!/bin/sh
# $1 = $LOCAL
# $2 = $EXTENSION
# $3 = $DOMAIN
# $4 = $SENDER
/usr/local/bin/seekablepipe /var/qmail/bin/qmail-local -- "$USER" "$HOME"
"$1" "${2:+-}" "$2" "$3" "$4" ./Maildir/
e=$?
(($e == 111)) && exit 75
(($e == 100)) && exit 77
exit $e
It runs qmail-local and converts qmail-style exit codes to the Postfix
equivalents. I stole the codes from TMDA; I have zero knowledge of Postfix
exit codes, but this seems to do the job.
I defined transport_maps as a regexp table and selectively choose the
recipient addresses to use the qmail-local transport, though it appears that
I could set local_transport for a global effect. I'm mostly interested in
this as a migration tool, so I don't particularly want it global.
I'm running ezmlm-idx-0.53-40, without QMQP support enabled. It appears
that the mini-qmail setup (where qmail-queue is a symlink to qmail-qmqpc)
works just fine.
Based on my tests, everything works as I would expect, but I'd like some
feedback to see what might be wrong that I don't see and if it could be
improved.
Thanks!
--
Ron Bickers
Logic Etc, Inc.
Ron Bickers
Logic Etc, Inc.