Table des matières
- 2026:
- 2025:
1 billet(s) pour avril 2026
| Notes ping ICMP | 2026/04/03 23:01 | Jean-Baptiste |
Installation de SpamAssassin avec CPAN
Voir aussi :
- Bogofilter
-
Méthode 1
apt-get install spampd
Change ENABLED to 1 in /etc/default/spamassassin
http://guillaumevincent.com/2015/01/31/OpenSMTPD-Dovecot-SpamAssassin.html
Méthode 2
Manip à faire en tant que root
Install des bibliothèques nécessaires
apt-get install --no-install-recommends gcc make libc6-dev libmail-dkim-perl
Configuration CPAN
perl -MCPAN -e shell exit
Tapez Entrée pour laisser la conf par défaut. Si besoin, définir la conf du proxy avec les variables http_proxy
Maintenant que le CPAN est configuré :
perl -MCPAN -e shell install Mail::SpamAssassin exit
Vérification
Si nécessaire :
perl -MCPAN -e shell get Mail::SpamAssassin
$ find ~/.cpan/ -iname "*sample*" /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-nonspam.txt /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-spam.txt
# spamassassin -t /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-nonspam.txt |grep X-Spam config: no rules were found! Do you need to run 'sa-update'? at /usr/local/bin/spamassassin line 413.
$ apt-file search HTTP/Date.pm libhttp-date-perl: /usr/share/perl5/HTTP/Date.pm
apt-get install --no-install-recommends libhttp-date-perl sa-update -v
Ajout de la crontab
crontab -e @daily /usr/local/bin/sa-update
# spamassassin -t /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-nonspam.txt |grep X-Spam mai 29 14:13:35.829 [8673] warn: dns: sendto() to [127.0.0.1]:53 failed: Connexion refusée, failing over to [213.186.33.99]:53 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on host.acme.fr X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_RP_MATCHES_RCVD, Le syste SpamAssassin ajoute un en-te "X-Spam-Flag: YES" aux
# spamassassin -t /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-spam.txt |grep X-Spam X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on host.acme.fr X-Spam-Flag: YES X-Spam-Level: ************************************************** X-Spam-Status: Yes, score=1000.0 required=5.0 tests=GTUBE,NO_RECEIVED, Le syste SpamAssassin ajoute un en-te "X-Spam-Flag: YES" aux Le syste SpamAssassin ajoute un en-te "X-Spam-Flag: YES" aux
SpamAssassin peut se contrôler lui-même. Si tout est ok il ne revoie aucun résultat
spamassassin --lint
/etc/procmailrc
DROPPRIVS=yes VERBOSE=Yes SHELL=/bin/bash PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin MAILDIR=$HOME/Maildir/ # You d better make sure it exists #DEFAULT=$MAILDIR/$USERNAME DEFAULT=$MAILDIR/ LOGFILE=$MAILDIR/.procmail.log LOCKFILE=$HOME/.lockmail LOGNAME=$USERNAME :0fw | /usr/local/bin/spamassassin :0 * ^X-Spam-Flag: Yes .Spam/new
Vérification 2
cat /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-nonspam.txt | sendmail test@acme.fr cat /root/.cpan/build/Mail-SpamAssassin-3.4.1-Ow_PWo/sample-spam.txt | sendmail test@acme.fr
Trois possiblité pour intégrer SpamAssassin à Postfix :
- Utiliser procmail (solution choisie içi)
- Configurer SpamAssin en tant que daemon
- Utiliser SpamAssin avec Amavis
Install de Munin sur RedHat /CentOS
Source : http://tecadmin.net/installing-munin-in-centos-rhel-and-fedora/
Install
yum install epel-release yum --enablerepo=epel install munin munin-node rrdtool
Changement binding sur localhost (inutile d'écouter sur les cartes réseaux, car on communique en localhost)
sed -i -e 's/^host \*/host 127.0.0.1/' /etc/munin/munin-node.conf
Création MDP
htpasswd -cm /etc/munin/munin-htpasswd muninadmin
Nous ajoutons dans le fichier /etc/httpd/conf.d/munin.conf la ligne suivante :
/etc/httpd/conf.d/munin.conf
Alias /munin /var/www/html/munin
Sur ma conf j'ai dû aussi ajouter un DirectoryIndex index.html
Normalement ça devrait ressembler à :
/etc/httpd/conf.d/munin.conf
# This file can be used as a .htaccess file, or a part of your apache # config file. # # For the .htaccess file option to work the munin www directory # (/var/www/html/munin) must have "AllowOverride all" or something close # to that set. # # As a config file enclose it in <directory> like so: # <directory /var/www/html/munin> AuthUserFile /etc/munin/munin-htpasswd AuthName "Munin" AuthType Basic require valid-user # This next part requires mod_expires to be enabled. # # We could use <IfModule mod_expires> around here, but I want it to be # as evident as possible that you either have to load mod_expires _or_ # you coment out/remove these lines. # Set the default expiery time for files 5 minutes 10 seconds from # their creation (modification) time. There are probably new files by # that time. ExpiresActive On ExpiresDefault M310 # Ajout DirectoryIndex index.html </directory> ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph <Location /munin-cgi/munin-cgi-graph> AuthUserFile /etc/munin/munin-htpasswd AuthName "Munin" AuthType Basic require valid-user </Location> # Ajout Alias /munin /var/www/html/munin
systemctl enable munin-node
systemctl start munin-node
En vérifie que la conf est ok
apachectl -t
Si ok
systemctl reload httpd
NB, les graphes sont générés grâce à la cron /etc/cron.d/munin
Notes brouillon
CentOS6
MySQL
ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/ service munin-node restart
/etc/munin/plugin-conf.d/munin-node
[diskstats] user munin [iostat_ios] user munin [mysql*] user root env.mysqlopts --defaults-extra-file=/var/lib/munin/.my.cnf
/var/lib/munin/.my.cnf
[mysqldump] user=root password=P@ssw0rd [mysql] user=root password=P@ssw0rd [mysqladmin] user=root password=P@ssw0rd [mysqlshow] user=root password=P@ssw0rd
chown munin:munin /var/lib/munin/.my.cnf chmod 600 /var/lib/munin/.my.cnf service munin-node restart
Apache
/etc/httpd/conf/httpd.conf
LoadModule status_module modules/mod_status.so ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 ::1 </Location>
service httpd restart
ln -s /usr/share/munin/plugins/apache_* /etc/munin/plugins/ service munin-node restart
Pb MySQL bug : mysql innodb free tablespace
Voir :
Test
su - munin -s /bin/bash cd /etc/munin/plugins ./mysql_innodb
Erreur
./mysql_innodb: Error: No visible tables use InnoDB free.value U
Désactiver la sonde
unlink /etc/munin/plugins/mysql_innodb service munin-node restart
Installer LibreOffice sur MacOSX 10.6.8
La bonne version, c'est la dernière 4.3.3 (aujourd'hui la 4.3.3.2) :
Après il ne semble plus exister de version 32bits pour Mac.
En cas de doute, sur le fait que c'est version n'est pas obsolète (niveau sécurité) il est raisonnable de prendre la même version de LibreOffice qu'une Debian Stable.
Ansible Ping ICMP
Voir aussi Test ping et win_ping cibles Ansible rapport CSV
M(net_ping) semble être pour les composants réseaux tel que des routers. Il est vrai que dans la mesure du possible il vaut mieux n’utiliser les modules M(command), M(shell) etc… que par parcimonie mais dans la cas présent, si c’est pour pinguer un serveur depuis l’Execution Node ou depuis un serveur Linux cela semble approprié. Voici un exemple :
- hosts: all gather_facts: False tasks: - name: ping command: ping -c 1 -w 2 192.168.2.10 ignore_errors: true changed_when: false check_mode: false
PS : le module M(wait_for) peut dans certains cas faire l’affaire (ping de port TCP)
Autres
Paquets Debian :
- iputils-ping
- inetutils-ping
Install GNU/Linux sur Acer Aspire ES1-531-P1UK
http://acer--uk.custhelp.com/app/answers/detail/a_id/27071/~/how-to-enable-or-disable-secure-boot
Completely shut down your computer.
Power on the system. As soon as the first logo screen appears, immediately press F2 to enter the BIOS.
Use the right arrow key to select Security.
Use the down arrow key to highlight Set Supervisor Password and press Enter.
Create a password and press Enter. Retype the password to confirm and press Enter again.
Use the right arrow key to select Boot.
Press the down arrow key to select Secure Boot and press Enter.
With the arrow key, highlight Disabled and press Enter.
Press the F10 key and select Yes to save the changes and exit the BIOS.
Merci à celui qui a fait cette vidéo :)
