Russell Nelson <[EMAIL PROTECTED]> writes:
>  ...  I would say that qmail-smtpd should access a
> cdb which is constructed from locals + virtualdomains + a new file
> named receivebysmtp, which has lines that start with a + if the host
> should be acceptable for receipt via SMTP, and a minus if the host
> should not be acceptable (which is another way of saying "was found in 
> locals or virtualdomains but we wish to reject").

I'd like to consider going a step further, with a single CDB that
contains the *entire* site configuration policy.  This would include
rcpthosts, localhosts, virtualdomains, users, aliases, and smtproutes.
This would be used by qmail-smtpd, to decide what to accept (both for
"I don't relay" and "Unknown user" purposes) and by qmail-send as it
routes mail.  As a bonus, a small tool could query this and allow an
admin to check how qmail is going to handle a given address.

It would presumably require progressively stripping an address until a
match came up, possibly along the lines of:

  [EMAIL PROTECTED]: accept, local ~adb
  [EMAIL PROTECTED]: accept, alias [EMAIL PROTECTED]
  @onramp.ca: reject 550 Unknown user {since no specific-user records matched}
  .example.com: accept, relay { for a customer }
  .private.onramp.ca: accept, route 10.11.12.13
  @virtual.example.com: accept, virtual ~exam
  default: norelay { unless RELAYCLIENT is set }

Hmm, it might also be nice to check MAIL FROM: against that database, and
refuse to relay for users who have set their address to a local one that
we know does not exist; that way their POP client tells them the error of
their ways immediately.  Configuration errors like that are the second
largest source of doublebounces.

-- 
Anthony DeBoer <[EMAIL PROTECTED]>

Reply via email to