MTA Zimbra : SpamAssassin | Mail DMARC (Filter) + Email Reporting

Tags: #<Tag:0x00007f63f59976a8> #<Tag:0x00007f63f59975b8> #<Tag:0x00007f63f5997450>

Bonjour,

Je souhaite mettre en place le filtre DMARC - à mon tour - et envoie de rapports DMARC sur mon serveur de mail Zimbra.

Il me semble qu’il faut ajouter un plugin à SpamAssassin

A priori celui-ci permet d’envoyer (par mail) des reports DMARC : Mail::SpamAssassin::Plugin::Dmarc

Et celui-ci permettrait de filtrer mon serveur de MAIL : « Configuration du filtre DMARC dans Spamassassin » mais le plugin « AskDNS » n’est pas répertorié sur le wiki de SpamAssassin me semble-il :confused:

Vais-je dans la bonne direction ?

Cordialement,
Romain

Note de Moi-même 20220225 : J’ai posé la question sur un forum d’administrateurs du serveur Mail - Zimbra - SpamAssassin - DMARC Filter + Email Reporting - Au cas où vous soyez à la ramasse - c’est Vendredi - Okay :slight_smile: :slight_smile: :slight_smile: :slight_smile: :wink: :innocent:


DMARC : Domain-based Message Authentication, Reporting and Conformance
DKIM : DomainKeys Identified Mail
SPF : Sender Policy Framework

Bon en cherchant un peu.

En vérifiant les fichiers et les régles de SpamAssassin je trouve ces fichiers :

/opt/zimbra/data/spamassassin/rules/25_dkim.cf
/opt/zimbra/data/spamassassin/rules/25_spf.cf

Par contre je ne comprend pas exactement - à quoi cela correspond - J’aime bien - comprendre moi-même :wink: Qui m’explique :crazy_face:

Peut-être me suffit t’il d’ajouter le plugin de SpamAssassin : Mail::SpamAssassin::Plugin::Dmarc qui me permettrait d’envoyer les rapports aux serveurs mails envoyeurs. Et que les filtres SpamAssassin sont déjà présent comme je vous expliquer juste au dessus dans les fichiers 25_spf.cf et 25_dkim.cf.

J’ai peur - houu - de modifier SpamAssassin :slight_smile:


Note de Moi-même du 20221107 :

J’ajoute ces 2 liens qui correspondes aux fichiers du dessus :

:blush:


Je link Rspamd: A replacement for Spamassassin du forum Zimbra - À priori Rspamd (logiciel libre d’antispam, écrit en C et distribué sous licence Apache) phoenix écrit :

il est également possible que rspamd puisse remplacer quelques autres modules tels que la signature DKIM. Vérification SPF, DMARC, liste grise, etc. Comme je l’ai mentionné, j’ai supprimé toutes les politiques, les restrictions DNS, les RBL et les configurations de post-écran de mon serveur et j’ai laissé rspamd gérer tout cela, ce qui a entraîné une autre baisse de l’utilisation du processeur.


Salutations.

Romain (LAB3W)

Bonjour.

  1. Qui s’est renseigné ?
  2. Qui a essayé ?

:wink:

Cordialement,
Romain

Bonjour.

Je viens de trouver cela de Marc Bradshaw (MBRADSHAW) mais çà m’a l’air d’être compliquer à mettre en place mais bien bon :

Comment implanter çà sur un serveur Mail pour rejeter les mails non signés DMARC : SPF + DKIM :slight_smile:

Auriez-vous une solution :

  1. Pour dans un premier temps → vérifier que le(s) SPF du serveurs d’envoie est bien configuré/valide.
  2. Puis, dans un deuxième temps → vérifier que la signature DKIM soit valide".

Je souhaite implanter des vérification sur mon serveur MTA zimbra pour les mails que je reçois.

Qui a des informations ?

Mail-DMARC-1.20211209 → readme.md : README.md - metacpan.org

Je ne vais pas « cliquer » sur l’intall comme un bourrin quand même :confused: :rofl:

Mail-DMARC-1.20211209 → install.md : INSTALL.md - metacpan.org

:blush:

NdMoi 15h47 GMT+1 : F.A.Q. → Home · msimerson/mail-dmarc Wiki · GitHub et les développers /contributors

NdMoi-même 17h27 : GMT+1 Les gars ils ont fait le truc/vérification/validation des signatures mail en images BIMI (Brand Indicators for Message Identification) :slight_smile:

Sinon, il y ce plugin SpamAssassin qui vérifie si un e-mail respecte la politique DMARC de son domaine.

Le plugin peut enregistrer les rapports DMARC dans une base de données, les rapports peuvent être envoyés ultérieurement à des serveurs de messagerie externes. La branche principale est développée sur Apache SpamAssassin 4.x src tree et elle sera synchronisée ici, la version compatible avec Apache SpamAssassin 3.4.x est sur la branche « 3.4 ». Voir Mail::DMARC::Report pour une documentation supplémentaire sur la configuration des rapports.

Dmarc policy check :

Mail::SpamAssassin::Plugin::Dmarc : https://github.com/bigio/spamassassin-dmarc

Çà doit être plus simple à mettre en place - Comment-faire :blush: ?

Est-ce qu’il faut que je copie/colle seulement ces 3 fichiers dans ces répertoires ?

/opt/zimbra/common/lib/perl5/Mail/SpamAssassin/
DMARC.pm

/opt/zimbra/data/spamassassin/rules/
DMARC.cf

/opt/zimbra/data/spamassassin/localrules/
DMARC.pre

À votre avis ?

Merci !

:wink:

Personne ne travaille sur SpamAssassin ?

SpamAssassin est un logiciel libre mené par la Apache Software Foundation, auteur du très célèbre serveur Web Apache HTTP Server. Le but de ce logiciel est de filtrer le trafic des courriels pour éradiquer les courriels reconnus comme pourriels ou courriels non sollicités.

Ils sonts 3 sur GitHub pour SpamAsssassin :sweat_smile: :joy:

Et 3 autres personnes pour SpamAssassin::DMARC :

Wiki SpamAssassin :slight_smile:

SpamAssassin est un projet open source mature et largement déployé qui sert de filtre de messagerie pour identifier le spam. SpamAssassin utilise une variété de mécanismes, notamment l’analyse d’en-tête et de texte, le filtrage bayésien, les listes de blocage DNS et les bases de données de filtrage collaboratives. SpamAssassin s’exécute sur un serveur et filtre le spam avant qu’il n’atteigne votre boîte aux lettres.

:slight_smile:

Bonjour,

Avant d’installer DMARC filter et reporting.

J’essaie d’activer un plugin Mail::SpamAssassin::Plugin::RelayCountry dans le SpamAssassin du MTA zimbra mais je n’y arrive pas.

Les modules et plugins de Mail SpamAssassin :

Voyant une ligne commentée dans le fichier : /opt/zimbra/data/spamassassin/localrules/init.pre j’ai décommenté cette ligne - Je me suis dis, tiens, ils nous ont préparé le chemin, pour essayer des plugins de SpamAssassin - cooL :

# RelayCountry - add metadata for Bayes learning, marking the countries
# a message was relayed through
#
# Note: This requires the Geo::IP Perl module
#
loadplugin Mail::SpamAssassin::Plugin::RelayCountry

J’ai, donc, avant, « essayé » d’installer Mail::SpamAssassin::GeoDB

