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:
QMAILINJECT=r QMAILSUSER=${USER}-bounceand create ~/.qmail-bounce-default to receive or process the bounces.
$ mkdir ~/.qconfirm/return $ echo '|qconfirm-return .qconfirm' >~/.qmail-qconfirm-returnCreate 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-returnYou 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: <>to
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.