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