On Mon, 9 Aug 1999, Cris Daniluk wrote:

>
> [snip]
> > Check out qmail-qmqpc and qmail-qmqpd.
>
> This looks like it would do what we need, BUT, there's no documentation at
> best :) Where would you find more detailed documentation? The man pages
> don't even discuss how to implement it. In fact, they say that qmqpd needs
> several environment variables which must be passed by tcp-env, but never
> says what! I would imagine this should be a pretty decent priority, as it
> doesn't seem to be worth even having a man page if it's going to be that
> helpless :)

On the client side:

    mv /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig
    ln -s /var/qmail/bin/qmail-qmqpc /var/qmail/bin/qmail-queue

    cat > /var/qmail/control/qmqpservers << EOF
# List of QMQP servers. This file is used by qmail-qmqpc. To enable
# QMQP, remove qmail-queue and make a symbolic link as follows:
#
# qmail-queue -> qmail-qmqpc
#
# Instead of queueing mail locally, qmail will now make a QMQP
# connection to the first available QMQP server from the list below.
# The QMQP servers must be listed by IP address. If no servers can be
# contacted, mail delivery will fail. Hopefully, one of the QMQP
# servers will be running qmail-qmqpd.
#
# ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
# Do NOT put the current host in this list - this will cause an endless
# loop of qmail-qmqpc/qmail-qmqpd connections because qmail-qmqpd wants
# to call qmail-queue to place the incoming message in the queue.
# ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !

# qmqpservers - listed by IP address ONLY
1.2.3.4
1.2.3.5
EOF

On the server side:

    - edit /etc/services and add the line

        qmqp   628/tcp         mail

    - run qmail-qmqpd from inetd (not recommended). Edit
    /etc/inetd.conf (all on one line)

        qmqp stream tcp nowait qmaild /pkgs/bin/tcpd
            /var/qmail/bin/tcp-env /var/qmail/bin/qmail-qmqpd
    
      /pkgs/bin/tcpd is wherever you have tcp_wrappers installed.
      Access control is handled by /etc/hosts.allow and
      /etc/hosts.deny. tcp-env provides the necessary environment
      variables to qmail-qmqpd.

    - run qmail-qmqpd from tcpsever (highly recommended). In a startup
    script run the following

        tcpserver -u 7791 -g 2108 -c 40 -v -R -x \
            /etc/qmqpdrules.cdb 0 qmqp /var/qmail/bin/qmail-qmqpd 2>&1 \
            | accustamp | cyclog -s 1000000 /var/log/qmqp

      7791 and 2108 are the uid and gid of the qmaild user and nofiles
      group. tcpserver provides the necessary environment variables to
      qmail-qmqpd. The -R option stops tcpserver doing identd lookups.
      Access control is handled by the cdb file /etc/qmqpdrules.cdb.
      This file is generated from /etc/qmqpdrules by running the
      command

        tcprules /etc/qmqpdrules.cdb /etc/qmqpdrules.tmp < /etc/qmqpdrules

      You should also look at wrapping the tcpserver invocation in
      supervise (part of Dan's daemontools package)

        eval "env - PATH=$PATH supervise -r /etc/qmqpd \
            tcpserver -u 7791 -g 2108 -c 40 -v -R -x \
            /etc/qmqpdrules.cdb 0 qmqp /var/qmail/bin/qmail-qmqpd 2>&1 \
            | accustamp | cyclog -s 1000000 /var/log/qmqp &"

        This is how I run it at tansu.

Regards
Peter
----------
Peter Samuel                                [EMAIL PROTECTED]
Technical Consultant                        or at present:
eServ. Pty Ltd                              [EMAIL PROTECTED]
Phone: +61 2 9206 3410                      Fax: +61 2 9281 1301

"If you kill all your unhappy customers, you'll only have happy ones left"

Reply via email to