Viktor Dukhovni:
> On Fri, Feb 05, 2021 at 02:58:09PM -0500, Wietse Venema wrote:
>
> > For quota control, it is necessary to know EXACTLY what local user(s)
> > will receive the email. That means EXACTLY processing canonical_maps,
> > virtual_alias_maps, alias_maps and $HOME/.forward.
> >
> > So how would you propose for SMTPD to figure that out? I mentioned
> > the idea of maintaining a cache with RCPT TO -> mailbox mappings.
>
> If recipient address rewriting is on input (virtual alias maps rather
> than on output (as with local(8) .forward, or local aliases(5)), then
> one way is perhaps with recipient_address_verification probes and a
> transport table that routes over-quota recipients to a an "error"
> transport.
>
> The list of over-quota users can be updated once an hour or similar
> frequency.
reject_unverified_recipient is an interesting idea. It provides the
routing and cachingm, and is designed to be exact.
With reject_unverified_recipient, it would be possible to detect
an over-quota recipient just by an LMTP server's response
to the RCPT TO command.
The local(8) and virtual(8) delivery agents would need to do a size
check before they report that email is deliverable. Not difficult.
Wietse