# Procmail control file for ~cls/.qmail-votedemo # The lockfile causes multiple procmails (if any) # to run one at a time. LOCKFILE = /v/pk/etc/votedemo/lockfile12 # This procmail is running in cls' home directory. # I want to see the messages, for troubleshooting. # The 'c' flag says to keep going after doing this. :0 c ! cls@truffula.sj.ca.us # Discard votes with wrong password :0 B *!^pw12: hedgehog /dev/null # In other words, check the message BODY (:0 B) for correct password line # and, if no match (*!), deliver to the trash. # By default, Procmail only inspects HEADERS. # If we got this far, the password is ok so record the vote. # The file is in my home directory, so the Web server can't see it. :0 c | egrep '^(elvisdead|Yername|emaddr|pw12|pwvoting)' >> votefile # That is, append those lines from the message onto the file. # Make a public record, omitting the private info :0 | egrep '^(elvisdead|Yername)' >> /v/pk/etc/votedemo/votefile # The public file can be inspected directly by the Web server # or through a server side include in some page.