Jim Ramsay <[EMAIL PROTECTED]> writes:

> Postfix works great and has all the features I wanted by default,
> except one.  I miss dot-qmail files.  Postfix's dot-forward doesn't
> even come close.

Yup.  It's funny that this is the first thing one notices when moving
away from qmail.  People who haven't used dot-qmail files think you
are crazy (see the postfix-users archives), but they just don't know
what they are missing.

> I haven't really looked at procmail yet - could it maybe do this?

Procmail is just like maildrop except less resource conscious, less
reliable, and with a more hideous syntax; if you can't do it with
maildrop, you won't be able to do it with procmail.

> ... unless anyone else out there knows what I can use instead.

There is no drop in solution for dot-qmail support, but Ron Bickers
figured out a way to use qmail-local for local delivery on a Postfix
system.  I'll attach his README:

$Id: QMAIL_LOCAL_README 26 2004-02-11 08:10:33Z rbickers $

Using qmail for Local Delivery
==============================

This document describes how to use qmail as a local delivery agent for 
Postfix.

NOTE: This was designed as an aid in migrating from qmail to Postfix and from 
qmail-dependent software to MTA independent software.  It is not intended to 
be a production quality qmail-compatible local delivery agent.  It is assumed 
that you are already familiar with qmail administration.

Setup qmail
===========

Install a stripped down version of qmail (similar to a mini-qmail[2] 
installation) as follows.  If you already have qmail installed, much of this 
will already be done:

  1) Install qmail in /var/qmail, including all the usual binaries in
     /var/qmail/bin.

  2) Add a symbolic link to qmail-qmqpc from /var/qmail/bin/qmail-queue.

  3) Place 127.0.0.1 in /var/qmail/control/qmqpservers.

  4) Setup /var/qmail/control/me, /var/qmail/control/defaultdomain, and
     /var/qmail/control/plusdomain, so that qmail-inject uses appropriate 
     host names in outgoing mail.
  
  5) Place hostname in /var/qmail/control/idhost, so that qmail-inject
     generates Message-ID without any risk of collision.

You do NOT need to setup any long-running qmail processes.  All messages sent 
through qmail-inject or qmail-queue will be handed directly to Postfix via 
QMQP.

Setup mailbox_command script
============================

Place the following in /usr/local/libexec/postqmail-local:

  #!/bin/sh
  export PATH=$PATH:/var/qmail/bin
  tail +3 | seekablepipe qmail-local -- \
      "$USER" "$HOME" "$LOCAL" "${EXTENSION:+-}" "$EXTENSION" "$DOMAIN" \
      "$SENDER" ./Maildir/
  e=$?
  (($e == 111)) && exit 75
  (($e == 100)) && exit 77
  exit $e

You will either need 'tail' and 'seekablepipe' in the PATH, or adjust the 
script to point directly to them.

A seekablepipe program is available as part of the conn-tools[1] product.  
Or, you can use the following shell script, adjusting the tmp directory as 
desired:

  #!/bin/sh
  set -e
  tmp=/var/tmp/seekable.$$
  exec 3<&0 4<&1 >$tmp <$tmp
  rm $tmp
  cat <&3
  exec ${1+"$@"} 1<&4 3>&- 4>&-

Setup Postfix
=============

Setup the QMQP server in Postifx by adding (or uncommenting) the following 
line in master.cf:

  628       inet  n       -       n       -       -       qmqpd

Place the following in /etc/postfix/main.cf:

  # qmail local delivery.
  prepend_delivered_header = file, forward
  mailbox_command_maps = hash:/etc/postfix/mailbox_commands
  qmqpd_authorized_clients = 127.0.0.1

The prepend_delivered_header line removes the addition of the Delivered-To 
header for commands.  If Postfix adds this header, qmail-local will bounce 
the message as looping.  qmail-local will add its own Delivered-To header.  
If you want Delivered-To headers added to commands for other reasons, you can 
adjust postqmail-local to use 'tail +5' instead of 'tail +3', but you will 
lose the X-Original-To header added by Postfix.

Place in /etc/postfix/mailbox_commands a mapping of usernames that will use 
postqmail-local delivery.  For example:

  # These users need qmail-local delivery.
  johndoe         /usr/local/libexec/postqmail-local
  janedoe         /usr/local/libexec/postqmail-local

If you want all local delivery to use postqmail-local, you may replace 
mailbox_command_maps with the following:

  mailbox_command = /usr/local/libexec/postqmail-local

Notes
=====

* ezmlm should work WITHOUT the modifications described in QMQP_README.

References
==========

[1] http://www.skarnet.org/software/conn-tools/index.html
[2] http://cr.yp.to/qmail/mini.html

Ron Bickers
[EMAIL PROTECTED]
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to