Can anyone point me in a direction to start creating my own custom
cleanfeed rules?
I'd like to translate what -- I think -- is a simple filter in
Thunderbird to be a cleanfeed rule to reject posts at thee server.
subject contains "blank"
subject contains "card"
subject doesn't start with "re"
from contains "@gmail.com"
I'm also okay if the "doesn't start with" is a less precise "doesn't contain".
Thank you for any pointers you can offer.
Hi,
In cleanfeed.local
Into the function local_filter_last
if ($hdr{From} =~ /\@gmail/) {
if (not $hdr{Subject} =~ /^re/i) {
if ( $hdr{Subject} =~ /card/i) {
if ( $hdr{Subject} =~ /card/i) {
return reject( 'Bad post!');
}
}
}
};
I'm sure that someone will give a two or three lines solution...
It looks like you're checking if the Subject header contains a case insensitive "card" string twice. I suspect you copy and pasted lines
and meant to change one of them to "blank". ;-)
I believe I will be able to take your good example and add it to my cleanfeed.local file.
Hi Grant,
Yes, it's a big source of bugs...
Maybe you can simplify the two copied pasted rules by this one :
if ( $hdr{Subject} =~ /blank.{0,50}card|card.{0,50}blank/i) {
Local rules work well!
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 399 |
Nodes: | 16 (0 / 16) |
Uptime: | 30:08:46 |
Calls: | 8,327 |
Calls today: | 4 |
Files: | 13,153 |
Messages: | 5,890,132 |
Posted today: | 1 |