7 "silent"=>["=btw" ,"did"],
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 },
23 "jabberwock.ucw.cz", # short@ucw.cz
24 "atrey.karlin.mff.cuni.cz", # short@atrey.karlin.mff.cuni.cz
25 "k332.feld.cvut.cz", # short@k332.feld.cvut.cz
28 "195.250.128.83", # smtp3.vol.cz; vol.cz.multistage.blackholes.five-ten-sg.com.
29 "64.49.222.22", # mail.pm.org: rackspace.com.spam-support.blackholes.five-ten-sg.com.
30 "208.147.243.5", # gambit.liquidcomm.net: cw.net.spam-support.blackholes.five-ten-sg.com.
31 "213.235.135.70", # smtp.tiscali.cz: tiscali.cz.multistage.blackholes.five-ten-sg.com.
37 # TODO: <short-m@> storage?
39 # never spawn new mail if FROM_MAILER
40 # $isFROM_MAILER postponed after maillists as they may look as FROM_MAILER
42 my $isFROM_MAILER=$Audit->header()=~/$procmailFROM_MAILER/mio;
43 $store_ignorenewmail=(0
45 || headerhas "From",'<Regexp:^owner->'
51 local $store_profile="silent";
52 store "=spamo-k332" if grep /^\Qshort\@k332.feld.cvut.cz\E/i,Received_for();
53 # TODO: foreign violation of RFC 822 section 4.4.4, Subject:.*Automatick.+odpov.+v.+nep.+tomnosti
54 store "=spamo" if headeris "From",'<ghandchi@hotmail.com>';
55 store "=spamo" if headeris "From",'<newsletter@levnapc.cz>';
56 store "=spamo" if headeris "From",'<Tomas@dtpstudio.cz>';
57 store "=spamo" if headeris "From",'<BNcom@email.bn.com>';
58 store "=spamo" if headeris "From",'<e4luck@lists.opt4email.com>';
59 store "=spamo" if headeris "From",'<mailcontests@lists.servitall.com>';
60 store "=spamo" if headeris "From",'<canda@lica.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;
71 local $store_profile="silent";
73 store "=spam-razor".($_ eq 1 ? "" : ";$_") if $_=razor2();
76 local $store_profile="silent";
78 store "=spam-orbs" .";$_","log" if $_=dnsbl '.relays.ordb.org.' ,1; # all hosts
79 store "=spam-abuse" .";$_","log" if $_=dnsbl '.blackholes.mail-abuse.org.' ,1; # all hosts
80 # we don't check all hosts as they can be "dialup" category, FIXME: check for it
81 store "=spam-five" .";$_","log" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first
82 # I don't send viruses but viruses propagate mails of mine
83 store "=spam-av" if headeris "X-Mailer",'ravmd/8.3.2';
87 store "=err","bell" and return if headerhas \&Received_for,'<short+err@>';
89 # ppl-wished foreign remapping, Reply-To is left untouched!
90 # FIXME: modifications are now being dropped by &write_message!
92 'kerere@post.cz' =>'kamzik@k332.feld.cvut.cz',
93 'profes@mbox.vol.cz' =>'kratochvilova@egp.cz',
94 'jkrouzek@mbox.vol.cz' =>'krouzek@mbox.fsv.cuni.cz',
95 'jakub.gorner@lidovky.cz' =>'tonda@disnet.cz',
96 'jan.kolar@videoprogress.cz' =>'jenda.kolar@volny.cz',
97 'daniel.rulicek@cponline.cz' =>'daniel.rulicek@cpress.cz',
98 'pavel@suse.cz' =>'pavel@ucw.cz',
102 # My obsolete e-mail addresses
103 store_muttrc_alternates "=redirect-","btw";
105 # nasty public lists with $store_ignore
107 local $store_profile="log";
109 $store_ignore="smsmail" if 1==$Audit->body() && length(join "",$Audit->body())<180; # SMS mail
110 $store_ignore="sms OS" if $Audit->subject()=~/^Email pro: /; # "^Email pro: gsm@sh\.cvut\.cz$";
111 $store_ignore="list-moron" if grep { headeris "From",$_; } qw(
117 <satko@quanto.nr.sanet.sk>
118 <vithous@attorney.cz> <viroman@attorney.cz>
123 store "=gsm" if headeris "Sender" ,'<owner-gsm@sh.cvut.cz>';
124 store "=gsmpand" if headeris "List-Post",'<gsm@pandora.cz>';
128 store "=mozillabug","log" if headeris "From" ,'<bugzilla-daemon@mozilla.org>';
129 store "=9kc","log" if headeris "List-Post",'<n9k@pandora.cz>';
130 store "=9kcd","log" if headeris "List-Post",'<dev9k@pandora.cz>';
131 store "=9ku","log" if headeris "List-Id" ,'<9000.listman.net>';
132 store "=9kd","log" if headeris "Sender" ,'<owner-9000-developers@geekstuff.co.uk>';
133 store "=spong","log" if headeris "List-Id" ,'<spong-users.lists.sourceforge.net>';
134 store "=gtkd","silent" if headeris "List-Id" ,'<gtk-devel-list.gnome.org>';
135 store "=gnomevfs","log" if headeris "List-Id" ,'<gnome-vfs-list.gnome.org>';
136 store "=mffstatnice","bell" if headeris "List-Post",'<statnice@atrey.karlin.mff.cuni.cz>';
137 store "=hw","log" if headeris "List-Post",'<hw-news@list.gin.cz>';
138 store "=gnokii","log" if headeris "List-Id" ,'<gnokii-users.mail.freesoftware.fsf.org>';
139 store "=winelic","log" if headeris "List-Id" ,'<wine-license.winehq.com>';
140 store "=wined","silent" if headeris "List-Id" ,'<wine-devel.winehq.com>';
141 store "=winepat","silent" if headeris "List-Id" ,'<wine-patches.winehq.com>';
142 store "=winecvs","silent" if headeris "List-Id" ,'<wine-cvs.winehq.com>';
143 store "=wineann","log" if headeris "List-Id" ,'<wine-announce.winehq.com>';
144 store "=ros","log" if headeris "List-Post",'<ros-general@reactos.com>';
145 store "=roskernel","log" if headeris "List-Post",'<ros-kernel@reactos.com>';
146 store "=roscvs","silent" if headeris "List-Post",'<ros-cvs@reactos.com>';
147 store "=rosbug","log" if headeris "Reply-To" ,'<scarab@reactos.wox.org>';
148 store "=fsd","log" if headeris "X-Mailing-List",'<linux-fsdevel@vger.kernel.org>';
149 store "=surprise","sms" if headeris "List-Post",'<surprise@atrey.karlin.mff.cuni.cz>';
150 store "=surprisesuse","sms" if headeris "Sender" ,'<owner-surprise@suse.cz>';
151 store "=tacacs","log" if headeris "Sender" ,'<tacplus-l@disaster.com>';
152 store "=tacacsd","log" if headerhas \&Received_for,'devel@tacplus.org'; # TODO: fix when real list
153 store "=pm","sms" if headeris "Sender" ,'<owner-prague-pm@pm.org>';
154 store "=radary","log" if headeris "Reply-To" ,'<pha@radary.cz>';
155 store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>';
156 store "=linux-input","log" if headeris "List-Post",'<linux-input@atrey.karlin.mff.cuni.cz>';
157 store "=strom","bell" if headeris "List-Post",'<vodni-strom@atrey.karlin.mff.cuni.cz>';
158 store "=netinfo","log" if headeris "Sender" ,'<owner-netinfo-l@vol.cz>';
159 store "=saintmj","log" if headeris "From" ,'<netsaint@kam-enterprise.ms.mff.cuni.cz>';
160 store "=saintmj","log" if headeris "From" ,'<netsaint@kam.mff.cuni.cz>';
161 store "=4cerr","bell" if headeris "From" ,'<owner-4cinfo@atrey.karlin.mff.cuni.cz>';
162 store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>';
163 store "=slashdot","bell" if headeris "From" ,'<slashdot@slashdot.org>';
164 store "=freshmeat","bell" if headeris "From" ,'<noreply@freshmeat.net>';
165 store "=sourceforge","bell" if headeris "From" ,'<noreply@sourceforge.net>';
166 store "=gsmperlcvs","silent" if headeris("From" ,'<johan@intra.tektonica.com>')
167 && $Audit->subject()=~/^'.*' has been updated!$/;
168 store "=libtoold","log" if headeris "List-Id" ,'<libtool.gnu.org>';
169 store "=libtoolpat","log" if headeris "List-Id" ,'<libtool-patches.gnu.org>';
171 store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/;
172 store "=ats","log" if headeris("From" ,'<root@ms.atspraha.cz>')
173 || (headeris("From",'<online@ringier.cz>') && headerhas("To",'<blesk@atspraha.cz>'));
174 store "=atscasablanca","log" if headeris "From" ,'<casablanca@ms.atspraha.cz>';
175 store "=www-sms","log" if headeris "List-Id" ,'<www-sms-developers.lists.sourceforge.net>';
178 # Petr Koutecky does not mark his Stuff
179 store "=koutecky","log" if headeris "From" ,'<velkyhroch@seznam.cz>';
181 store "=errm","bell" if $isFROM_MAILER && !did();
183 store "==","sms" if !did;
186 sub audit_sms_address
190 my $address=$obj->address();
191 if (my $alternates=muttrc_get("alternates")) {
192 return "I" if $address=~/$alternates/si;
194 my %aliases=muttrc_aliases();
195 if (my $alias=$aliases{lc $address}) {
197 s/\b(Bus)siness$/$1/i;
210 my $from=(@{$args{"from"}} ? join(",",map({ audit_sms_address($_); } @{$args{"from"}})) : "?");
215 s/(?:Re|Aw|Odp|Fw|Fwd|OT)(?:\[\d+\])?://ig;
218 s/\[\s*WAS:.*\]\s*$//i;
225 # max. 9 lines of .sig
226 s/\n-- (?:\n[^\n]*){0,9}$//gs;
227 # "Original Message"/"Puvodni zprava" etc. up to empty line
228 # "- - - Original message: - - -" is by "Lotus Notes Release 5.0.5 September 22, 2000"
229 s/(^|\n)[\s^\n]*(?:-----[\w\s]*-----|- - - Original message: - - -)[\s^\n]*(?:\n[^\n]+)*\n{2,}(?:\s*[^>\s].*$)?/\n/gs;
230 # Remove "..." lines (is it used by anyone except me?)
233 s/^(?:\s*[[:upper:]]{0,3}>)+.*$/*/gm;
234 s/(?:^|\n)(?:\*\n+)+/\n*\n/gs;
236 s/^.*\b(?:wrote|writes|napsal jste):\s*$//gm;
239 return [$from,"($subject)$body"];