Talk:Message Filters

"To" line matching requires wildcard for partial matching?
From the article at the time of writing:
 * From -- Looks in the From line of the email, checking for who sent the email. It looks everywhere in the From line, and can match part or all of the From line.
 * Example: match "bob" in "From: bob@work.com"
 * Example: match "Jones" in "From: Bob Jones "
 * To -- Looks in the To line of the email, checking for who the email was sent to. It looks everywhere in the To line, and can match part or all of the To line.
 * Tip: Combine this rule with using '+' for slightly customized email addresses for easy sorting of emails from websites. Give Amazon your email address as you+amazon@yourdomain.com and then you can easily filter those emails.
 * Example: match "books" in "To: me+books@mywebsite.com"

However, when I tried this rule:
 * "To" "does not contain" "@lists.domain.com"
 * Forward it to email address.

The rule did not match this To line:
 * "To: mailinglist@lists.example.com"

So the email ended up being forwarded when I did not want it to be forwarded.

This rule:
 * "To" "does not contain" "*@lists.domain.com"
 * Forward it to email address.

Does match the To line, so the email does not get forwarded.

The wiki documentation does not mention anything about needing wildcards for the From or the To, so this was a bit confusing. Has anyone else experienced this or work with the From or To filters?

--RytoEX (talk) 00:21, 31 May 2013 (PDT)


 * The examples shown of the procmail patterns generated from the filters do show a significant difference between the From and To checks:
 * // match bananas in the From
 * ^from:.*bananas
 * // match bananas in the To
 * ^TObananas
 * Your testing confirms that the To check does not automatically use any wildcard and defaults to matching from the beginning of the line. I've updated the page to reflect this. --edow (talk) 15:24, 31 May 2013 (PDT)


 * Oddly, the rules I'm using use only the asterisk (*) and not the dot+asterisk combination (.*). Perhaps the DH Panel interprets an asterisk at the beginning of a line as having an implied dot (.) preceding the asterisk?  I'm not sure how else to explain how it's working.
 * --RytoEX (talk) 22:21, 12 June 2013 (PDT)