Update lists list.
[PerlMail.git] / PerlMail / Config.pm
index 9f6f36c..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 ::'.$_.'(@_); }';
                }
        }
@@ -125,7 +125,13 @@ my @lists=qw(
                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");
@@ -237,6 +243,8 @@ our @dnsbl_whitelist=(
                "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
@@ -247,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
@@ -286,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 {
@@ -296,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>');
@@ -395,28 +402,43 @@ sub audit
        store "=automake","log"      if headeris "List-Id"  ,'<automake.gnu.org>';
        store "=autoconf","log"      if headeris "List-Id"  ,'<autoconf.gnu.org>';
        store "=autoconfpat","log"   if headeris "List-Id"  ,'<autoconf-patches.gnu.org>';
-                                    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 {
+       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 "Return-Path",'<velkyhroch@seznam.cz>';
@@ -424,7 +446,10 @@ sub audit
 
        store "=errm","bell"         if $isFROM_MAILER && !did();
 
-       store "==","sms"             if !did;
+       if (!did) {
+               store "==","sms";
+               spamassassin "sa-learn --ham";
+               }
 }
 
 sub audit_sms_address