Andrzej Adam Filip a écrit : > Timo Sirainen <t...@iki.fi> wrote: > >> On Jan 17, 2009, at 2:36 PM, Gary V wrote: >> >>> Then a bounce is created stating the mail was rejected: >>> >>> Your message to <t...@example.com> was automatically rejected: >>> Quota exceeded (mailbox for user is full). >>> >>> Question: is it possible (without changing code) to alter this to >>> where deliver would instead tempfail or something. Somehow it seems >>> wrong to me to tell the MTA that everything is good, and then silently >>> discard messages - regardless of the fact dovecot creates a bounce. >>> This is not necessarily ideal either, but I _am_ wondering if this is >>> configurable or not. >> a) deliver -e >> >> b) quota_full_tempfail=yes >> >> c) a+b > > Are there any plans to allow MTA check recipient over quota status? > > Sendmail support simple "socket map" protocol that can be used for > such queries. > > It should allow to reject (not all) messages > a) in replies to "RCPT TO:" > for messages with right message size passed in "MAIL FROM:" > b) in replies to "the final dot" for single recipient messages. > > P.S. > Cyrus IMAP supports "socket map" :-) >
This is a difficult problem: - with aliases and virtual aliases, you don't know which quota to check unless you expand aliases during the smtp transaction. - since many messages may be received at small intervals, and delivery is not atomic (mail may be passed to a spam filter, ... etc). dealing with this is not easy in the general case. That said, a solution that "mostly works" may be good enough.