Update lists list.
[PerlMail.git] / PerlMail / Config.pm
index 7e22164..07a06a8 100644 (file)
@@ -43,7 +43,7 @@ require Mail::Alias;
 
 BEGIN {
        for (qw(headerhas store headeris did dnsbl store_muttrc_alternates Received_for parts_linear mime_type
-                       body_first mimehead razor2 header_remap)) {
+                       body_first mimehead spamassassin header_remap)) {
                eval 'sub '.$_.' { return ::'.$_.'(@_); }';
                }
        }
@@ -106,9 +106,9 @@ my @lists=qw(
                4cinfo@atrey.karlin.mff.cuni.cz
                libtool@gnu.org
                libtool-patches@gnu.org
-               wine-license@winehq.com
-               wine-devel@winehq.com
-               wine-patches@winehq.com
+               wine-license@winehq.org
+               wine-devel@winehq.org
+               wine-patches@winehq.org
                gtk-devel-list@gnome.org
                gnome-vfs-list@gnome.org
                captive-announce-list@jankratochvil.net
@@ -123,7 +123,15 @@ my @lists=qw(
                autoconf-patches@gnu.org
                wget-patches@sunsite.dk
                wget@sunsite.dk
+               mailman-developers@python.org
+               wineconf@winehq.org
+               prague-pm@pm.org
+               dev@httpd.apache.org
+               asterisk-perl@lists.gnuinter.net
+               isdn4linux@listserv.isdn4linux.de
+               libc-alpha@sources.redhat.com
                );
+               #4c-list@vellum.cz
 
 # Pathname of the original sendmail(8) binary:
 our $sendmail_orig=(-x ($_="/usr/sbin/sendmail-orig") ? $_ : "/usr/sbin/sendmail");
@@ -233,6 +241,10 @@ our @dnsbl_whitelist=(
                "66.218.85.33",         # mta2.wss.scd.yahoo.com: yahoo.com.spam.blackholes.five-ten-sg.com.
                "212.80.76.42",         # mx2.seznam.cz: seznam.cz.free.blackholes.five-ten-sg.com.
                "64.110.204.63",        # hsdbrg64-110-204-63.sasknet.sk.ca: 64.110.202.181.sasknet.sk.ca.misc.spam.blackholes.five-ten-sg.com.
+               "212.80.76.44",         # mx1.seznam.cz: 44.76.80.212.blackholes.five-ten-sg.com.
+               "212.80.76.29",         # prace.seznam.cz: 212.80.76.42.seznam.cz.free.blackholes.five-ten-sg.com
+               "193.252.22.30",        # smtp1.wanadoo.fr: 30.22.252.193.blackholes.five-ten-sg.com
+               "213.151.87.16",        # posta.dobnet.cz: 16.87.151.213.relays.ordb.org
                );
 
 our $Audit;    # imported
@@ -243,7 +255,6 @@ our $store_ignore;  # imported
 sub audit
 {
        $store_profile=undef();
-       # TODO: <short-m@> storage?
 
        # never spawn new mail if FROM_MAILER
        # $isFROM_MAILER postponed after maillists as they may look as FROM_MAILER
@@ -282,7 +293,7 @@ sub audit
                # Do not local $store_file as it is our-imported
                $store_profile="silent";
                local $_;
-               store "=spam".($_ eq 1 ? "" : ";$_")      if $_=razor2();
+               store "=spam".($_ eq 1 ? "" : ";$_")      if $_=spamassassin();
                };
        $store_profile=undef();
        return if did sub {
@@ -292,7 +303,7 @@ sub audit
                store "=spam"                      .";$_","log" if $_=dnsbl '.relays.ordb.org.' ,1;     # all hosts
                store "=spam"                      .";$_","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"                      .";$_","log" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first
+#              store "=spam"                      .";$_","log" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first
                # I don't send viruses but viruses propagate mails of mine
                store "=spam"                                   if headeris "X-Mailer",'ravmd/8.3.2';
                store "=spam"                                   if $isFROM_MAILER && headeris("To",'<short@ucw.cz>');
@@ -354,11 +365,12 @@ sub audit
        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 "=gnokii","log"        if headeris "List-Id"  ,'<gnokii-users.mail.freesoftware.fsf.org>';
-       store "=winelic","log"       if headeris "List-Id"  ,'<wine-license.winehq.com>';
+       store "=winelic","log"       if headeris "List-Id"  ,'<wine-license.winehq.org>';
        store "=wined","log"         if headeris "List-Id"  ,'<wine-devel.winehq.org>';
-       store "=winepat","silent"    if headeris "List-Id"  ,'<wine-patches.winehq.com>';
-       store "=winecvs","silent"    if headeris "List-Id"  ,'<wine-cvs.winehq.com>';
-       store "=wineann","log"       if headeris "List-Id"  ,'<wine-announce.winehq.com>';
+       store "=winepat","silent"    if headeris "List-Id"  ,'<wine-patches.winehq.org>';
+       store "=winecvs","silent"    if headeris "List-Id"  ,'<wine-cvs.winehq.org>';
+       store "=wineann","log"       if headeris "List-Id"  ,'<wine-announce.winehq.org>';
+       store "=wineconf","log"      if headeris "List-Id"  ,'<wineconf.winehq.org>';
        store "=ros","log"           if headeris "List-Id"  ,'<ros-general.reactos.com>';
        store "=roskernel","log"     if headeris "List-Id"  ,'<ros-kernel.reactos.com>';
        store "=roscvs","silent"     if headeris "List-Id"  ,'<ros-cvs.reactos.com>';
@@ -389,35 +401,55 @@ sub audit
        store "=libtoolpat","log"    if headeris "List-Id"  ,'<libtool-patches.gnu.org>';
        store "=automake","log"      if headeris "List-Id"  ,'<automake.gnu.org>';
        store "=autoconf","log"      if headeris "List-Id"  ,'<autoconf.gnu.org>';
-       store "=autoconfpat","log"   if headerhas "List-Id"  ,'<autoconf-patches.gnu.org>';     # has<="... autoconf, the GNU ..."
-                                    if (headeris("From"    ,'<mailman-owner@vellum.cz>')
-                                        || headeris("From" ,'<captive-list-admin@jankratochvil.net>')
-                                        || headeris("From" ,'<captive-devel-list-admin@jankratochvil.net>')
-                                        || headeris("From" ,'<captive-announce-list-admin@jankratochvil.net>')) {
-               store "=caperr","log";
-               }
-       else {
+       store "=autoconfpat","log"   if headeris "List-Id"  ,'<autoconf-patches.gnu.org>';
+       my %mailman=(
+                       '<captive-admin@>'=>"=caperr",
+                       '<captive-devel-admin@>'=>"=caperr",
+                       '<captive-announce-admin@>'=>"=caperr",
+                       '<4c-admin@>'=>"=4cerr",
+                       );
+       if (!did sub {
+                       while ((my($mailaddr,$folder)=each(%mailman))) {
+                               (my $maillistaddr=$mailaddr)=~s/-admin/-list$&/;
+                               store $folder,"log" if (headeris("From",'<mailman-owner@vellum.cz>')&&headeris("To",$mailaddr))
+                                               || headeris("From",$maillistaddr)
+                                               || headeris("To",$maillistaddr)
+                                               || headeris("From",$mailaddr);
+                               }
+                       }) {
                store "=cap","bell"        if headeris "List-Id"  ,'<captive-list.jankratochvil.net>';
                store "=capd","bell"       if headeris "List-Id"  ,'<captive-devel-list.jankratochvil.net>';
                store "=capann","bell"     if headeris "List-Id"  ,'<captive-announce-list.jankratochvil.net>';
+               store "=4c","bell"         if headeris "List-Id"  ,'<4c-list.vellum.cz>';
                }
        store "=ntfsann","log"       if headeris "List-Id"  ,'<linux-ntfs-announce.lists.sourceforge.net>';
        store "=ntfsd","log"         if headeris "List-Id"  ,'<linux-ntfs-dev.lists.sourceforge.net>';
        store "=orbit","log"         if headeris "List-Id"  ,'<orbit-list.gnome.org>';
        store "=kand","log"          if headeris "List-Id"  ,'<devel.kannel.org>';
+       store "=mailmand","log"      if headeris "List-Id"  ,'<mailman-developers.python.org>';
+       store "=asterisk-perl","log" if headeris "List-Post",'<asterisk-perl@lists.gnuinter.net>';
+       store "=i4l","log"           if headeris "List-Id"  ,'<isdn4linux.listserv.isdn4linux.de>';
+       store "=glibc","log"         if headeris "Mailing-List",qr/\b\Qlibc-alpha-help\E@\Qsources.redhat.com\E\b/;
+       store "=fedann","bell"       if headeris "List-Id"  ,'<fedora-announce-list.redhat.com>';
        # own webs
        store "=energie","bell"      if headeris "From"     ,qr/^EnergieWeb/;
        store "=ats","log"           if headeris("From"     ,'<root@ms.atspraha.cz>')
                                        || (headeris("From",'<online@ringier.cz>') && headerhas("To",'<blesk@atspraha.cz>'));
        store "=atscasablanca","log" if headeris "From"     ,'<casablanca@ms.atspraha.cz>';
        store "=www-sms","log"       if headeris "List-Id"  ,'<www-sms-developers.lists.sourceforge.net>';
+       store "=httpdd","log"        if headeris "list-post",'<dev@httpd.apache.org>';
+       store "=mms2log","log"       if headeris "Return-Path",'<root@node0.mms2.org>';
 
        # Petr Koutecky does not mark his Stuff
-       store "=koutecky","log"      if headeris "From"     ,'<velkyhroch@seznam.cz>';
+       store "=koutecky","log"      if headeris "Return-Path",'<velkyhroch@seznam.cz>';
+       store "=koutecky","log"      if headeris "Return-Path",'<pk.petr@centrum.cz>';
 
        store "=errm","bell"         if $isFROM_MAILER && !did();
 
-       store "==","sms"             if !did;
+       if (!did) {
+               store "==","sms";
+               spamassassin "sa-learn --ham";
+               }
 }
 
 sub audit_sms_address