Click on OPTIONS>MAIL>FILTERS>EDIT YOUR FILTER RULES>NEW RULE
Set your filter up as desired. When complete, go back to OPTIONS>MAIL>FILTERS and select your filter options. These tell the system when to run your filters. We use #2 (when INBOX is displayed).
NOTE: SQUIRRELMAIL does not offer filtering.