quota check befor sieve script?

Michael Menge michael.menge at zdv.uni-tuebingen.de
Tue Jan 29 09:16:30 EST 2008


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".

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.

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.


--------------------------------------------------------------------------------
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5339 bytes
Desc: S/MIME krytographische Unterschrift
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20080129/20704940/attachment.bin 


More information about the Info-cyrus mailing list