quota check befor sieve script?

Alain Spineux aspineux at gmail.com
Tue Jan 29 09:30:07 EST 2008


On Jan 29, 2008 3:16 PM, Michael Menge
<michael.menge at zdv.uni-tuebingen.de> wrote:
> Quoting Alain Spineux <aspineux at gmail.com>:
>
> > On Jan 29, 2008 9:06 AM, Michael Menge
> > <michael.menge at zdv.uni-tuebingen.de> wrote:
> >
> >> Is there a way to only send the over quota bounces if the message hits
> >> a keep, fileinto or implicite keep action or to accept the email if it
> >> hits a forward or discarde action and to ignore the keep and fileinto
> >> actions in case of overquota?
> >
> > Sieve script need often mail header data to make its check.
> > This means the mail was already accepted by LMTP when sieve script run.
> > This means probably "no" to your question.
>
> I havent looked at the LMTP protokoll, but i think it is like the SMTP
> protokoll if I'm correct we can reject a message in the DATA stage,
> after we have recieved the message. A problem may be with messages to
> more then one user.
> The sending server don't know which user caused the "over quota".

No because lmtpd return an "accept" or "reject" address by address
something like
250 addres1 at domain.com
250 addres2 at domain.com
...

>
> On the other hand there is the option lmtp_strict_quota which means
> that lmtpd knows the size, but as far as i know from SMTP the size is
> not part of the envelope but the data.
>
> >
> > Anyway your question is not without interest,
> > but add such a feature add some problemes like what to do at
> > each retry of the  SMTP ? Run the same sieve script again and again
> > on the same
> > piece of mail until the quota let it in?
>
> On, i would only return an 4xx or 5xx error if the message was not discarded
> and not forwarded and if quota was exceeded. This would mean that
> discarded and forwarded messages would be only seen once, and messages
> that would only be stored in a folder may cause an over quota bounce.
>
> But this may cause that local copies of forwarded messages may be
> lost, as the message would only be forwarded. Same applies to
> discarded messages, but i don't
> see a reason why anyone would discard a mail in one rule and safe it
> in an other.

You must extend sieve with LMTP return code.This is to the script writer
to choose what to do when this append, and witch code to return to LMTP.

>
> The other way would be to remember all actions to be performed on a
> message and if the message will be stored (fileinto, keep) and the
> quota is exceeded then bounce and perform no action. If the message is
> not stored the message does not exceede the quota and the actions can
> be performed.

If you have forwarded the mail but were not able to deliver it, you
must remember for next LMTP retry to not forward it again !

>
>
>
> --------------------------------------------------------------------------------
> M.Menge                                 Tel.: (49) 7071/29-70316
> Universitaet Tuebingen                  Fax.: (49) 7071/29-5912
> Zentrum fuer Datenverarbeitung          mail:
> michael.menge at zdv.uni-tuebingen.de
> Waechterstrasse 76
> 72074 Tuebingen
>



-- 
Alain Spineux
aspineux gmail com
May the sources be with you


More information about the Info-cyrus mailing list