ClamAV : Différence entre versions

De Wiki NCad
Aller à : navigation, rechercher
m (Cacheln a déplacé la page Amavis (Clamav) vers ClamAV)
Ligne 3 : Ligne 3 :
 
__TOC__
 
__TOC__
  
== Installation ==
+
== Intégration dans Postfix ==
  
=== Ubuntu ===
+
=== Installation ===
  
=== Fichier /etc/amavis/conf.d/05-node_id ===
+
* Installation :
  
* Vérifier que la variable $myhostname contient bien un nom de machine pleinement qualifié. Par exemple :
+
{{ Box Console | objet=clamsmtp clamav-daemon clamav clamav-freshclam clamav-base}}
  
chomp($myhostname = "ro-200.net.ncad.fr");
+
* Mise à jour des bases :
  
* Démarrer amavis :
+
{{ Box Console | objet=freshclam}}
  
{{Box Console | objet=/etc/init.d/amavis start}}
+
* Lancement de ClamAV :
  
== Intégration à Postfix ==
+
{{ Box Console | objet=service clamav-daemon restart}}
  
=== Fichier /etc/postfix/master.conf ===
+
=== Configuration sans anti-spam SpamAssassin ===
  
* Ajouter à la fin du fichier :
+
* '''/etc/postfix/main.cf''' :
  
amavisfeed unix    -      -      n      -      2    smtp
+
content_filter = scan:127.0.0.1:10026
    -o smtp_data_done_timeout=1200
+
receive_override_options = no_address_mappings
    -o smtp_send_xforward_command=yes
+
    -o smtp_tls_note_starttls_offer=no
+
  
127.0.0.1:10025 inet n    -      n      -      -    smtpd
+
* '''/etc/postfix/master.cf''' :
    -o content_filter=
+
    -o smtpd_delay_reject=no
+
    -o smtpd_client_restrictions=permit_mynetworks,reject
+
    -o smtpd_helo_restrictions=
+
    -o smtpd_sender_restrictions=
+
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
+
    -o smtpd_data_restrictions=reject_unauth_pipelining
+
    -o smtpd_end_of_data_restrictions=
+
    -o smtpd_restriction_classes=
+
    -o mynetworks=127.0.0.0/8
+
    -o smtpd_error_sleep_time=0
+
    -o smtpd_soft_error_limit=1001
+
    -o smtpd_hard_error_limit=1000
+
    -o smtpd_client_connection_count_limit=0
+
    -o smtpd_client_connection_rate_limit=0
+
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
+
    -o local_header_rewrite_clients=
+
    -o smtpd_milters=
+
    -o local_recipient_maps=
+
    -o relay_recipient_maps=
+
  
* Recharger la configuration de Postfix :
+
clamav      unix  -      -      n      -      16      smtp
 +
        -o smtp_send_xforward_command=yes:q
  
{{Box Console | objet=/etc/init.d/postfix reload}}
+
127.0.0.1:10025 inet  n -      n      -      16      smtpd
 +
        -o content_filter=
 +
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
 +
        -o smtpd_helo_restrictions=
 +
        -o smtpd_client_restrictions=
 +
        -o smtpd_sender_restrictions=
 +
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
 +
        -o mynetworks_style=host
 +
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
 +
 
 +
{{ Box Console | objet=service postfix restart}}
  
 
[[Category:Serveur de Messagerie]]
 
[[Category:Serveur de Messagerie]]

Version du 9 février 2014 à 18:34

ICON boxWarning.png

Suite à la nouvelle version de l'article Postfix, cet article doit être mis à jour.
Cette article est un brouillon.


Intégration dans Postfix

Installation

  • Installation :
ICON Terminal.png

clamsmtp clamav-daemon clamav clamav-freshclam clamav-base

  • Mise à jour des bases :
ICON Terminal.png

freshclam

  • Lancement de ClamAV :
ICON Terminal.png

service clamav-daemon restart

Configuration sans anti-spam SpamAssassin

  • /etc/postfix/main.cf :

content_filter = scan:127.0.0.1:10026 receive_override_options = no_address_mappings

  • /etc/postfix/master.cf :

clamav unix - - n - 16 smtp

       -o smtp_send_xforward_command=yes:q

127.0.0.1:10025 inet n - n - 16 smtpd

       -o content_filter=
       -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
       -o smtpd_helo_restrictions=
       -o smtpd_client_restrictions=
       -o smtpd_sender_restrictions=
       -o smtpd_recipient_restrictions=permit_mynetworks,reject
       -o mynetworks_style=host
       -o smtpd_authorized_xforward_hosts=127.0.0.0/8
ICON Terminal.png

service postfix restart