[Debian] spamassassin + razor

Résolu
Bonjour,

j'ai ce message d'erreur : Unable to connect to c304.cloudmark.com:2703; Reason: Invalid argument.

debian:/var/log# cat razor-agent.log
mai 11 20:39:31.333232 check[27856]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/var/log/razor-agent.log
mai 11 20:39:34.317006 check[27856]: [ 3] mail 1 is not known spam.
May 13 16:02:51.299622 check[2330]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/var/log/razor-agent.log
May 13 16:02:57.725008 check[2330]: [ 3] Unable to connect to c304.cloudmark.com:2703; Reason: Invalid argument.
May 13 17:30:31.854881 check[2333]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/var/log/razor-agent.log
May 15 20:07:33.050681 check[2328]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/var/log/razor-agent.log
May 15 20:07:39.501804 check[2328]: [ 3] Unable to connect to discovery.razor.cloudmark.com:2703; Reason: Invalid argument.
May 15 20:07:39.505120 check[2328]: [ 3] Unable to connect to discovery.razor.cloudmark.com:2703; Reason: Invalid argument.
May 15 20:07:39.508640 check[2328]: [ 3] Unable to connect to c305.cloudmark.com:2703; Reason: Invalid argument.
May 15 20:07:39.511467 check[2328]: [ 3] Unable to connect to discovery.razor.cloudmark.com:2703; Reason: Invalid argument.
debian:/var/log#


j'ai cherché un petit peu pour trouver ceci : razor-agents -discover usually cleans it up ici :
http://www.nabble.com/%27invalid-argument%27-from-razor-report-td12808954.html

j'applique ....donc :
.debian:/var/log# razor-admin -discover
debian:/var/log# cat razor-agent.log
....
May 15 20:07:39.505120 check[2328]: [ 3] Unable to connect to discovery.razor.cloudmark.com:2703; Reason: Invalid argument.
May 15 20:07:39.508640 check[2328]: [ 3] Unable to connect to c305.cloudmark.com:2703; Reason: Invalid argument.
May 15 20:07:39.511467 check[2328]: [ 3] Unable to connect to discovery.razor.cloudmark.com:2703; Reason: Invalid argument.
mai 15 20:58:30.925442 admin[27614]: [ 2] [bootup] Logging initiated LogDebugLevel=3 to file:/var/log/razor-agent.log
mai 15 20:58:30.926891 admin[27614]: [ 2]  Razor-Agents v2.84 starting razor-admin -discover
debian:/var/log#


si vous avez des commentaires, n'hésitez pas (je ne maîtrise pas vraiment).
merci.

--
Un Linux, c'est bien ...........plein de Linux, c'est mieux !
Debian lenny  // Fedora 2.6.24.7-92.fc8 // Gentoo 2.6.24-gentoo-r7 // Mandriva 2007.1 Spring
Configuration: Linux Debian
Firefox 3.0b4

