nondeterministic / mailfilter

Remotely filters out spam in POP-accounts via regular expressions
http://mailfilter.sf.net
GNU General Public License v2.0
2 stars 4 forks source link

Mails with missing or empty Subject: slip through even when other regexps would match #4

Open hhoffstaette opened 2 years ago

hhoffstaette commented 2 years ago

I've noticed that mails with a deny-matching header (e.g. the popular To: undisclosed-recipients:;) but empty or missing Subject: are not filtered and pass through. This seems like a bug. Unsurprisingly, attempts to work around this with a filter matching on Subject: have been unsuccessful, since it is not possible to match on nonexisting headers. Matching on an empty Subject - e.g. with ^Subject: $ - does not seem to work either for the same reason.

nondeterministic commented 2 years ago

I'm just trying to understand this. At first, I thought it's a bug, but it seems more of a missing feature: you can't specify that some header HAS TO exist. The existing behaviour seems not faulty, right?

hhoffstaette commented 2 years ago

IIRC the point was that a missing Subject; also seems to affect (and disable) other headers that do exist, since they are no longer matched. It's as if a mising Subject: short-circuits everything. It's probably best to only focus on the first half of the original description; the second part was only an attempt at a workaround.

nondeterministic commented 2 years ago

Ah ok, I see. I will investigate. :-)