I am thinking of replacing sendmail on our incoming mail-gw with qpsmtpd
and postfix, and already made some changes for it (patches to run
qpsmtpd from xinetd instead of tcpserver and a plugin to feed directly
into postfix' cleanup-server: I will post these as soon as they have
seen a bit of real usage).

Now I am thinking about a plugin to detect non-existant users in the
rcpt-hook. I know about check_delivery, but it doesn't look like it's
what I want. 

* There are *no* local users on the gateway. All recipient adresses 
  will be rewritten to <[EMAIL PROTECTED]>, where some.server is one
  of several servers with local mailboxes, imap, or whatever.

* Most users have E-Mail-Adresses with several local-parts in several
  domains. Usually all combinations are equivalent (e.g., for me
  <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
  <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
  <[EMAIL PROTECTED]> should all work), but exceptions might be nice
  (for example, there are two persons with the same last name at the
  WIFO and the WSR, so we might want to distinguish between
  <[EMAIL PROTECTED]> and <[EMAIL PROTECTED]> in this case, while still
  treating <[EMAIL PROTECTED]> the same for both domains.

* People know about plussed adresses, and at least some are using them
  extensively. It would be nice if the detail part is preserved.


So what I'm thinking about is something like this:

We have a list of

local-part : domain-list : mailbox : server

e.g.,

hjp         :wsr.ac.at wifo.ac.at wifo.at:hjp           :dialog.wsr.ac.at
peter.holzer:wsr.ac.at wifo.ac.at wifo.at:hjp           :dialog.wsr.ac.at
webmaster   :wsr.ac.at                   :webmaster-wsr :courier.wsr.ac.at
webmaster   :wifo.ac.at wifo.at          :webmaster-wifo:courier.wsr.ac.at

(The actual format may be different, maybe stored in a gdbm file or SQL
database)

When a rcpt is specified, e.g, <[EMAIL PROTECTED]>, it is split into 
localpart (hjp), detail (qpsmtpd) and domain (wsr.ac.at) and an entry
matching localpart and domain is looked up. If we find one (in this case
the first) the address is rewritten to <[EMAIL PROTECTED]> (which
the queue plugin will hopefully be able to deliver). If we don't find
one, we return a permanent error. 

Does anybody already have something like this, does anybody have a
better idea, or should I start coding?

        hp

-- 
   _  | Peter J. Holzer    | Humor ohne Emoticons ist trockener Humor.
|_|_) | Sysadmin WSR       | 
| |   | [EMAIL PROTECTED]         |     -- Toni Grass in aip
__/   | http://www.hjp.at/ |

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to