G. Pape

qconfirm - Handling bounce messages

How to configure bounce handling
The qconfirm-check program conditionally sends delivery confirmation request messages to an envelope sender of a message. Most likely some of these confirmation request messages cannot be delivered and so bounce. Normally qconfirm-check uses an empty envelope sender to send confirmation request messages, so those bounces end up as double bounces in the postmaster's mailbox of your domain or the domain of the original sender. This can be annoying.

The qconfirm-return program can be used to process bounces of delivery confirmation messages. If the bounce is in QSBMF (qmail-send bounce message format), qconfirm-return is able to detect the sender address that caused the bounce, and to make sure that the bounce is not forged. Those bounces will be processed automatically, and if the original sender address bounces multiple times, a message from this sender will be dropped silently. This reduces the amount of double bounces caused by qconfirm.

If the bounce isn't in QSBMF, it should be delivered to a mailbox for further inspection. You can use a separate mailbox that you should go through once a while. Most probably most bounces will be created by your qmail MTA and so are in QSBMF.

Bounce handling currently only works with qconfirm-check running in sender mode.

Note that if you configure qconfirm for bounce handling, your confirmation requests will no more be sent with an empty envelope sender, and so no more identified as bounce message. This means it can happen that you find confirmation request messages in the separate mailbox asking you to confirm the delivery of your confirmation request message.

To avoid this you can send your messages with a VERP (variable envelope return path); simply set the following environment variables when sending mail:

and create ~/.qmail-bounce-default to receive or process the bounces.

How to configure bounce handling

Choose an address extension to use as envelope sender and to process the bounces. For example: qconfirm-check is running for the mail address <floyd@smarden.org> through the dot-qmail file ~floyd/.qmail. The qconfirm directory is ~/.qconfirm. Bounces shall be received at <floyd-qconfirm-return@smarden.org> and processed through ~floyd/.qmail-qconfirm-return. Create this dot-qmail file and the .qconfirm/return directory as user floyd now:
  $ mkdir ~/.qconfirm/return
  $ echo '|qconfirm-return .qconfirm' >~/.qmail-qconfirm-return
Create a new mailbox for bounces not in QSBMF and let those bounces be delivered there, this is the mailbox you should go through once a while:
  $ maildirmake ~/Maildir-qconfirm-return
  $ echo './Maildir-qconfirm-return/' >>~/.qmail-qconfirm-return
You need to adapt the dot-qmail filename if you use virtualdomains.

Finally change the confirmation request template to use <floyd-qconfirm-return@smarden.org> as envelope sender. To do so edit ~floyd/.qconfirm/msg/request and change the line

  Return-Path: <>
  Return-Path: <floyd-qconfirm-return@smarden.org>
Note that qconfirm-check and qconfirm-return must run as the same user and must use the same qconfirm directory.
Gerrit Pape <pape@smarden.org>
$Id: bounces.html,v 1.6 2003/07/17 12:28:50 pape Exp $