7 "silent"=>["=btw" ,"did","syslog"],
8 "log" =>["=silent","syslog"],
9 "bell" =>["=log" ,"bell"],
10 "sms" =>["=bell" ,"sms=1"],
11 "crit" =>["=sms" ,"sms=3"],
14 { "SqueezeControl"=>"noconv" },
15 { "SqueezeControl"=>"conv" ,"SQZ_OPTIMIZE_LEVEL"=>0 },
16 { "SqueezeControl"=>"conv" ,"SQZ_OPTIMIZE_LEVEL"=>1 },
17 { "SqueezeControl"=>"med" ,"SQZ_OPTIMIZE_LEVEL"=>0 },
18 { "SqueezeControl"=>"med" ,"SQZ_OPTIMIZE_LEVEL"=>1 },
19 { "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>0 },
20 { "SqueezeControl"=>"max" ,"SQZ_OPTIMIZE_LEVEL"=>1 },
26 # TODO: <short-m@> storage?
28 # never spawn new mail if FROM_MAILER
29 # $isFROM_MAILER postponed after maillists as they may look as FROM_MAILER
31 my $isFROM_MAILER=$Audit->header()=~/$procmailFROM_MAILER/mio;
32 $store_ignorenewmail=(0
34 || headerhas "From",'<Regexp:^owner->'
39 local $store_profile="silent";
41 store "=spam-rbl" .";$_" if $_=$Audit->rblcheck();
42 store "=spam-razor".($_ eq 1 ? "" : ";$_") if $_=razor2();
43 # I don't send viruses but viruses propagate mails of mine
44 store "=spam-av" if headeris "X-Mailer",'ravmd/8.3.2';
50 local $store_profile="silent";
51 store "=spamo-k332" if grep /^\Qshort\@k332.feld.cvut.cz\E/i,Received_for();
52 # TODO: foreign violation of RFC 822 section 4.4.4, Subject:.*Automatick.+odpov.+v.+nep.+tomnosti
53 store "=spamo" if headeris "From",'<ghandchi@hotmail.com>';
54 store "=spamo" if headeris "From",'<newsletter@levnapc.cz>';
55 store "=spamo" if headeris "From",'<Tomas@dtpstudio.cz>';
57 # weak detection: files with text/html w/o text/plain are usually a spam
58 my @types_linear=map({ mime_type($_); } parts_linear());
59 store "=spamo-html" if grep({ $_ eq "text/html"; } @types_linear) && !grep({ $_ eq "text/plain"; } @types_linear);
61 store "=spamo-big5" if ($_=mimehead(body_first())->mime_attr("Content-Type.charset")) && /^big5/i;
65 store "=err","bell" and return if headerhas \&Received_for,'<short+err@>';
67 # ppl-wished foreign remapping, Reply-To is left untouched!
69 'kerere@post.cz' =>'kamzik@k332.feld.cvut.cz',
70 'profes@mbox.vol.cz' =>'kratochvilova@egp.cz',
71 'jkrouzek@mbox.vol.cz' =>'krouzek@mbox.fsv.cuni.cz',
72 'jakub.gorner@lidovky.cz' =>'tonda@disnet.cz',
73 'jan.kolar@videoprogress.cz'=>'jenda.kolar@volny.cz',
74 'daniel.rulicek@cponline.cz'=>'daniel.rulicek@cpress.cz',
75 'pavel@suse.cz' =>'pavel@ucw.cz',
78 # My obsolete e-mail addresses
79 store_muttrc_alternates "=redirect-","btw";
81 # nasty public lists with $store_ignore
83 local $store_profile="bell";
85 $store_ignore="smsmail" if 1==$Audit->body() && length(join "",$Audit->body())<180; # SMS mail
86 $store_ignore="sms OS" if $Audit->subject()=~/^Email pro: /; # "^Email pro: gsm@sh\.cvut\.cz$";
87 $store_ignore="list-moron" if grep { headeris "From",$_; } qw(
93 <satko@quanto.nr.sanet.sk>
94 <vithous@attorney.cz> <viroman@attorney.cz>
98 store "=gsm" if headeris "Sender" ,'<owner-gsm@sh.cvut.cz>';
99 store "=gsmpand" if headeris "List-Post",'<gsm@pandora.cz>';
103 store "=mozillabug","log" if headeris "From" ,'<bugzilla-daemon@mozilla.org>';
104 store "=9kc","bell" if headeris "List-Post",'<n9k@pandora.cz>';
105 store "=9kcd","bell" if headeris "List-Post",'<dev9k@pandora.cz>';
106 store "=9ku","log" if headeris "List-Id" ,'<9000.listman.net>';
107 store "=9kd","log" if headeris "Sender" ,'<owner-9000-developers@geekstuff.co.uk>';
108 store "=spong","log" if headeris "List-Id" ,'<spong-users.lists.sourceforge.net>';
109 store "=gtkd","log" if headeris "List-Id" ,'<gtk-devel-list.gnome.org>';
110 store "=mffstatnice","bell" if headeris "List-Post",'<statnice@atrey.karlin.mff.cuni.cz>';
111 store "=hw","log" if headeris "List-Post",'<hw-news@list.gin.cz>';
112 store "=gnokii","bell" if headeris "List-Id" ,'<gnokii-users.mail.freesoftware.fsf.org>';
113 store "=winelic","log" if headeris "List-Id" ,'<wine-license.winehq.com>';
114 store "=wined","log" if headeris "List-Id" ,'<wine-devel.winehq.com>';
115 store "=winepat","log" if headeris "List-Id" ,'<wine-patches.winehq.com>';
116 store "=winecvs","silent" if headeris "List-Id" ,'<wine-cvs.winehq.com>';
117 store "=ros","log" if headeris "List-Post",'<ros-general@reactos.com>';
118 store "=roskernel","bell" if headeris "List-Post",'<ros-kernel@reactos.com>';
119 store "=roscvs","silent" if headeris "List-Post",'<ros-cvs@reactos.com>';
120 store "=fsd","log" if headeris "X-Mailing-List",'<linux-fsdevel@vger.kernel.org>';
121 store "=surprise","sms" if headeris "List-Post",'<surprise@atrey.karlin.mff.cuni.cz>';
122 store "=surprisesuse","sms" if headeris "Sender" ,'<owner-surprise@suse.cz>';
123 store "=tacacs","log" if headeris "Sender" ,'<tacplus-l@disaster.com>';
124 store "=pm","sms" if headeris "Sender" ,'<owner-prague-pm@pm.org>';
125 store "=radary","sms" if headeris "Reply-To" ,'<pha@radary.cz>';
126 store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>';
127 store "=linux-input","log" if headeris "List-Post",'<linux-input@atrey.karlin.mff.cuni.cz>';
128 store "=strom","bell" if headeris "List-Post",'<vodni-strom@atrey.karlin.mff.cuni.cz>';
129 store "=netinfo","log" if headeris "Sender" ,'<owner-netinfo-l@vol.cz>';
130 store "=saintmj","log" if headeris "From" ,'<netsaint@kam-enterprise.ms.mff.cuni.cz>';
131 store "=saintmj","log" if headeris "From" ,'<netsaint@kam.mff.cuni.cz>';
132 store "=4cerr","bell" if headeris "From" ,'<owner-4cinfo@atrey.karlin.mff.cuni.cz>';
133 store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>';
134 store "=slashdot","bell" if headeris "From" ,'<slashdot@slashdot.org>';
135 store "=freshmeat","bell" if headeris "From" ,'<noreply@freshmeat.net>';
136 store "=gsmperlcvs","silent" if headeris("From" ,'<johan@intra.tektonica.com>')
137 && $Audit->subject()=~/^'.*' has been updated!$/;
139 store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/;
141 # Petr Koutecky does not mark his Stuff
142 store "=koutecky","bell" if headeris "From" ,'<velkyhroch@seznam.cz>';
144 store "=errm","bell" if $isFROM_MAILER && !did();
146 store "==","sms" if !did;
153 my $from=(@{$args{"from"}} ? join(",",map({
156 } @{$args{"from"}})) : "?");
157 local $_=$args{"body"};
159 # max. 9 lines of .sig
160 s/\n-- (?:\n[^\n]*){0,9}$//gs;
161 # "Original Message"/"Puvodni zprava" etc. up to empty line
162 s/(^|\n)[\s^\n]*-----[\w\s]*-----[\s^\n]*(?:\n[^\n]+)*\n{2,}(?:\s*[^>\s].*$)?/\n/gs;
163 # Remove "..." lines (is it used by anyone except me?)
166 s/^\s*[>][>\s]*.*$/*/gm;
167 s/(?:^|\n)(?:\*\n+)+/\n*\n/gs;
169 s/^On.*\b(?:wrote|writes):\s*$//gm;
171 return [$from,"(".$args{"subject"}.")".$_];