Par contre çà ne fonctionne pas - Pas d’ajout dans le headers (en-têtes) de mes mails reçus - Et le serveur mail et amavisd (SpamAssasin) fonctionne (ligne du chargement du plugin RelayCountry décommenter).

Zimbra status
zimbra@mail:~ $ zmamavisdctl status && zmmtactl status
amavisd is running.
amavisd-mc is running.

zimbra@mail:~ $ zmcontrol status
Host mail.zw3b.net
        amavis                  Running
        antispam                Running
        antivirus               Running
        ldap                    Running
        logger                  Running
        mailbox                 Running
        mta                     Running
        opendkim                Running
        service webapp          Running
        snmp                    Running
        spell                   Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running

J’ai téléchargé copié le plugin RelayCountry.pm dans le répertoire de SpamAssasin de zimbra :

root@mail:~ # wget https://cpan.metacpan.org/authors/id/S/SI/SIDNEY/Mail-SpamAssassin-4.0.0.tar.gz
root@mail:~ # tar xzvfp Mail-SpamAssassin-4.0.0.tar.gz
root@mail:~ # cp Mail-SpamAssassin-4.0.0/lib/Mail/SpamAssassin/Plugin/RelayCountry.pm /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/Plugin/

J’ai regardé le fichier :

vim /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/Conf.pm

Et j’ai ajouté « à l’arrache » la ligne (à la fin du fichier) :

sub feature_geodb { 1 } # if needed for some reason

Par contre, il manque plein de lignes concernant le GeoDB.
Je me dis, que je ne vais pas ajouter au fichier de Conf.pm ces lignes à la main.
Qu’il doit bien y avoir un moyen, une commande (l’install) pour qu’en ajoutant/installant le module, le fichier de conf de SpamAssassin se modifie.

Avez-vous une idée ?


J’essaie de trouver la commande « perl » → associée à zimbra - Pour qu’il interagisse dans l’arborescence de zimbra → /opt/zimbra/
J’ai recherché un lien symbolique vers /usr/bin/perl dans le répertoire /opt/zimbra → sans succès.


J’ai « essayé » d’installer Mail::SpamAssassin::GeoDB de cette manière et depuis le répertoire /root/ avec la commande CPAN (Comprehensive Perl Archive Network) :

cpanm install Mail::SpamAssassin::GeoDB

J’essaie avec la commande perl.

perl -MCPAN -e 'install Mail::SpamAssassin::GeoDB'

Mais je crois que c’est pareil, çà ne va toujours pas modifier le fichier :

/opt/zimbra/common/lib/perl5/Mail/SpamAssassin/Conf.pm

Je me dis que Zimbra doit utiliser « perl » de la machine, mais je ne sais pas comment lui dire de modifier/ajouter le module Mail::SpamAssassin::GeoDB dans zimbra.

Merci pour vos réponses.


Qui connaitrait un peu le Zimbra Collaboration Suite (ZCS), qui comprend un serveur de messagerie et un client Web - WikipediA Zimbra.


Zimbra / Perl / Mail :: SpamAssassin : Listes des répertoires

Répertoire zimbra : data/spamassassin/

root@mail:~ $ ls -l /opt/zimbra/data/spamassassin/localrules/
total 52
-rw-r--r-- 1 zimbra zimbra 1194 Mar 28  2022 init.pre
-rw-r--r-- 1 zimbra zimbra 3279 Dec 28 14:20 local.cf
-r--r----- 1 zimbra zimbra 4415 Dec 28 14:22 salocal.cf
-rw-r--r-- 1 zimbra zimbra 2523 Mar 28  2022 v310.pre
-rw-r--r-- 1 zimbra zimbra 1194 Mar 28  2022 v312.pre
-rw-r--r-- 1 zimbra zimbra 2414 Mar 28  2022 v320.pre
-rw-r--r-- 1 zimbra zimbra 1237 Mar 28  2022 v330.pre
-rw-r--r-- 1 zimbra zimbra 1020 Mar 28  2022 v340.pre
-rw-r--r-- 1 zimbra zimbra 1309 Mar 28  2022 v341.pre
-rw-r--r-- 1 zimbra zimbra 1469 Mar 28  2022 v342.pre
-rw-r--r-- 1 zimbra zimbra 1264 Mar 28  2022 v343.pre

root@mail:~ $ ls -l /opt/zimbra/data/spamassassin/rules/
total 1324
-rw-r--r-- 1 zimbra zimbra   8790 Mar 28  2022 10_default_prefs.cf
-rw-r--r-- 1 zimbra zimbra   2470 Mar 28  2022 10_hasbase.cf
-rw-r--r-- 1 zimbra zimbra   7630 Mar 28  2022 20_advance_fee.cf
-rw-r--r-- 1 zimbra zimbra  37187 Mar 28  2022 20_aux_tlds.cf
-rw-r--r-- 1 zimbra zimbra   7198 Mar 28  2022 20_body_tests.cf
-rw-r--r-- 1 zimbra zimbra   1912 Mar 28  2022 20_compensate.cf
-rw-r--r-- 1 zimbra zimbra  11303 Mar 28  2022 20_dnsbl_tests.cf
-rw-r--r-- 1 zimbra zimbra  15543 Mar 28  2022 20_drugs.cf
-rw-r--r-- 1 zimbra zimbra  11404 Mar 28  2022 20_dynrdns.cf
-rw-r--r-- 1 zimbra zimbra   9073 Mar 28  2022 20_fake_helo_tests.cf
-rw-r--r-- 1 zimbra zimbra   3078 Mar 28  2022 20_freemail.cf
-rw-r--r-- 1 zimbra zimbra  41233 Mar 28  2022 20_freemail_domains.cf
-rw-r--r-- 1 zimbra zimbra   4438 Mar 28  2022 20_freemail_mailcom_domains.cf
-rw-r--r-- 1 zimbra zimbra  27208 Mar 28  2022 20_head_tests.cf
-rw-r--r-- 1 zimbra zimbra  10712 Mar 28  2022 20_html_tests.cf
-rw-r--r-- 1 zimbra zimbra   5320 Mar 28  2022 20_imageinfo.cf
-rw-r--r-- 1 zimbra zimbra   2931 Mar 28  2022 20_mailspike.cf
-rw-r--r-- 1 zimbra zimbra   3468 Mar 28  2022 20_meta_tests.cf
-rw-r--r-- 1 zimbra zimbra   1898 Mar 28  2022 20_net_tests.cf
-rw-r--r-- 1 zimbra zimbra  15845 Mar 28  2022 20_pdfinfo.cf
-rw-r--r-- 1 zimbra zimbra   8175 Mar 28  2022 20_phrases.cf
-rw-r--r-- 1 zimbra zimbra   2080 Mar 28  2022 20_porn.cf
-rw-r--r-- 1 zimbra zimbra  16764 Mar 28  2022 20_ratware.cf
-rw-r--r-- 1 zimbra zimbra   6027 Mar 28  2022 20_uri_tests.cf
-rw-r--r-- 1 zimbra zimbra  20785 Mar 28  2022 20_vbounce.cf
-rw-r--r-- 1 zimbra zimbra   3027 Mar 28  2022 23_bayes.cf
-rw-r--r-- 1 zimbra zimbra   1565 Mar 28  2022 25_accessdb.cf
-rw-r--r-- 1 zimbra zimbra   1557 Mar 28  2022 25_antivirus.cf
-rw-r--r-- 1 zimbra zimbra   1993 Mar 28  2022 25_asn.cf
-rw-r--r-- 1 zimbra zimbra   2960 Mar 28  2022 25_dcc.cf
-rw-r--r-- 1 zimbra zimbra   5258 Mar 28  2022 25_dkim.cf
-rw-r--r-- 1 zimbra zimbra   3067 Mar 28  2022 25_dnswl.cf
-rw-r--r-- 1 zimbra zimbra   1525 Mar 28  2022 25_pyzor.cf
-rw-r--r-- 1 zimbra zimbra   3167 Mar 28  2022 25_razor2.cf
-rw-r--r-- 1 zimbra zimbra  21447 Mar 28  2022 25_replace.cf
-rw-r--r-- 1 zimbra zimbra   4418 Mar 28  2022 25_spf.cf
-rw-r--r-- 1 zimbra zimbra   1789 Mar 28  2022 25_textcat.cf
-rw-r--r-- 1 zimbra zimbra  18802 Mar 28  2022 25_uribl.cf
-rw-r--r-- 1 zimbra zimbra  27094 Mar 28  2022 30_text_de.cf
-rw-r--r-- 1 zimbra zimbra  20445 Mar 28  2022 30_text_fr.cf
-rw-r--r-- 1 zimbra zimbra   1879 Mar 28  2022 30_text_it.cf
-rw-r--r-- 1 zimbra zimbra  21499 Mar 28  2022 30_text_nl.cf
-rw-r--r-- 1 zimbra zimbra  17832 Mar 28  2022 30_text_pl.cf
-rw-r--r-- 1 zimbra zimbra  43889 Mar 28  2022 30_text_pt_br.cf
-rw-r--r-- 1 zimbra zimbra  37858 Mar 28  2022 50_scores.cf
-rw-r--r-- 1 zimbra zimbra   9358 Mar 28  2022 60_adsp_override_dkim.cf
-rw-r--r-- 1 zimbra zimbra   1337 Mar 28  2022 60_awl.cf
-rw-r--r-- 1 zimbra zimbra  16452 Mar 28  2022 60_bayes_stopwords.cf
-rw-r--r-- 1 zimbra zimbra   2328 Mar 28  2022 60_shortcircuit.cf
-rw-r--r-- 1 zimbra zimbra   1360 Mar 28  2022 60_txrep.cf
-rw-r--r-- 1 zimbra zimbra  12864 Mar 28  2022 60_whitelist.cf
-rw-r--r-- 1 zimbra zimbra  77057 Mar 28  2022 60_whitelist_auth.cf
-rw-r--r-- 1 zimbra zimbra  13104 Mar 28  2022 60_whitelist_dkim.cf
-rw-r--r-- 1 zimbra zimbra   3557 Mar 28  2022 60_whitelist_spf.cf
-rw-r--r-- 1 zimbra zimbra   1935 Mar 28  2022 60_whitelist_subject.cf
-rw-r--r-- 1 zimbra zimbra 505640 Mar 28  2022 72_active.cf
-rw-r--r-- 1 zimbra zimbra  28722 Mar 28  2022 72_scores.cf
-rw-r--r-- 1 zimbra zimbra   4217 Mar 28  2022 73_sandbox_manual_scores.cf
-rw-r--r-- 1 zimbra zimbra   1348 Mar 28  2022 MIRRORED.BY
-rw-r--r-- 1 zimbra zimbra   1497 Mar 28  2022 STATISTICS-set0-72_scores.cf.txt
-rw-r--r-- 1 zimbra zimbra   1498 Mar 28  2022 STATISTICS-set1-72_scores.cf.txt
-rw-r--r-- 1 zimbra zimbra      0 Mar 28  2022 STATISTICS-set2-72_scores.cf.txt
-rw-r--r-- 1 zimbra zimbra      0 Mar 28  2022 STATISTICS-set3-72_scores.cf.txt
-rw-r--r-- 1 zimbra zimbra   3293 Mar 28  2022 local.cf
-rw-r--r-- 1 zimbra zimbra   2771 Mar 28  2022 regression_tests.cf
-rw-r--r-- 1 zimbra zimbra   4777 Mar 28  2022 sa-update-pubkey.txt

Répertoire zimbra : common/lib/perl5/Mail/

root@mail:~ # ls -l /opt/zimbra/common/lib/perl5/Mail/
total 224
-rw-r--r--  1 root root  6779 nov.  21  2014 Address.pm
-rw-r--r--  1 root root  3797 nov.  21  2014 Address.pod
-rw-r--r--  1 root root  6320 nov.  21  2014 Cap.pm
-rw-r--r--  1 root root  3830 nov.  21  2014 Cap.pod
drwxr-xr-x  4 root root  4096 août  21  2020 DKIM
-rw-r--r--  1 root root  2295 sept.  9  2015 DKIM.pm
drwxr-xr-x  2 root root  4096 août  21  2020 Field
-rw-r--r--  1 root root  4794 nov.  21  2014 Field.pm
-rw-r--r--  1 root root  5021 nov.  21  2014 Field.pod
-rw-r--r--  1 root root  1258 nov.  21  2014 Filter.pm
-rw-r--r--  1 root root  2861 nov.  21  2014 Filter.pod
-rw-r--r--  1 root root 14550 nov.  21  2014 Header.pm
-rw-r--r--  1 root root  7910 nov.  21  2014 Header.pod
-rw-r--r--  1 root root 11994 nov.  21  2014 Internet.pm
-rw-r--r--  1 root root 10554 nov.  21  2014 Internet.pod
drwxr-xr-x  2 root root  4096 août  21  2020 Mailer
-rw-r--r--  1 root root  4803 nov.  21  2014 Mailer.pm
-rw-r--r--  1 root root  3978 nov.  21  2014 Mailer.pod
-rw-r--r--  1 root root  1154 nov.  21  2014 Send.pm
-rw-r--r--  1 root root  2868 nov.  21  2014 Send.pod
drwxr-xr-x 10 root root  4096 déc.  29 13:40 SpamAssassin
-rw-r--r--  1 root root 71352 avril  9  2021 SpamAssassin.pm
drwxr-xr-x  6 root root  4096 août  21  2020 SPF
-rw-r--r--  1 root root  2369 sept.  9  2015 SPF.pm
-rw-r--r--  1 root root  3211 nov.  21  2014 Util.pm
-rw-r--r--  1 root root  3159 nov.  21  2014 Util.pod

root@mail:~ # ls -l /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/
total 872
-rw-r--r-- 1 root root   5738 avril  9  2021 AICache.pm
-rw-r--r-- 1 root root  34898 avril  9  2021 ArchiveIterator.pm
-rw-r--r-- 1 root root  24125 avril  9  2021 AsyncLoop.pm
-rw-r--r-- 1 root root  10126 avril  9  2021 AutoWhitelist.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Bayes
-rw-r--r-- 1 root root   4933 avril  9  2021 Bayes.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 BayesStore
-rw-r--r-- 1 root root  23520 avril  9  2021 BayesStore.pm
-rw-r--r-- 1 root root  13692 avril  9  2021 Client.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Conf
-rw-r--r-- 1 root root 170607 déc.  29 13:40 Conf.pm
-rw-r--r-- 1 root root  14170 avril  9  2021 Constants.pm
-rw-r--r-- 1 root root   5345 avril  9  2021 DBBasedAddrList.pm
-rw-r--r-- 1 root root  22336 avril  9  2021 Dns.pm
-rw-r--r-- 1 root root  34630 avril  9  2021 DnsResolver.pm
-rw-r--r-- 1 root root  27215 déc.  28 20:38 GeoDB.pm
-rw-r--r-- 1 root root  35087 avril  9  2021 HTML.pm
-rw-r--r-- 1 root root   4178 avril  9  2021 Locales.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Locker
-rw-r--r-- 1 root root   2159 avril  9  2021 Locker.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Logger
-rw-r--r-- 1 root root  11402 avril  9  2021 Logger.pm
-rw-r--r-- 1 root root   5258 avril  9  2021 MailingList.pm
drwxr-xr-x 3 root root   4096 juin  22  2022 Message
-rw-r--r-- 1 root root  44523 avril  9  2021 Message.pm
-rw-r--r-- 1 root root  10734 avril  9  2021 NetSet.pm
-rw-r--r-- 1 root root   5023 avril  9  2021 PerMsgLearner.pm
-rw-r--r-- 1 root root 109677 avril  9  2021 PerMsgStatus.pm
-rw-r--r-- 1 root root   4368 avril  9  2021 PersistentAddrList.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Plugin
-rw-r--r-- 1 root root   7390 avril  9  2021 PluginHandler.pm
-rw-r--r-- 1 root root  31616 avril  9  2021 Plugin.pm
-rw-r--r-- 1 root root   7998 avril  9  2021 RegistryBoundaries.pm
-rw-r--r-- 1 root root   3117 avril  9  2021 Reporter.pm
-rw-r--r-- 1 root root  27882 avril  9  2021 SpamdForkScaling.pm
-rw-r--r-- 1 root root  13532 avril  9  2021 SQLBasedAddrList.pm
-rw-r--r-- 1 root root   4553 avril  9  2021 SubProcBackChannel.pm
-rw-r--r-- 1 root root  10657 avril  9  2021 Timeout.pm
drwxr-xr-x 2 root root   4096 juin  22  2022 Util
-rw-r--r-- 1 root root  67188 avril  9  2021 Util.pm

Et l’archive décompressé de Mail-SpamAssassin-4.0.0.tar.gz récupérer sur CPAN → metacpan.org.

root@mail:~ # ls -l Mail-SpamAssassin-4.0.0/rules/
total 256
-rw-r--r-- 1 orj orj  36870 déc.  14 07:03 20_aux_tlds.cf
-rw-r--r-- 1 orj orj  23305 déc.  14 07:03 active.list
-rw-r--r-- 1 orj orj   1649 déc.  14 07:03 init.pre
-rw-r--r-- 1 orj orj 133600 déc.  14 07:03 languages
-rw-r--r-- 1 orj orj   3218 déc.  14 07:03 local.cf
-rw-r--r-- 1 orj orj   2771 déc.  14 07:03 regression_tests.cf
-rw-r--r-- 1 orj orj   4777 déc.  14 07:03 sa-update-pubkey.txt
-rw-r--r-- 1 orj orj   1912 déc.  14 07:03 user_prefs.template
-rw-r--r-- 1 orj orj   2263 déc.  14 07:03 v310.pre
-rw-r--r-- 1 orj orj   1168 déc.  14 07:03 v312.pre
-rw-r--r-- 1 orj orj   2416 déc.  14 07:03 v320.pre
-rw-r--r-- 1 orj orj   1237 déc.  14 07:03 v330.pre
-rw-r--r-- 1 orj orj   1020 déc.  14 07:03 v340.pre
-rw-r--r-- 1 orj orj   1315 déc.  14 07:03 v341.pre
-rw-r--r-- 1 orj orj   1475 déc.  14 07:03 v342.pre
-rw-r--r-- 1 orj orj   1266 déc.  14 07:03 v343.pre
-rw-r--r-- 1 orj orj   1482 déc.  14 07:03 v400.pre

root@mail:~ # ls -l Mail-SpamAssassin-4.0.0/lib/Mail/SpamAssassin/
total 940
-rw-r--r-- 1 orj orj   5738 déc.  14 07:03 AICache.pm
-rw-r--r-- 1 orj orj  38153 déc.  14 07:03 ArchiveIterator.pm
-rw-r--r-- 1 orj orj  28204 déc.  14 07:03 AsyncLoop.pm
-rw-r--r-- 1 orj orj  10153 déc.  14 07:03 AutoWelcomelist.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Bayes
-rw-r--r-- 1 orj orj   4935 déc.  14 07:03 Bayes.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 BayesStore
-rw-r--r-- 1 orj orj  23520 déc.  14 07:03 BayesStore.pm
-rw-r--r-- 1 orj orj  14622 déc.  14 07:03 Client.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Conf
-rw-r--r-- 1 orj orj 186864 déc.  14 07:03 Conf.pm
-rw-r--r-- 1 orj orj  14341 déc.  14 07:03 Constants.pm
-rw-r--r-- 1 orj orj   5377 déc.  14 07:03 DBBasedAddrList.pm
-rw-r--r-- 1 orj orj  22730 déc.  14 07:03 Dns.pm
-rw-r--r-- 1 orj orj  36217 déc.  14 07:03 DnsResolver.pm
-rw-r--r-- 1 orj orj  27215 déc.  14 07:03 GeoDB.pm
-rw-r--r-- 1 orj orj  35790 déc.  14 07:03 HTML.pm
-rw-r--r-- 1 orj orj   4081 déc.  14 07:03 Locales.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Locker
-rw-r--r-- 1 orj orj   2253 déc.  14 07:03 Locker.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Logger
-rw-r--r-- 1 orj orj  12553 déc.  14 07:03 Logger.pm
-rw-r--r-- 1 orj orj   5258 déc.  14 07:03 MailingList.pm
drwxr-xr-x 3 orj orj   4096 déc.  14 07:06 Message
-rw-r--r-- 1 orj orj  47763 déc.  14 07:03 Message.pm
-rw-r--r-- 1 orj orj  11987 déc.  14 07:03 NetSet.pm
-rw-r--r-- 1 orj orj   5033 déc.  14 07:03 PerMsgLearner.pm
-rw-r--r-- 1 orj orj 121113 déc.  14 07:03 PerMsgStatus.pm
-rw-r--r-- 1 orj orj   4384 déc.  14 07:03 PersistentAddrList.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Plugin
-rw-r--r-- 1 orj orj   7575 déc.  14 07:03 PluginHandler.pm
-rw-r--r-- 1 orj orj  33377 déc.  14 07:03 Plugin.pm
-rw-r--r-- 1 orj orj   8870 déc.  14 07:03 RegistryBoundaries.pm
-rw-r--r-- 1 orj orj   3117 déc.  14 07:03 Reporter.pm
-rw-r--r-- 1 orj orj  28055 déc.  14 07:03 SpamdForkScaling.pm
-rw-r--r-- 1 orj orj  15151 déc.  14 07:03 SQLBasedAddrList.pm
-rw-r--r-- 1 orj orj   4553 déc.  14 07:03 SubProcBackChannel.pm
-rw-r--r-- 1 orj orj  10657 déc.  14 07:03 Timeout.pm
drwxr-xr-x 2 orj orj   4096 déc.  14 07:06 Util
-rw-r--r-- 1 orj orj  88214 déc.  14 07:03 Util.pm

Il doit y avoir (peut-être) une commande zimbra pour modifier la configuration de SpamAssassin mais je ne trouve rien de pertinent sur le Web.

J’ajoute ces liens pour complément d’informations :

  1. Improving Anti-spam system - Zimbra :: Tech Center
  2. Anti-spam Strategies - Zimbra :: Tech Center
  3. SpamAssassin | Zimbra – Zextras Community
  4. ZCS::LocalConfig - Perl module for the Zimbra Collaboration Suite (ZCS) Local…

J’ai posté ce même message sur le forum de zimbra :wink:
Qui m’explique comment ajouter un module Perl à zimbra et un plugin à SpamAssassin de zimbra ?

Romain

J’ai peut-être un piste :slight_smile: À vos humbles avis ?

root utilisateur :

root@mail:~ # env | grep PERL
root@mail:~ # 

root@mail:~ # perl -V
[.....]
Compiled at Oct  5 2022 10:49:22
  @INC:
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
    /usr/local/share/perl/5.26.1
    /usr/lib/x86_64-linux-gnu/perl5/5.26
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.26
    /usr/share/perl/5.26
    /usr/local/lib/site_perl
    /usr/lib/x86_64-linux-gnu/perl-base

zimbra utilisateur :

root@mail:~ # su - zimbra -c "env | grep PERL"
PERL5LIB=/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5
PERLLIB=/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5

root@mail:~ # su - zimbra -c "perl -V"
[.....]
Compiled at Oct  5 2022 10:49:22
  %ENV:
    PERL5LIB="/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5"
    PERLLIB="/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5"
  @INC:
    /opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi
    /opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi
    /opt/zimbra/common/lib/perl5
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
    /usr/local/share/perl/5.26.1
    /usr/lib/x86_64-linux-gnu/perl5/5.26
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.26
    /usr/share/perl/5.26
    /usr/local/lib/site_perl
    /usr/lib/x86_64-linux-gnu/perl-base

Il doit falloir que j’installe avec une option « PREFIX= » ou depuis le « shell perl » avec un « INSTALL_BASE= »

Sur root j’export les variables d’environnements pour lancer la commande depuis l’utilisateur « root » ?
Ou, est-ce que j’essaie depuis l’utilisateur « zimbra » ?

Infos Perl Installation autre répertoire par default :

On va bien voir.

:slight_smile:

Bonjour.

Note de Moi-même → J’ai changé le contenu de ce message (c’est plus clair comme cela) :slight_smile:

Je n’arrive toujours pas à ajouter un module « perl » au répertoire de zimbra - > par exemple MaxMind::DB::Reader

Dans ce répertoire :

ls -l /opt/zimbra/common/lib/perl5/

:confused:

Qui sait comment-faire !?


Après avoir ajouté dans le fichier d’initialisation de SpamAssassin :

/opt/zimbra/data/spamassassin/localrules/init.pre

[...]
loadplugin Mail::SpamAssassin::Plugin::RelayCountry
loadplugin Mail::SpamAssassin::Plugin::Phishing
loadplugin Mail::SpamAssassin::Plugin::PDFInfo
loadplugin Mail::SpamAssassin::Plugin::Test

En regardant les logs de zimbra au redémarage de amavis :

zimbra@mail:~ $ zmamavisdctl restart
Stopping amavisd... done.
Stopping amavisd-mc... done.
Starting amavisd-mc...done.
Starting amavisd...done.

Je vois bien :

zimbra@mail:~ $ tail -f /var/log/zimbra.log
[.....]
Dec 31 14:55:33 mail amavis[8049]: extra modules loaded after 
daemonizing/chrooting: /etc/perl/Net/libnet.cfg, 
/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/autosplit.ix,
/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Net/SSLeay/randomize.al,
Geo/IP.pm, Geo/IP/Record.pm, 
IO/Socket/SSL.pm, IO/Socket/SSL/PublicSuffix.pm, 
IP/Country/Fast.pm, 
Mail/SpamAssassin/Plugin/FreeMail.pm, 
Mail/SpamAssassin/Plugin/PDFInfo.pm, 
Mail/SpamAssassin/Plugin/Phishing.pm, 
Mail/SpamAssassin/Plugin/SpamCop.pm, 
Mail/SpamAssassin/Plugin/Test.pm, 
Net/Cmd.pm, Net/Config.pm, Net/SMTP.pm, Net/SSLeay.pm

J’ai bien (réussis à ajouter) :

Geo/IP.pm
Geo/IP/Record.pm
IP/Country/Fast.pm
Mail/SpamAssassin/Plugin/Phishing.pm
Mail/SpamAssassin/Plugin/Test.pm
Mail/SpamAssassin/Plugin/PDFInfo.pm

Mais je ne vois pas :

Mail/SpamAssassin/Plugin/RelayCountry.pm

Parce que j’aimerai bien installer à la config de « zimbra <> perl » :

Mail::DMARC

Sûrement après avoir installer le plugin Mail::SpamAssassin::Plugin::DMARC et activer dmarc_save_reports ( 0 | 1 ) (default: 0)

Store DMARC reports using ¿¿ Mail::DMARC::Store ?? , mail-dmarc.ini must be configured to save and send DMARC reports.

Pour avoir à mon tour et envoyer des rapports DMARC des usurpateurs d’autres serveurs de mail.

Par exemple :

Mail::DMARC::Report
Mail::DMARC::Report::Aggregate
Mail::DMARC::Report::Send
Mail::DMARC::Report::Store

Je vois dans les logs /var/log/zimbra.log :

[.......]
Dec 31 14:55:31 mail amavis[8049]: Module Mail::DKIM::Signer  0.43
Dec 31 14:55:31 mail amavis[8049]: Module Mail::DKIM::Verifier 0.43
Dec 31 14:55:31 mail amavis[8049]: Module Mail::Header        2.14
Dec 31 14:55:31 mail amavis[8049]: Module Mail::Internet      2.14
Dec 31 14:55:31 mail amavis[8049]: Module Mail::SPF           v2.009
Dec 31 14:55:31 mail amavis[8049]: Module Mail::SpamAssassin  3.004006
[.......]

Bonne journée.

Romain

Bonjour, bonsoir.

Quelqu’un aurait essayé et fait un tuto sur çà - Ce serait un grand « kiff » pour moi :smiley:

Pour se remémorer le sujet → Installer Zimbra MTA OenSource ; et ajouter la protection (anti-phishing des autres Mails senders) Mail-DMARC au Perl de Zimbra ?

Je pense dans ce répertoire :

zimbra@mail:~ $ ls -l /opt/zimbra/bin/
zimbra@mail:~ $ ls -l /opt/zimbra/common/lib/perl5/
zimbra@mail:~ $ ls -l /opt/zimbra/common/lib/perl5/Mail/
zimbra@mail:~ $ ls -l /opt/zimbra/common/lib/perl5/Mail/SpamAssassin/

ici :

zimbra@mail:~ $ ls -l /opt/zimbra/common/lib/perl5/Mail/DMARC/

J’ai ouvert ce sujet dans ce but (en fait) : Install Perl no-standard directory :slight_smile:

CF :

zimbra@mail:~ $ perl -V
[....]
Built under linux
  Compiled at Oct  5 2022 10:49:22
  %ENV:
    PERL5LIB="/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5"
    PERLLIB="/opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi:/opt/zimbra/common/lib/perl5"
  @INC:
    /opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi
    /opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi
    /opt/zimbra/common/lib/perl5
    /etc/perl
    /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
    /usr/local/share/perl/5.26.1
    /usr/lib/x86_64-linux-gnu/perl5/5.26
    /usr/share/perl5
    /usr/lib/x86_64-linux-gnu/perl/5.26
    /usr/share/perl/5.26
    /usr/local/lib/site_perl
    /usr/lib/x86_64-linux-gnu/perl-base

Et, si je faisais un « petit » cpan -i Mail::DMARC depuis mon user zimbra ^^ vous croyez que je vais tout casser !?

Merci.

En vous souhaitant un bonne soirée.

Romain.

Bonsoir,

Bon j’ai essayé (j’ai installé un nouveau serveur Zimbra MTA OpenSource pour ces tests), mais je n’y arrive pas - J’ai quelques dépendances aux modules Perl Mail-DMARC qui ne se compilent pas.

Déjà en premier, à mon /opt/zimbra/.bashrc

Il y a donc :

[...]
eval `/usr/bin/perl -V:archname`
PERLLIB=/opt/zimbra/common/lib/perl5/$archname:/opt/zimbra/common/lib/perl5
export PERLLIB

PERL5LIB=$PERLLIB
export PERL5LIB
[...]

Bonne configuration à ajouter au fichier .bashrc (modification dimanche 4 juin 2023 à 19h GMT+2) :

PERL_LOCAL_LIB_ROOT=$PERL5LIB; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/opt/zimbra/common\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/opt/zimbra/common"; export PERL_MM_OPT;

Dependencies à Mail-DMARC-1.20230215

Carp
Config::Tiny
DBD::SQLite
DBIx::Simple
Data::Dumper
Email::MIME
Email::Sender
Email::Sender::Simple
Email::Simple
Encode
English
File::ShareDir
Getopt::Long
HTTP::Tiny
IO::Compress::Gzip
IO::Compress::Zip
IO::File
IO::Socket::SSL
IO::Uncompress::Gunzip
IO::Uncompress::Unzip
Net::DNS::Resolver
Net::IDN::Encode
Net::IP
Net::SSLeay
POSIX
Pod::Usage
Regexp::Common
Socket
Socket6
Sys::Hostname
Sys::Syslog
Test::File::ShareDir
URI
XML::LibXML

De plus, sur les modules Perl par exemple :

cpan -i IO::Compress::Gzip --> Error:  Compress::Raw::Zlib version 2.204 required--this is only version 2.103 at /opt/zimbra/.cpan/build/IO-Compress-2.204-0/blib/lib/Compress/Zlib.pm line 11
cpan -i IO::Compress::Zip --> Error:  Compress::Raw::Zlib version 2.204 required--this is only version 2.103 at /opt/zimbra/.cpan/build/IO-Compress-2.204-1/blib/lib/Compress/Zlib.pm line 11.
cpan -i IO::Uncompress::Gunzip --> Error:  Compress::Raw::Zlib version 2.204 required--this is only version 2.103 at /opt/zimbra/.cpan/build/IO-Compress-2.204-2/blib/lib/Compress/Zlib.pm line 11.
cpan -i IO::Uncompress::Unzip --> Error:  Compress::Raw::Zlib version 2.204 required--this is only version 2.103 at /opt/zimbra/.cpan/build/IO-Compress-2.204-2/blib/lib/Compress/Zlib.pm line 11.

J’ai une version trop ancienne.

La version de Perl est :

zimbra@mail:~ # which perl
/usr/bin/perl
zimbra@mail:~ # perl -v
This is perl 5, version 30, subversion 0 (v5.30.0) built for x86_64-linux-gnu-thread-multi
(with 57 registered patches, see perl -V for more detail)

Copyright 1987-2019, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

J’ai stoppé le serveur Zimbra et mis les répertoires les droits à l’utilisateur « zimbra » :

/etc/init.d/zimbra stop
chown -R zimbra:zimbra /opt/zimbra

Pour remettre les bons droits/users → Fix the Zimbra Collaboration Permissions :

/opt/zimbra/libexec/zmfixperms

Pour compiler sans erreur :

apt install make build-essential gcc

Cà permet d’installer les modules par exemple :

Installing /opt/zimbra/common/lib/perl5/lib/perl5/Perl/Tidy.pod
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Perl/Tidy.pm

Si une âme charitable veut essayer avec « moi » :slight_smile:

Liste de mon répertoire /opt/zimbra/common/lib/perl5/ :

zimbra@mail:~ # ls -l /opt/zimbra/common/lib/perl5/
total 344
drwxr-xr-x 47 zimbra zimbra  4096 May 30 16:36 ./
drwxr-xr-x 13 zimbra zimbra  4096 May 29 17:19 ../
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:18 Apache/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Archive/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:18 Bundle/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Canary/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Carp/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Class/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Compress/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Config/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Convert/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Crypt/
drwxr-xr-x  6 zimbra zimbra  4096 May 29 17:17 Date/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Digest/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Email/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Encode/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Error/
-rw-r--r--  1 zimbra zimbra 24872 May 30  2015 Error.pm
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Exporter/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 File/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Geography/
drwxr-xr-x  5 zimbra zimbra  4096 May 29 17:17 HTTP/
drwxr-xr-x  5 zimbra zimbra  4096 May 29 17:17 IO/
drwxr-xr-x  4 zimbra zimbra  4096 May 29 17:17 IP/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 JSON/
drwxr-xr-x  4 zimbra zimbra  4096 May 29 17:17 LWP/
-rw-r--r--  1 zimbra zimbra 21658 Feb 14  2015 LWP.pm
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 List/
drwxr-xr-x  5 zimbra zimbra  4096 May 29 17:18 MIME/
drwxr-xr-x  7 zimbra zimbra  4096 May 29 17:18 Mail/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Math/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:18 MojoX/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 Mozilla/
drwxr-xr-x  7 zimbra zimbra  4096 May 29 17:18 Net/
-rw-r--r--  1 zimbra zimbra  5045 Jan 19  2009 RRDp.pm
drwxr-xr-x  4 zimbra zimbra  4096 May 29 17:18 SOAP/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:18 Swatchdog/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:18 Task/
drwxr-xr-x  2 zimbra zimbra  4096 May 29 17:17 Time/
drwxr-xr-x  4 zimbra zimbra  4096 May 29 17:17 URI/
-rw-r--r--  1 zimbra zimbra 34595 Jul  7  2015 URI.pm
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 WWW/
drwxr-xr-x  5 zimbra zimbra  4096 May 29 17:18 XML/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:17 ZMQ/
drwxrwxr-x  6 zimbra zimbra  4096 May 29 17:19 Zimbra/
drwxr-xr-x  3 zimbra zimbra  4096 May 29 17:18 auto/
drwxr-x---  2 zimbra zimbra  4096 May 30 20:05 bin/
drwxrwxr-x  3 zimbra zimbra  4096 May 30 12:44 lib/
-rw-r--r--  1 zimbra zimbra  9265 Feb 10  2015 lwpcook.pod
-rw-r--r--  1 zimbra zimbra 25481 Feb 10  2015 lwptut.pod
drwxrwxr-x  4 zimbra zimbra  4096 May 30 12:45 man/
-rw-r--r--  1 zimbra zimbra  2592 May 27  2015 parent.pm
drwxrwxr-x  3 zimbra zimbra  4096 May 30 16:36 share/
-rw-r--r--  1 zimbra zimbra 12575 Apr  9  2021 spamassassin-run.pod
drwxr-xr-x 28 zimbra zimbra  4096 May 29 17:18 x86_64-linux-gnu-thread-multi/

zimbra@mail:~ # ls -l /opt/zimbra/common/lib/perl5/x86_64-linux-gnu-thread-multi/
total 788
drwxr-xr-x 28 zimbra zimbra   4096 May 29 17:18 ./
drwxr-xr-x 47 zimbra zimbra   4096 May 30 16:36 ../
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 BerkeleyDB/
-rw-r--r--  1 zimbra zimbra  42633 Feb 22  2015 BerkeleyDB.pm
-rw-r--r--  1 zimbra zimbra  81452 Feb 22  2015 BerkeleyDB.pod
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 Bit/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 Bundle/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Cache/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 Compress/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Convert/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 Crypt/
drwxr-xr-x  6 zimbra zimbra   4096 May 29 17:17 DBD/
drwxr-xr-x  8 zimbra zimbra   4096 May 29 17:17 DBI/
-rw-r--r--  1 zimbra zimbra 316207 Aug  3  2015 DBI.pm
-rwxr-xr-x  1 zimbra zimbra  63732 Sep  9  2015 DB_File.pm*
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Data/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Digest/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 Encode/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 File/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Filesys/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 HTML/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:18 Net/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:17 NetAddr/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:16 NetSNMP/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:18 Proc/
-rw-r--r--  1 zimbra zimbra   3847 Jan 19  2009 RRDs.pm
-rw-r--r--  1 zimbra zimbra  80070 Jul 16  2018 SNMP.pm
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:18 Socket/
-rw-r--r--  1 zimbra zimbra  36405 May  2  2015 Socket.pm
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Term/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:18 Unix/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 Win32/
drwxr-xr-x  3 zimbra zimbra   4096 May 29 17:18 XML/
drwxr-xr-x  2 zimbra zimbra   4096 May 29 17:17 ZMQ/
drwxr-xr-x 33 zimbra zimbra   4096 May 29 17:18 auto/
-rw-r--r--  1 zimbra zimbra   1533 Apr  5  2013 dbixs_rev.pl
-rwxr-xr-x  1 zimbra zimbra  37825 Mar 30  2014 mkconsts.pl*
-rw-r--r--  1 zimbra zimbra   1212 Jan 19  2009 ntmake.pl
-rw-r--r--  1 zimbra zimbra   5799 Mar 24  2013 scan.pl
zimbra@mail:~ #

J’ai fais un upgrade des modules Perl avec la commande : cpan > upgrade (ou celle-ci : perl -MCPAN -e 'upgrade') → la mise à jour a durée quelques heures.

C’est tout pour le moment.

Je vais voir si en installant la dernière version de perl5, la perl5.36.1 si çà fonctionne mieux.

Salutations,
Romain

Bonne soirée, journée.

PS : Je vous ajoute ce tuto que j’ai « écris y’a plus de 10ans » – vous vous en sortirez avec (j’ai modifié 2.3 lignes à l’instant) :wink:Installation de Zimbra - De plus j’ajoute qu’il faut bien configurer son /etc/hosts avec le bon FQDN et son DNS.

A t’obstiné tu va tous cassé, tu vois bien que les version core venant avec l’installation de Zimbra ne sont pas assez à jour.

Pour ce genre de cas très spécifique c’est sur un forum spécialisé sur Zimbra que tu aura les meilleur retour.

De ce que j’ai vue ça tient plus du monologue, repose ta question plus simplement sur leur forum, sans mettre tout un tas d’information ou de smiley.

Mais non :smiley:

Oui, merci @Clochette je vais reposer la question :wink:
C’était un copié / collé de ce (sujet) monologue :woozy_face: mais en anglais.

Je vais essayé quand même de mettre à jour la version de Perl, avant. Je viens d’installé une VM pour çà :slight_smile:

Bon soir, bonne journée messieurs, mesdames.

Merci encore monsieur, @Clochette :slight_smile:

Si çà peut vous intéresser, j’ai ouvert ce fil sur le forum dédié à Zimbra.

Romain.

Bonjour,

Suite à ces erreurs :

J’ai réussis à passer en version 2.204.

Pour cela, j’ai installé les modules depuis la compte utilisateur « root ».

Comme cela :

root@mail:~ # cpan -i IO::Compress::Gzip

Çà a permit de passer en CPAN.pm v2.36 anciennement v2.22 :smiley:

Je fais un upgrade depuis le compte « root ».

root@mail:~ # perl -MCPAN -e 'upgrade'

pour mettre à jour tous les modules - Et j’installerai les dépendances dans le système (et non pas depuis l’utilisateurs « zimbra »)

Puis j’installerais seulement Mail::DMARC depuis l’utilisateur « zimbra » – je vous tiens au jus.


PS : C’est toujours moins risqué que d’installer les sources perl5.36.1 par dessus le Perl su système.

Romain

J’y suis presque :smiley:

J’ai installé tous les modules dépendants sauf 1 – haha.

XML::LibXML → vérifier les dépendances sûrement :smiley:

J’ai, pourtant, installé :

apt search XML::LibXML
apt install libxml2-dev zlib1g-dev libxml-simple-perl libxml-libxml-simple-perl libxml-libxml-perl libxml-libxml-iterator-perl libxml-libxml-debugging-perl libxml-simpleobject-libxml-perl libxml-libxml-lazybuilder-perl libxml-hash-lx-perl libxml-dom-xpath-perl libxml-rss-libxml-perl

Pour information pour installer les modules Net::SSLeay et IO::Socket::SSL

apt-cache search Net::SSLeay
apt install libssl-dev perl-openssl-defaults ibcrypt-ssleay-perl libpoe-filter-ssl-perl libio-socket-ssl-perl

:slight_smile:

j’vais au café - citoyen voir si y’a un Task Force … à faire :slight_smile:

À plustard.

Bonjour,

Comme je le disais dans mon précédent message, je n’arrive pas à installer le module XML::LibXML → Je pense qu’il faut installer les dépendances :smiley:

Suite à ce type « d’erreurs » (à la place de forcer l’installe du module).

root@mail:~ # cpan -i warnings
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/root/.cpan/Metadata'
  Database was generated on Sun, 04 Jun 2023 11:29:02 GMT
Running install for module 'warnings'
The most recent version "1.58" of the module "warnings"
is part of the perl-5.36.1 distribution. To install that, you need to run
  force install warnings   --or--
  install SHAY/perl-5.36.1.tar.gz

Qui peut me donner une solution simple pour installer la version 5.36.1 de Perl sur la version du système 5.30.0 ?

Grand merci.

Romain.


Note de Moi-même 17h15 GMT+2 :

Bon, j’ai fais un force sur un des modules et çà compile « perl-5.36.1-0 » → j’ai laissé les valeurs par default sauf le prefix d’installe que j’ai configuré dans /usr à la place de /usr/local (comme la valeur par default, bien que selon mon installation du résultat de la commande perl -V me retourne -Dprefix=/usr dans la variable « config_args= »)

Je ne sais pas si cela va fonctionner. Je verrais bien.

Bon çà fonctionne :

[.......]
SHAY/perl-5.36.1.tar.gz
  /usr/bin/make install  -- OK
root@mail:/home/orj #
root@mail:/home/orj # which perl
/usr/bin/perl
17:29:18 root@mail:/home/orj # perl -v

This is perl 5, version 36, subversion 1 (v5.36.1) built for x86_64-linux

Copyright 1987-2023, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

Je penserai faire, dans un autre essai, ou conseillerait peut-être :wink: :

Installer une machine (donc avec un ancien perl style la version 5.30.0), installer la dernière version, par exemple la 5.36.1 depuis les sources, puis installer Zimbra – ce sera plus simple – pour avoir une version « stable » de zimbra – pour installer enfin le module Perl Mail::DMARC.

Salutations,
Romain

J’ai réussi à installer Mail::DMARC depuis l’utilisateur « root » – qui me l’a installé par ici :

root@mail:/home/orj # cpan -i Mail::DMARC
[.....]
Result: PASS
  MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
  ./Build test -- OK
Running Build install for MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
Building Mail-DMARC
[.....]
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Base.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Policy.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/HTTP.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/PurePerl.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/ConfigData.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Result.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Result/Reason.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Test/Transport.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Sender.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Receive.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/URI.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Store.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Send.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Send/HTTP.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Send/SMTP.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Store/SQL.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Metadata.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Row.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm
Installing /usr/lib/perl5/site_perl/5.36.1/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm
Installing /usr/share/man/man3/Mail::DMARC::Result.3
[.....]
Installing /usr/share/man/man3/Mail::DMARC::Report::Receive.3
Installing /usr/bin/dmarc_view_reports
Installing /usr/bin/dmarc_receive
Installing /usr/bin/dmarc_send_reports
Installing /usr/bin/dmarc_lookup
Installing /usr/bin/dmarc_update_public_suffix_list
Installing /usr/bin/dmarc_httpd
Installing /usr/bin/dmarc_http_client
  MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
  ./Build install  -- OK
root@mail:/home/orj #

Par contre depuis l’utilisateur « Zimbra » rien dans l’arborescence Mail::DMARC ce qui est normal.

zimbra@mail:~ # cpan -i Mail::DMARC
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/opt/zimbra/.cpan/Metadata'
  Database was generated on Sun, 04 Jun 2023 11:29:02 GMT
Mail::DMARC is up to date (1.20230215).
zimbra@mail:~ #

Je viens de désinstaller Mail::DMARC de « root » et donc est relancé l’installation du module depuis l’utilisateur « zimbra ».

Et çà m’a foutu le bordel – cela doit être ma configuration de :

%ENV:
    PERL5LIB="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERLLIB="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERL_LOCAL_LIB_ROOT="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERL_MB_OPT="--install_base "/opt/zimbra/common/lib/perl5"
    PERL_MM_OPT="INSTALL_BASE=/opt/zimbra/common/lib/perl5"

Qui doit falloir configurer comme cela (je me suis trompé – J’ai modifié mon commentaire 12 sur les variables PERL_MB_OPT et PERL_MM_OPT à ajouter au .bashrc) :

%ENV:
    PERL5LIB="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERLLIB="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERL_LOCAL_LIB_ROOT="/opt/zimbra/common/lib/perl5/x86_64-linux:/opt/zimbra/common/lib/perl5"
    PERL_MB_OPT="--install_base "/opt/zimbra/common"
    PERL_MM_OPT="INSTALL_BASE=/opt/zimbra/common"

Ci-dessous les « logs » de l’installation depuis l’utilisateur « zimbra » :

zimbra@mail:~ # cpan -i Mail::DMARC
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/opt/zimbra/.cpan/Metadata'
  Database was generated on Sun, 04 Jun 2023 11:29:02 GMT
Running install for module 'Mail::DMARC'
Checksum for /opt/zimbra/.cpan/sources/authors/id/M/MB/MBRADSHAW/Mail-DMARC-1.20230215.tar.gz ok
Configuring M/MB/MBRADSHAW/Mail-DMARC-1.20230215.tar.gz with Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Mail-DMARC' version '1.20230215'
  MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- OK
Running Build for M/MB/MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
Building Mail-DMARC
  MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
  ./Build -- OK
Running Build test for MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
t/00.Dmarc.t ................................. ok
t/01.Policy.t ................................ ok
t/03.Base.t .................................. ok
t/04.PurePerl.t .............................. ok
t/06.Result.t ................................ ok
t/09.HTTP.t .................................. skipped: CGI not available
t/10.Report.t ................................ ok
t/11.Report.Store.t .......................... ok
t/12.Report.Store.SQL.t ...................... ok
t/13.Report.Aggregate.t ...................... ok
t/14.Report.Aggregate.Metadata.t ............. ok
t/15.Report.Aggregate.Record.t ............... ok
t/16.Report.Aggregate.Record.Auth_Results.t .. ok
t/17.Report.Aggregate.Schema.t ............... skipped: XML::Validator::Schema not available
t/20.Report.URI.t ............................ ok
t/21.Report.Send.t ........................... ok
t/22.Report.Send.SMTP.t ...................... ok
t/23.Report.Send.HTTP.t ...................... ok
t/25.Report.Receive.t ........................ ok
t/26.Report.Sender.t ......................... ok
All tests successful.
Files=20, Tests=709, 486 wallclock secs ( 0.15 usr  0.05 sys +  8.04 cusr  2.32 csys = 10.56 CPU)
Result: PASS
  MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
  ./Build test -- OK
Running Build install for MBRADSHAW/Mail-DMARC-1.20230215.tar.gz
Building Mail-DMARC
[......]
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Base.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Policy.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/HTTP.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/PurePerl.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/ConfigData.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Result.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Result/Reason.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Test/Transport.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Sender.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Receive.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/URI.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Store.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Send.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Send/HTTP.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Send/SMTP.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Store/SQL.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Store/SQL/Grammars/MySQL.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Store/SQL/Grammars/SQLite.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Store/SQL/Grammars/PostgreSQL.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Metadata.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Auth_Results.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Row.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Identifiers.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Row/Policy_Evaluated.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Auth_Results/SPF.pm
Installing /opt/zimbra/common/lib/perl5/lib/perl5/Mail/DMARC/Report/Aggregate/Record/Auth_Results/DKIM.pm
Installing /opt/zimbra/common/lib/perl5/man/man3/Mail::DMARC::Result.3
Installing /opt/zimbra/common/lib/perl5/man/man3/Mail::DMARC::Report::Aggregate::Record::Auth_Results.3
[.......]
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_view_reports
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_receive
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_send_reports
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_lookup
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_update_public_suffix_list
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_httpd
Installing /opt/zimbra/common/lib/perl5/bin/dmarc_http_client

Donc, j’y suis presque.

:wink:

En plus, comme m’a fait penser un utilisateur, JDunphy du forum Zimbra sur le sujet, il va falloir modifier les fichiers de configuration Mail::DMARC à la main.

Ils n’ont rien de prévu dans Zimbra (via l’admin (7071)) pour le module Perl Mail::DMARC.

J’ai peut-être une idée → c’est le module « TEST » de SpamAssassin … ou peut-être il faudra ajouter une ligne de type :

my $result = $dmarc->validate();

Je dois dire des « anneries » – il y a bien un plugin DMARC à SpamAssassin – on pourrait se servir de celui-ci :confused: C’est surement plus approprié :slight_smile:

Le module TEST de SpamAssassin par exemple écrit TEST_PLUGIN=1 dans la source des mails recus :

X-Spam-Status: No, score=3.986 required=6.6 tests=[ALL_TRUSTED=-1,
	BAYES_40=-0.001, FROM_ADDR_WS=2.996, PP_MIME_FAKE_ASCII_TEXT=1,
	T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, TEST_PLUGIN=1]

Et envoyer les mails de rapports de bonne conformité et de non conformité DMARC aux serveurs mails envoyeurs.

Avez-vous une idée vous, mesdames, messieurs spécialistes/développeurs/administrateurs de Zimbra :slight_smile:

Je vous/les laisse nous concocter quelque chose de rapide :slight_smile: Ne m’oubliez pas :stuck_out_tongue:

Comment pensez-vous que l’on puisse faire interagir Mail::DMARC avec Zimbra, pour ceux ou celles qui connaissent ?

Romain