addrcheck: Optionally invoke userv service to decide address validity.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 6 Feb 2006 19:40:05 +0000 (19:40 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 14 Feb 2006 03:08:02 +0000 (03:08 +0000)
commit0a045fc157596a9521a5acff73297cc4a7c6c688
tree6705fc19ef1280fafba50bf546f57c34ae709219
parent7651970eea68ae68f696c4f965d8d533d57ae254
addrcheck: Optionally invoke userv service to decide address validity.

It may be that the existence of a mailbox can be best determined
programmatically, rather than by the existence of a .qmail-BLAH file for
it.  For example, imagine a remailer which uses encrypted email
addresses: it'd be better to check the authentication on an address than
to have a .qmail file for each one.

If a user's .qmail-FOO-default file has a first line of the form
`#?ANYTHING then that user's userv service `addrcheck:USER-FOO-default'
is invoked, with these arguments:

  * the remainder of the destination email address (including the domain
    part);

  * the envelope sender (which may be useful);

  * the entire destination email address; and

  * the key `USER-FOO-default' which the address matched.

The service should output a `+' or `-' sign to indicate acceptance or
rejection.  Failure to do this, or exiting with a nonzero status, causes
a temporary error to be reported to the SMTP client.
addrcheck.c
addrcheck.h
qmail-smtpd.c
qmail-valid-addresses