# hdrctls -- a data file containing some controls based on header information. # # THIS IS A SAMPLE FILE # # Process this file with cdbgen to create the .cdb file, e.g.: # cdbgen -o newfile.cdb -s "::" hdrctls.txt # and then rename the output file to hdrctls.cdb # (A makefile comes in handy for this) # # Each line is: # # keystring::data # # The keystring is made up of the type of thing to test followed by a # colon and the actual key. The format of the actual key and of the data # depends on the type of thing. # See the blocks in this file for a description of each type. # For ease of understanding, the types are listed in the order that # they are tested. # # Per cdbgen, lines beginning with '#' are ignored, as are blank lines. # # TYPE: from-{address,localpart,domain} # This tests uses the 'from' address, testing the entire address, # the localpart of the address, and the domain part of the address # in turn. # KEY: the expected address or address part in the "From:" line. # must be lowercase. # DATA: One of several things: # /keyword -- a special action: # /keep keep (file into default folder). # /discard discard # /p{n}:xx Consider deferred action "xx" with priority 'n'. # If 'n' is less than the last remembered deferred # action's priority, remember action "xx". # At the end of hdrctls processing, if no other # (non-deferred) action has been taken, take # action "xx" instead. This allows further refinements # of decisions that might conflict since they are # processed in a particular order. # /xx any unknown /keyword is simply ignored. # # [folder] A folder name to file into. # # mfl code Anything else is mfl code that is executed. # # from-address:aiken@aikenslaughs.com::[M/entertainment] from-domain:wineloverspage.com::[M/personal] from-localpart:mem::/p1:keep # TYPE: sender-{address,localpart,domain} # This tests uses the 'sender' address, testing the entire address, # the localpart of the address, and the domain part of the address # in turn. # KEY: the expected address or address part in the "Sender:" line. # must be lowercase. # DATA: Same as for from-{} # sender-address:owner-mvmf-l@lists.mv.net::sieve { \ if not exists "Mail-Followup-To" { \ addheader "Mail-Followup-To" "mvmf-l@mvmf.org"; } \ keep; } # sender-address:owner-nanog@merit.edu::/keep sender-address:spam-l@peach.ease.lsoft.com::[M/sl] # TYPE: list-id # This tests uses the rfc2919 list-id. The list-id is parsed exactly # as if it were an address, but note that it has no '@'. # KEY: the list id. # must be lowercase. # DATA: Same as for from-{} # list-id:cisco-nsp.puck.nether.net::/keep list-id:clamav-users.lists.clamav.net::/keep list-id:lucy-kaplansky-announce.yahoogroups.com::/keep # TYPE: return-path-{address,localpart,domain} # This tests uses the 'return-path' address, testing the entire address, # the localpart of the address, and the domain part of the address # in turn. # KEY: the expected address or address part in the "Return-Path:" line. # must be lowercase. # DATA: Same as for from-{} return-path-address:gene@topachievement.com::/keep # return-path-domain:lists.isp-lists.com::/keep # TYPE: {to,cc}-{address,localpart,domain} # In this test, all of the "To" and "Cc" headers are walked, and # each address, localpart, and domain part are tried in turn # (prefixed with the headername and a hyphen). These addresses # and headers are tried in the order that they appear in the message. # KEY: The value of the part of the address being tested. # must be lowercase. # DATA: Same as for from-address # to-address:isp-tech@isp-tech.com::[M/isp-tech] cc-address:isp-tech@isp-tech.com::[M/isp-tech] to-domain:geezer.org::[M/personal] cc-domain:geezer.org::[M/personal] to-localpart:abuse::/keep to-localpart:mvmf-bug::/keep