Subject: some thoughts

From: Dilyan Palauzov <[email-masked]>
Date: Mon, 05 Feb 2007 17:40:52 +0100

Hi folks,

   I was thinking on implementing a sieve-milter, an addon for  
sendmail, that filters mails for users, which do not necessary have  
mailbox on that server. In such cases the filter is applied to the  
whole envelope with its contents (except where the message is  
modified, in which case a new message shall be generated). And on some  
points I continue to think how to implement them.
  - test size
How shall the implementation determine the size of the message: if the  
smtp server supports rfc 1870 (esmtp, size), can the sieve  
implementation use that value (MAIL FROM: [email-masked] size=10000 ,  
or shall count by itself the bytes contained?

  - envelopes
If a mail goes to several recepients, but in one envelope, test  
address and test envelope can figure it out, but then the rfc3028  
permits that one user removes the other from the envelope. E.g. if a  
mail goes
To: [email-masked], [email-masked]

the [email-masked]. might have the follwoing script

if envelope :all is "to" [email-masked] discard;

then the mail might not be delivered to [email-masked] . Is there any sentence,  
I have overseen, prohibiting that the different users' scripts may not  
interfere?
   Greetings,
     Дилян

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Mon, 5 Feb 2007 19:06:56 +0100

Dilyan Palauzov writes:
>   modified, in which case a new message shall be generated). And on 
>   some  points I continue to think how to implement them.
>  - test size

I was pondering this (about postfix, not sendmail, in order to do 
protocol-level reject) and thought I'd use SIZE=x until the counted 
size is available, and after that use the counted size.

>  I have overseen, prohibiting that the different users' scripts may 
> not  interfere?

I eventually decided that [email-masked] should not be able to tell whether the 
envelope contains [email-masked]. If [email-masked] is a bcc, revealing it in sieve would 
be a privacy leak.

>     Дилян

(I can read all of that. I feel proud.)

Arnt

---

From: Alexey Melnikov <[email-masked]>
Date: Mon, 05 Feb 2007 18:56:12 +0000

Arnt Gulbrandsen wrote:

>> then the mail might not be delivered to [email-masked] . Is there any 
>> sentence,  I have overseen, prohibiting that the different users' 
>> scripts may not  interfere?
>
> envelope contains [email-masked]. If [email-masked] is a bcc, revealing it in sieve 
> would be a privacy leak.

Indeed. As far as Sieve is concerned, each envelope always contains a 
single recipient.

---

From: Alexey Melnikov <[email-masked]>
Date: Mon, 05 Feb 2007 18:56:10 +0000

Dilyan Palauzov wrote:

> How shall the implementation determine the size of the message: if 
> the  smtp server supports rfc 1870 (esmtp, size), can the sieve  

Hi Dilyan,
SMTP SIZE is an approximation of the size, so ideally you should count 
bytes.

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Mon, 5 Feb 2007 20:05:35 +0100

> Indeed. As far as Sieve is concerned, each envelope always contains a 

I would not protest strongly if an implementation were to include 
aliases leading to the recipient.

Arnt