Procmail is a mail filtering program which is quite powerful for processing emails. While it cannot be used for filtering your incoming mail here (see Websieve for that), it can be used in conjunction with Fetchmail, for example, to process messages in other ways.