12 réponses

  1. je cotninue mon exploration avec DCC :

    j'ai enfin trouvé le tuto miracle :
    http://kb.atmail.com/?p=52

    j'ai suivi scrupuleusement (enfin presque !) et ça marche !

    tests sur Mandriva :
    les points importants :
    A) les ports :
    Par exemple, en utilisant iptables sous Linux, rajouter la règle suivante à /etc/sysconfig/iptables
    # DCC for Spamassassin UDP reply packets
    -A RH-Firewall-1-INPUT -p udp -m udp –dport 1024:65535 –sport 6277 -j ACCEPT


    bien sûr j'ai adapté !
    relancer iptables.

    B) essai du réseau DCC :
    pour savoir si le réseau DCC répond
    # cdcc info


    C) configurer spamassassin :
    Editer le fichier suivant :
    [root@localhost log]# vi /etc/mail/spamassassin/local.cf

    Ajouter:
    loadplugin Mail::SpamAssassin::Plugin::DCC
    dcc_path /usr/local/bin/dccproc


    rechercher le path de dcc dans votre machine et modifier en fonction.

    D) redémarrer votre serveur mail.

    E) Tester le fonctionnement de DCC via Spamassassin :
    [root@localhost log]# wget http://kb.atmail.com/attach/spam-mail.txt
    [root@localhost log]# /usr/bin/spamassassin -t -D < spam-mail.txt

    vous devriez voir ceci :
    [5075] dbg: dcc: network tests on, registering DCC
    [5075] dbg: plugin: loading Mail::SpamAssassin::Plugin::DCC from @INC


    voilà !

    <edit
    d'ailleurs pyzor et razor semblent fonctionner aussi :
    [5075] dbg: plugin: loading Mail::SpamAssassin::Plugin::Pyzor from @INC
    [5075] dbg: pyzor: network tests on, attempting Pyzor
    [5075] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC
    [5075] dbg: razor2: razor2 is available, version 2.82

    fin edit >
    2
    1. Ben ! c'est le bon moment pour relire la doc.

      Installation de la dernière version.

      documentation : https://www.rhyolite.com/dcc/

      pour l'instant je débute :
      > root@mandriva[192.168.1.2]:~# /usr/local/bin/cdcc info
      # 05/28/10 23:43:52 CEST  /var/dcc/map                  
      # Re-resolve names after 01:25:37  Check RTTs after 23:58:52
      # 1276.75 ms threshold, 1260.49 ms average    12 total, 11 working servers
      IPv6 on   version=3                                                       
      
      dcc1.dcc-servers.net,-      RTT+1000 ms  anon
      #  142.27.70.211,-                                  CollegeOfNewCaledonia ID 1189
      #     100% of  3 requests ok  316.38+1000 ms RTT       100 ms queue wait         
      #  207.195.195.223,-                                    SIHOPE-DCC-3 ID 1085     
      #     100% of  3 requests ok  236.40+1000 ms RTT       100 ms queue wait         
      #  209.169.14.29,-                                     x.dcc-servers ID 104      
      #     100% of  3 requests ok  260.00+1000 ms RTT       100 ms queue wait         
      
      dcc2.dcc-servers.net,-      RTT+1000 ms  anon
      #  64.254.89.30,-                                            dmv.com ID 1181
      #     100% of  3 requests ok  221.24+1000 ms RTT       100 ms queue wait    
      #  193.166.171.33,-                                   HP_X86_64_4CPU ID 1245
      #     100% of  3 requests ok  176.75+1000 ms RTT       100 ms queue wait    
      
      dcc3.dcc-servers.net,-      RTT+1000 ms  anon
      #  64.124.52.232,-                                     z.dcc-servers ID 1049
      #     100% of  3 requests ok  298.40+1000 ms RTT       100 ms queue wait    
      #  69.12.221.230,-                                         sonic.net ID 1117
      #     100% of  3 requests ok  280.27+1000 ms RTT       100 ms queue wait    
      
      dcc4.dcc-servers.net,-      RTT+1000 ms  anon
      # *137.208.8.26,-                                             wuwien ID 1290
      #     100% of  3 requests ok  160.35+1000 ms RTT       100 ms queue wait    
      #  152.20.253.5,-                                       dcc.uncw.edu ID 1201
      #     100% of  3 requests ok  280.21+1000 ms RTT       100 ms queue wait    
      
      dcc5.dcc-servers.net,-      RTT+1000 ms  anon
      #  71.246.8.99,-                                               Misty ID 1170
      #     100% of  3 requests ok  308.85+1000 ms RTT       100 ms queue wait    
      #  208.82.128.50,-                                                   ID 1282
      #     100% of  3 requests ok  221.89+1000 ms RTT       100 ms queue wait
      
      @,-                         RTT-1000 ms  32768 secret12034933365y924
      #  127.0.0.1,-
      #      not answering
      
      ################
      # 05/28/10 23:43:52 CEST  greylist /var/dcc/map
      # Re-resolve names after 01:25:42  Check RTTs after 23:58:52
      # 1 total, 0 working servers
      # continue not asking greylist server 32 seconds after 1 failures
      
      @,-                         Greylist 32768 secret12034933365y924
      # *127.0.0.1,6276
      #      not answering
      
      localhost,-                 Greylist 32768 secret
      
      > root@mandriva[192.168.1.2]:~#


      c'est clair qu'il y a eu du changement et je sens que cela va être "coton" ...

      ^ ^
      0
      1. Je reviens sur la debian avec DCC qui plante toujours :
        > root@debian[192.168.1.3]:/var/log# cat mail.err
        Sep  5 11:24:17 debian dccproc[2500]: connect(194.228.41.73,6277): Network is unreachable
        Sep  5 11:24:20 debian dccproc[2500]: no DCC answer from 194.228.41.73,6277 after 0 ms
        Sep  5 15:59:25 debian dccproc[2946]: no DCC answer from 194.228.41.73,6277 after 775 ms
        > root@debian[192.168.1.3]:/var/log


        toujours pas trouvé comment régler le souci ....sinon relire la doc.
        0
        1. enfin :

          Nov 26 21:13:20 fedora9 spamd[4728]: spamd: creating default_prefs: /home/redfox/.spamassassin/user_prefs
          Nov 26 21:13:20 fedora9 spamd[4728]: config: created user preferences file: /home/redfox/.spamassassin/user_prefs
          Nov 26 21:13:20 fedora9 spamd[4728]: spamd: processing message <v0421010eb70653b14e06@[208.192.102.193]> for redfox:500
          Nov 26 21:13:26 fedora9 spamd[4728]: spamd: clean message (0.0/5.0) for redfox:500 in 7.3 seconds, 6494 bytes.
          Nov 26 21:13:27 fedora9 spamd[4728]: spamd: result: . 0 - scantime=7.3,size=6494,user=redfox,uid=500,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=34003,mid=<v0421010eb70653b14e06@[208.192.102.193]>,autolearn=ham
          Nov 26 21:13:27 fedora9 spamd[4726]: prefork: child states: II
          [root@fedora9 log]#

          et :
          [redfox@fedora9 spamassassin-3.2.5]$ cd
          [redfox@fedora9 ~]$ ls -l .spamassassin/user_prefs
          -rw-r--r-- 1 redfox redfox 1487 nov 26 21:13 .spamassassin/user_prefs
          [redfox@fedora9 ~]$ cat .spamassassin/user_prefs
          # SpamAssassin user preferences file. See 'perldoc Mail::SpamAssassin::Conf'
          # for details of what can be tweaked.
          ###########################################################################

          # How many points before a mail is considered spam.
          # required_score 5

          # Whitelist and blacklist addresses are now file-glob-style patterns, so
          # "friend@somewhere.com", "*@isp.com", or "*.domain.net" will all work.
          # whitelist_from someone@somewhere.com

          # Add your own customised scores for some tests below. The default scores are
          # read from the installed spamassassin rules files, but you can override them
          # here. To see the list of tests and their default scores, go to
          # https://spamassassin.apache.org/404.html .
          #
          # score SYMBOLIC_TEST_NAME n.nn

          # Speakers of Asian languages, like Chinese, Japanese and Korean, will almost
          # definitely want to uncomment the following lines. They will switch off some
          # rules that detect 8-bit characters, which commonly trigger on mails using CJK
          # character sets, or that assume a western-style charset is in use.
          #
          # score HTML_COMMENT_8BITS 0
          # score UPPERCASE_25_50 0
          # score UPPERCASE_50_75 0
          # score UPPERCASE_75_100 0
          # score OBSCURED_EMAIL 0

          # Speakers of any language that uses non-English, accented characters may wish
          # to uncomment the following lines. They turn off rules that fire on
          # misformatted messages generated by common mail apps in contravention of the
          # email RFCs.

          # score SUBJ_ILLEGAL_CHARS 0

          [redfox@fedora9 ~]$

          fichier d'origine !

          je stoppe là !
          0
          1. je continue sur spamassassin mais sur Fedora 9 :

            # yum install spamassassin

            # yum install evolution-spamassassin

            https://www.howtoforge.com/the-perfect-desktop-fedora9-gnome-p5

            utilisation du Générateur de Configuration de Spamassassin ici :
            http://www.yrex.com/spam/spamconfig.php
            puis :
            téléchargement du fichier nommé local.cf
            copie du fichier local.cf dans /etc/mail/spamassassin/
            note 1 : existence d'un fichier local.cf renommé en local.cf.ori
            note 2 : la partie suivante n'a pas été réalisé (fichier inconnu) :

            si le fichier user_prefs n'existe pas dans le home de l'utilisateur (cas pour la fedora), copiez-le à partir du home de root.
            [root@localhost redfox]# cp ~root/.spamassassin/user_prefs ~redfox/.spamassassin/user_prefs
            source : https://linux-pas-a-pas.org

            voilà ou j'en suis pour l'instant, je suivrai les infos suivantes pour la Fedora 9 :
            http://mail.savs.hcc.edu.tw/~chuavv/articles/spamassassin-en.html

            à suivre ..
            0
            1. salut,

              un petit retour sur sa-learn (spamassassin) notamment :
              How can I set up sa-learn (auto-learn) for SpamAssassin
              cf post<1>

              avec kmail (mandriva) cf commande post<4>
              tuto : http://jmelst.net/modules.php?name=News&file=article&sid=77
              0
              1. même manip pour la Debian : OK !!!

                cool !
                0
                1. mandriva

                  initialisation de Bayes :
                  fichier /etc/mail/spamassassin/local.cf
                  # Activation du systeme Bayes
                  use_bayes                       1
                  bayes_auto_learn                1
                  bayes_learn_to_journal          1
                  bayes_journal_max_size          0
                  bayes_path                /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/Bayes


                  [redfox@localhost ~]$ sa-learn --spam --mbox .kde/share/apps/kmail/mail/Spam
                  Learned tokens from 1 message(s) (1 message(s) examined)
                  [redfox@localhost ~]$
                  0
                  1. razor
                    http://razor.sourceforge.net/

                    pyzor
                    https://sourceforge.net/projects/pyzor/
                    https://cwiki.apache.org/confluence/display/SPAMASSASSIN/UsingPyzor
                    http://web.archive.org/web/*/https://debian-administration.org/article/323/Spam_filtering_with_Pyzor_and_SpamBayes

                    dcc
                    http://wiki.apache.org/spamassassin/Rules/DCC_CHECK

                    wiki spamassassin + razor + pyzor + dcc
                    https://cwiki.apache.org/confluence/display/SPAMASSASSIN/SingleUserUnixInstall
                    https://cwiki.apache.org/confluence/display/SPAMASSASSIN/UsingDcc

                    http://www.freespamfilter.org/FC4.html

                    penser à ouvrir les ports !!!

                    EDIT : haaa ! je retrouve les docs que j'avais utilisé :
                    http://www.supinfo-projects.com/fr/2005/spamassassin/3/
                    0
                    1. spamassassin et mandriva
                      docs :
                      http://www.linux-nantes.org/Configurer-SpamAssassin.html
                      http://artisan.karma-lab.net/node/79
                      0
                      1. ok ! problème réglé !

                        documentation :
                        Commandes et daemon SpamAssassin
                        http://www.espace-groupware.com/index2.php?option=com_content&do_pdf=1&id=82

                        Edit :
                        How can I set up sa-learn (auto-learn) for SpamAssassin
                        http://www.bynari.net/esupport/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=297

                        Configuration de Postfix, le serveur de mail phare, avec ses services POP3, SMTP et IMAP, authentifications sécurisées et spamassassin.
                        http://css.alsacreations.com/Administration-serveur-dedie/Serveur-mail-Postfix
                        0