[imp] IMP 3.1 filter rules conversiom code yields spurius blacklist entry

Steve Lidie sol0 at Lehigh.EDU
Thu Jan 6 10:17:51 PST 2005


Given this IMP-scoped key "filters":

imp        filters               
a:5:{i:0;a:3:{s:6:"fields";a:1:{i:0;s:4:"from";}s:4:"text";s: 
10:"sky389.com";s:6:"action";s:6:"delete";}i:1;a:3:{s:6:"fields";a:1: 
{i:0;s:4:"from";}s:4:"text";s:11:"para3ds.com";s:6:"action";s: 
6:"delete";}i:2;a:3:{s:6:"fields";a:1:{i:0;s:4:"from";}s:4:"text";s: 
29:"dollar-savers-lpex at sky389.com";s:6:"action";s:6:"delete";}i:3;a:3: 
{s:6:"fields";a:1:{i:0;s:4:"from";}s:4:"text";s:26:"coolvalues at cool- 
values.com";s:6:"action";s:6:"delete";}i:4;a:4:{s:6:"fields";a:1:{i:0; 
s:7:"subject";}s:4:"text";s:41:"Returned mail: see transcript for  
details";s:6:"action";s:4:"move";s:6:"folder";s:10:"mail/ junk";}}

The INGO PHP program convert_imp_filters.php properly creates the new  
INGO-scoped key "rules":

ingo       rules                 
a:5:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:1;a:3:{s: 
4:"name";s:8:"Vacation";s:6:"action";i:8;s:7:"disable";b:1;}i:2;a:2:{s: 
4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:3;a:2:{s:4:"name";s: 
7:"Forward";s:6:"action";i:10;}i:4;a:8:{s:4:"name";s:27:"Converted IMP  
Filter -  
MOVE";s:7:"combine";i:2;s:10:"conditions";a:1:{i:0;a:5:{s:5:"field";s: 
7:"Subject";s:5:"match";s:8:"contains";s:5:"value";s:41:"Returned mail:  
see transcript for  
details";s:4:"case";b:0;s:4:"type";i:1;}}s:6:"action";i:2;s:12:"action- 
value";s:10:"mail/  
junk";s:4:"stop";b:0;s:5:"flags";i:0;s:7:"disable";b:0;}}

The problem is that it also makes this blacklist entry:

ingo       blacklist             
a:2:{s:1:"a";a:4:{i:0;s:1:"c";i:1;s:1:"d";i:2;s:1:"p";i:3;s:1:"s";}s: 
1:"f";s:0:"";}

When the user clicked on Mail her entire mailbox was deleted, because  
of the entries "a", "c", "d", "p" and "s"!



More information about the imp mailing list