The qmail FAQ gives this command:
In /.qmail add the line
| preline procmail
On my system this works iff when using vi to generate the .qmail file, I included an empty line after the command.
I recompiled the procmail package with my defaults. I added a link from my /usr/local/bin/procmail to /bin/procmail, because I was not sure that the command could find procmail in /usr/local/bin.
Procmail is an excellently documented program. Read the man pages for examples on how to set up your .procmailrc file.