Joel Uckelman on 25 Sep 2003 05:39:52 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[spoon-discuss] Re: Auto Remailer


Here's what I'm thinking of as a modification for the email escrow. 
Comments are welcome (that's why I'm describing it for everyone).

You feed it as many numbered addresses as you want, as so:

a1 uckelman@xxxxxxxxx
a2 dave@xxxxxxxxxxxxxxx
a3 clock@xxxxxxxxx
a4 spoon-business@xxxxxxxxx
a5 spoon-discuss@xxxxxxxxx

Then you specify a bunch of rules connecting responses from sources to 
recipients:

a1 || a2 > a4 && close a1 && close a2
a3 > a5 && close all
a1 && !a2 > a4

Explanation:

The first rule will send the contents of the escrow to a4 upon receiving 
responses from a1 or a2, and disallows further responses from them, but 
leaves the escrow open for other respondents. The second rule will send the 
contents of the escrow to a5 and close the escrow upon receiving a response 
from a3. The third rule sends the contents of the escrow to a4 if a1 has 
responded and a2 has not.

Does this seem like reasonable syntax to everyone? Can anyone think of 
anything better? missing?

What I intend to do is convert the antecedent of each rule into an SQL 
query, which if successful will trigger the actions in the consequent. 
There's no reason that you couldn't write a rule that has the escrow email 
itself to create a further escrow, e.g., or to receive promptings from a 
cron-driven script.

I don't want to accept SQL queries directly for security reasons, but 
translation should be safe. What 'a1' amounts to in SQL is something like 
'select count(*) from ask where id = $id && address = "$a1" && 
!isnull(reply)'.
I can compute the truth value of the antecedent of each rule by doing a 
query for each atom and then applying the logical operations to them. 
Shouldn't be too hard, though it makes me wonder whether there is a way to 
do it with fewer SQL queries. Hmm.

Any thoughts (or code, if you care to write up what I've described, so I 
can put it in the escrow right away :) are appreciated.

 
-- 
J.


_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss