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.
32 "205.139.198.11", # eniac.disaster.com: cw.net.spam-support.blackholes.five-ten-sg.com.
33 "127.0.0.2", # 2.0.0.127.relays.ordb.org.
34 "65.113.40.131", # bozo.vmware.com: qwest.net.spam-support.blackholes.five-ten-sg.com.
35 "66.218.85.33", # mta2.wss.scd.yahoo.com.: yahoo.com.spam.blackholes.five-ten-sg.com.
41 # TODO: <short-m@> storage?
43 # never spawn new mail if FROM_MAILER
44 # $isFROM_MAILER postponed after maillists as they may look as FROM_MAILER
46 my $isFROM_MAILER=$Audit->header()=~/$procmailFROM_MAILER/mio;
47 $store_ignorenewmail=(0
49 || headerhas "From",'<Regexp:^owner->'
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>';
61 store "=spamo" if headeris "From",'<BNcom@email.bn.com>';
62 store "=spamo" if headeris "From",'<e4luck@lists.opt4email.com>';
63 store "=spamo" if headeris "From",'<mailcontests@lists.servitall.com>';
64 store "=spamo" if headeris "From",'<canda@lica.cz>';
66 # weak detection: files with text/html w/o text/plain are usually a spam
67 my @types_linear=map({ mime_type($_); } parts_linear());
68 store "=spamo-html" if grep({ $_ eq "text/html"; } @types_linear) && !grep({ $_ eq "text/plain"; } @types_linear);
70 store "=spamo-big5" if ($_=mimehead(body_first())->mime_attr("Content-Type.charset")) && /^big5/i;
75 local $store_profile="silent";
77 store "=spam-razor".($_ eq 1 ? "" : ";$_") if $_=razor2();
80 local $store_profile="silent";
82 store "=spam-orbs" .";$_","log" if $_=dnsbl '.relays.ordb.org.' ,1; # all hosts
83 store "=spam-abuse" .";$_","log" if $_=dnsbl '.blackholes.mail-abuse.org.' ,1; # all hosts
84 # we don't check all hosts as they can be "dialup" category, FIXME: check for it
85 store "=spam-five" .";$_","log" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first
86 # I don't send viruses but viruses propagate mails of mine
87 store "=spam-av" if headeris "X-Mailer",'ravmd/8.3.2';
91 store "=err","bell" and return if headerhas \&Received_for,'<short+err@>';
93 # ppl-wished foreign remapping, Reply-To is left untouched!
94 # FIXME: modifications are now being dropped by &write_message!
96 'kerere@post.cz' =>'kamzik@k332.feld.cvut.cz',
97 'profes@mbox.vol.cz' =>'kratochvilova@egp.cz',
98 'jkrouzek@mbox.vol.cz' =>'krouzek@mbox.fsv.cuni.cz',
99 'jakub.gorner@lidovky.cz' =>'tonda@disnet.cz',
100 'jan.kolar@videoprogress.cz' =>'jenda.kolar@volny.cz',
101 'daniel.rulicek@cponline.cz' =>'daniel.rulicek@cpress.cz',
102 'pavel@suse.cz' =>'pavel@ucw.cz',
106 # My obsolete e-mail addresses
107 store_muttrc_alternates "=redirect-","btw";
109 # nasty public lists with $store_ignore
111 local $store_profile="log";
113 $store_ignore="smsmail" if 1==$Audit->body() && length(join "",$Audit->body())<180; # SMS mail
114 $store_ignore="sms OS" if $Audit->subject()=~/^Email pro: /; # "^Email pro: gsm@sh\.cvut\.cz$";
115 $store_ignore="list-moron" if grep { headeris "From",$_; } qw(
121 <satko@quanto.nr.sanet.sk>
122 <vithous@attorney.cz> <viroman@attorney.cz>
128 store "=gsm" if headeris "Sender" ,'<owner-gsm@sh.cvut.cz>';
129 store "=gsmpand" if headeris "List-Post",'<gsm@pandora.cz>';
130 store "=9kc","log" if headeris "List-Post",'<n9k@pandora.cz>';
131 store "=9kcd","log" if headeris "List-Post",'<dev9k@pandora.cz>';
135 store "=mozillabug","log" if headeris "From" ,'<bugzilla-daemon@mozilla.org>';
136 store "=9ku","log" if headeris "List-Id" ,'<9000.listman.net>';
137 store "=9kd","log" if headeris "Sender" ,'<owner-9000-developers@geekstuff.co.uk>';
138 store "=spong","log" if headeris "List-Id" ,'<spong-users.lists.sourceforge.net>';
139 store "=gtkd","silent" if headeris "List-Id" ,'<gtk-devel-list.gnome.org>';
140 store "=gnomevfs","log" if headeris "List-Id" ,'<gnome-vfs-list.gnome.org>';
141 store "=mffstatnice","bell" if headeris "List-Post",'<statnice@atrey.karlin.mff.cuni.cz>';
142 store "=hw","log" if headeris "List-Post",'<hw-news@list.gin.cz>';
143 store "=gnokii","log" if headeris "List-Id" ,'<gnokii-users.mail.freesoftware.fsf.org>';
144 store "=winelic","log" if headeris "List-Id" ,'<wine-license.winehq.com>';
145 store "=wined","silent" if headeris "List-Id" ,'<wine-devel.winehq.com>';
146 store "=winepat","silent" if headeris "List-Id" ,'<wine-patches.winehq.com>';
147 store "=winecvs","silent" if headeris "List-Id" ,'<wine-cvs.winehq.com>';
148 store "=wineann","log" if headeris "List-Id" ,'<wine-announce.winehq.com>';
149 store "=ros","log" if headeris "List-Post",'<ros-general@reactos.com>';
150 store "=roskernel","log" if headeris "List-Post",'<ros-kernel@reactos.com>';
151 store "=roscvs","silent" if headeris "List-Post",'<ros-cvs@reactos.com>';
152 store "=rosbug","log" if headeris "Reply-To" ,'<scarab@reactos.wox.org>';
153 store "=fsd","silent" if headeris "X-Mailing-List",'<linux-fsdevel@vger.kernel.org>';
154 store "=kerneld","silent" if headeris "X-Mailing-List",'<linux-kernel@vger.kernel.org>';
155 store "=surprise","sms" if headeris "List-Post",'<surprise@atrey.karlin.mff.cuni.cz>';
156 store "=surprisesuse","sms" if headeris "Sender" ,'<owner-surprise@suse.cz>';
157 store "=tacacs","log" if headeris "Sender" ,'<tacplus-l@disaster.com>';
158 store "=tacacs","log" if headeris "Sender" ,'<owner-tacplus-l@disaster.com>';
159 store "=tacacs","log" if headeris "List-Id" ,'<devel.lists.tacplus.org>';
160 store "=pm","sms" if headeris "Sender" ,'<owner-prague-pm@pm.org>';
161 store "=radary","log" if headeris "Reply-To" ,'<pha@radary.cz>';
162 store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>';
163 store "=linux-input","log" if headeris "List-Post",'<linux-input@atrey.karlin.mff.cuni.cz>';
164 store "=strom","bell" if headeris "List-Post",'<vodni-strom@atrey.karlin.mff.cuni.cz>';
165 store "=netinfo","log" if headeris "Sender" ,'<owner-netinfo-l@vol.cz>';
166 store "=saintmj","log" if headeris "From" ,'<netsaint@kam-enterprise.ms.mff.cuni.cz>';
167 store "=saintmj","log" if headeris "From" ,'<netsaint@kam.mff.cuni.cz>';
168 store "=4cerr","bell" if headeris "From" ,'<owner-4cinfo@atrey.karlin.mff.cuni.cz>';
169 store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>';
170 store "=slashdot","bell" if headeris "From" ,'<slashdot@slashdot.org>';
171 store "=freshmeat","bell" if headeris "From" ,'<noreply@freshmeat.net>';
172 store "=sourceforge","bell" if headeris "From" ,'<noreply@sourceforge.net>';
173 store "=gsmperlcvs","silent" if headeris("From" ,'<johan@intra.tektonica.com>')
174 && $Audit->subject()=~/^'.*' has been updated!$/;
175 store "=libtoold","log" if headeris "List-Id" ,'<libtool.gnu.org>';
176 store "=libtoolpat","log" if headeris "List-Id" ,'<libtool-patches.gnu.org>';
178 store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/;
179 store "=ats","log" if headeris("From" ,'<root@ms.atspraha.cz>')
180 || (headeris("From",'<online@ringier.cz>') && headerhas("To",'<blesk@atspraha.cz>'));
181 store "=atscasablanca","log" if headeris "From" ,'<casablanca@ms.atspraha.cz>';
182 store "=www-sms","log" if headeris "List-Id" ,'<www-sms-developers.lists.sourceforge.net>';
185 # Petr Koutecky does not mark his Stuff
186 store "=koutecky","log" if headeris "From" ,'<velkyhroch@seznam.cz>';
188 store "=errm","bell" if $isFROM_MAILER && !did();
190 store "==","sms" if !did;
193 sub audit_sms_address
197 my $address=$obj->address();
198 if (my $alternates=muttrc_get("alternates")) {
199 return "I" if $address=~/$alternates/si;
201 my %aliases=muttrc_aliases();
202 if (my $alias=$aliases{lc $address}) {
204 s/\b(Bus)siness$/$1/i;
217 my $from=(@{$args{"from"}} ? join(",",map({ audit_sms_address($_); } @{$args{"from"}})) : "?");
222 s/(?:Re|Aw|Odp|Fw|Fwd|OT)(?:\[\d+\])?://ig;
225 s/\[\s*WAS:.*\]\s*$//i;
232 # max. 9 lines of .sig
233 s/\n-- (?:\n[^\n]*){0,9}$//gs;
234 # "Original Message"/"Puvodni zprava" etc. up to empty line
235 # "- - - Original message: - - -" is by "Lotus Notes Release 5.0.5 September 22, 2000"
236 s/(^|\n)[\s^\n]*(?:-----[\w\s]*-----|- - - Original message: - - -)[\s^\n]*(?:\n[^\n]+)*\n{2,}(?:\s*[^>\s].*$)?/\n/gs;
237 # Remove "..." lines (is it used by anyone except me?)
240 s/^(?:\s*[[:upper:]]{0,3}>)+.*$/*/gm;
241 s/(?:^|\n)(?:\*\n+)+/\n*\n/gs;
243 s/^.*\b(?:wrote|writes|napsal jste):\s*$//gm;
246 return [$from,"($subject)$body"];