1 Conditional Automated Request Shuffler
2 Initial Design. <jesse@fsck.com> 9 Nov 99
4 #Try to find out what queue the incoming ticket is in
5 #Try to find out the default action for this invocation
6 #Read the ticket from STDIN
8 #Obtain the serial # if we have one
9 #If the ticket has a ticket-id
10 #if this is a 'comment'
11 #add the current mime objects as a 'comment'
13 #if this is 'correspondence'
14 #add the current mime object as 'correspondence'
17 #if this ticket does not yet have a ticket id
22 #In the distant future
24 #load the regexp table matching this queue
25 #check the message agains the regexp table, ordered by precedence
27 #get the ruleset for that regexp from the actions table
28 #evaluate the ruleset in order of precedence.
29 #if we get an 'exit' stop proccesing ALL rulesets
30 wpw #if we get a 'forward,' forward it to 'value'.
32 #if we get a 'create,' create a request in 'value'
33 #elseif we get a 'map', add this as additional correspondence on ticket 'value'
36 #if we get an 'associate', associate the ticket number returned from the
37 'create' or 'map' with the master ticket from 'value'
40 #load the reply template with id 'value'
41 #replace strings in the template
48 ID int AUTO_INCREMENT,
52 MatchField varchar(20), #Can be a headername or 'any' all header names
56 CREATE TABLE Actions {
58 Action varchar(20), # Create, Forward, Squelch, Owner, Area, Associate
59 Value varchar(20), #queue or email address
63 CREATE TABLE Autoreplies {
64 ID int AUTO_INCREMENT,