"log" =>["=silent","syslog"],
"bell" =>["=log" ,"bell"],
"sms" =>["=bell" ,"sms=1"],
"log" =>["=silent","syslog"],
"bell" =>["=log" ,"bell"],
"sms" =>["=bell" ,"sms=1"],
{ "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>0 },
{ "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>1 },
);
{ "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>0 },
{ "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>1 },
);
+ @alternates_host=(
+ "jabberwock.ucw.cz", # short@ucw.cz
+ "atrey.karlin.mff.cuni.cz", # short@atrey.karlin.mff.cuni.cz
+ "k332.feld.cvut.cz", # k332.feld.cvut.cz
+ );
- store "=spam-rbl" .";$_" if $_=$Audit->rblcheck();
- store "=spam-razor".($_ eq 1 ? "" : ";$_") if $_=razor2();
+ store "=spam-abuse" .";$_","log" if $_=dnsbl '.blackholes.mail-abuse.org.' ,1; # all hosts
+ # we don't check all hosts as they can be "dialup" category, FIXME: check for it
+ store "=spam-five" .";$_","log" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first
+ store "=spam-razor".($_ eq 1 ? "" : ";$_") if $_=razor2();
store "=gtkd","log" if headeris "List-Id" ,'<gtk-devel-list.gnome.org>';
store "=mffstatnice","bell" if headeris "List-Post",'<statnice@atrey.karlin.mff.cuni.cz>';
store "=hw","log" if headeris "List-Post",'<hw-news@list.gin.cz>';
store "=gtkd","log" if headeris "List-Id" ,'<gtk-devel-list.gnome.org>';
store "=mffstatnice","bell" if headeris "List-Post",'<statnice@atrey.karlin.mff.cuni.cz>';
store "=hw","log" if headeris "List-Post",'<hw-news@list.gin.cz>';
store "=winelic","log" if headeris "List-Id" ,'<wine-license.winehq.com>';
store "=wined","log" if headeris "List-Id" ,'<wine-devel.winehq.com>';
store "=winelic","log" if headeris "List-Id" ,'<wine-license.winehq.com>';
store "=wined","log" if headeris "List-Id" ,'<wine-devel.winehq.com>';
store "=roscvs","silent" if headeris "List-Post",'<ros-cvs@reactos.com>';
store "=fsd","log" if headeris "X-Mailing-List",'<linux-fsdevel@vger.kernel.org>';
store "=surprise","sms" if headeris "List-Post",'<surprise@atrey.karlin.mff.cuni.cz>';
store "=surprisesuse","sms" if headeris "Sender" ,'<owner-surprise@suse.cz>';
store "=tacacs","log" if headeris "Sender" ,'<tacplus-l@disaster.com>';
store "=roscvs","silent" if headeris "List-Post",'<ros-cvs@reactos.com>';
store "=fsd","log" if headeris "X-Mailing-List",'<linux-fsdevel@vger.kernel.org>';
store "=surprise","sms" if headeris "List-Post",'<surprise@atrey.karlin.mff.cuni.cz>';
store "=surprisesuse","sms" if headeris "Sender" ,'<owner-surprise@suse.cz>';
store "=tacacs","log" if headeris "Sender" ,'<tacplus-l@disaster.com>';
store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>';
store "=linux-input","log" if headeris "List-Post",'<linux-input@atrey.karlin.mff.cuni.cz>';
store "=strom","bell" if headeris "List-Post",'<vodni-strom@atrey.karlin.mff.cuni.cz>';
store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>';
store "=linux-input","log" if headeris "List-Post",'<linux-input@atrey.karlin.mff.cuni.cz>';
store "=strom","bell" if headeris "List-Post",'<vodni-strom@atrey.karlin.mff.cuni.cz>';
store "=4cerr","bell" if headeris "From" ,'<owner-4cinfo@atrey.karlin.mff.cuni.cz>';
store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>';
store "=slashdot","bell" if headeris "From" ,'<slashdot@slashdot.org>';
store "=4cerr","bell" if headeris "From" ,'<owner-4cinfo@atrey.karlin.mff.cuni.cz>';
store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>';
store "=slashdot","bell" if headeris "From" ,'<slashdot@slashdot.org>';
store "=gsmperlcvs","silent" if headeris("From" ,'<johan@intra.tektonica.com>')
&& $Audit->subject()=~/^'.*' has been updated!$/;
# own webs
store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/;
# Petr Koutecky does not mark his Stuff
store "=gsmperlcvs","silent" if headeris("From" ,'<johan@intra.tektonica.com>')
&& $Audit->subject()=~/^'.*' has been updated!$/;
# own webs
store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/;
# Petr Koutecky does not mark his Stuff
store "=errm","bell" if $isFROM_MAILER && !did();
store "==","sms" if !did;
}
store "=errm","bell" if $isFROM_MAILER && !did();
store "==","sms" if !did;
}
+sub audit_sms_address
+{
+my($obj)=@_;
+
+ my $address=$obj->address();
+ if (my $alternates=muttrc_get("alternates")) {
+ return "I" if $address=~/$alternates/si;
+ }
+ my %aliases=muttrc_aliases();
+ if (my $alias=$aliases{lc $address}) {
+ local $_=$alias;
+ s/\.cz$//i;
+ return $_;
+ }
+ local $_=$address;
+ s/\b(Bus)siness$/$1/i;
+ s/\.ident$//i;
+ return $_;
+}
+
- my $from=(@{$args{"from"}} ? join(",",map({
- s/\.cz$//i;
- $_;
- } @{$args{"from"}})) : "?");
- local $_=$args{"body"};
-
+ my $from=(@{$args{"from"}} ? join(",",map({ audit_sms_address($_); } @{$args{"from"}})) : "?");
+ local $_;
+
+ $_=$args{"subject"};
+ # headers
+ s/(?:Re|Aw|Odp|Fw|Fwd|OT)(?:\[\d+\])?://ig;
+ # former subject
+ s/\bbylo:.*$//i;
+ s/\[\s*WAS:.*\]\s*$//i;
+ # trim
+ s/^\s*//s;
+ s/\s*$//s;
+ my $subject=$_;
+
+ $_=$args{"body"};
# max. 9 lines of .sig
s/\n-- (?:\n[^\n]*){0,9}$//gs;
# "Original Message"/"Puvodni zprava" etc. up to empty line
# max. 9 lines of .sig
s/\n-- (?:\n[^\n]*){0,9}$//gs;
# "Original Message"/"Puvodni zprava" etc. up to empty line