vucheckpw Catch-all Account Patch

vucheckpw is a drop-in replacement for checkpassword, a utility commonly used to authenticate users by the qmail family of programs and similar and related tools. vucheckpw implements virtual users and virtual domains. However, it lacks native support for a virtual domain catch-all account.

One may achieve similar behavior with except and conditional invocation of subsequent .qmail-default entries:

|/usr/local/qmail/bin/except ../../bin/vddeliver ./Maildir/ || exit 99
catchall-account@virtual.domain

However, this approach still generates the error "Sorry, no mailbox here by that name. (#5.1.1)" in the log and then proceeds to deliver the message to the next destination (that being the catch-all account).

This patch adds a check for a catch-all account prior to exiting with an error. If the .catchall file specifies a destination, vddeliver re-addresses the message prior to handing it off.

This patch also adds optional logging for debugging and to expose catch-all account hits.

Instructions

Unpack the vucheckpw distribution and apply the patch via:

$ patch < vddeliver.c.patch

Proceed with the installation as specified by vucheckpw instructions.

To implement a a catch-all account:

  1. Create a target user account
  2. Create a .catchall file in the virtual account directory with the user name as the only line

To enable logging, remove or disable the #undef USE_SYSLOG line in the patched vddeliver.c file before compiling vucheckpw.


ISL
Last modified: Sun Feb 23 22:37:18 CST 2003