Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2622 connectés 

  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Sécurité

  Ne pas envoyer les spams détectés par Amavis aux utilisateurs

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Ne pas envoyer les spams détectés par Amavis aux utilisateurs

n°51027
seb-info
Posté le 18-03-2009 à 09:54:15  profilanswer
 

Bonjour j'ai actuellement une configuration d'Amavis équipé de SpamAssassin sur une messagerie Postfix fonctionnelle. Les filtres de spams sont disposés de la sorte :
 
chaine de filtre : PostfixFront ---> Postfix + Amavis ---> Postfix + Amavis ---> Postfix + Amavis + clamav ---> Exchange 2k3 ---> utilisateurs
                      SA ( bayésien)         SA ( heuristique)
 
 
nom de machine: front.local    --> bay.local ---> sa.local ----> clam.local ---> exch.monentreprise.fr   ---> utilisateurs  
 
 
Le problème que j'ai à l'heure actuelle est que les spams sont transmis aux utilisateurs qu'importe leur score malgré la mise en place des paramètres : $sa_kill_level_deflt et $sa_quarantine_cutoff_level dans le fichier de configuration d'amavis.
 
Le second problème concerne l'auto-apprentissage de spam pour la machine bay.local. Je souhaite que cette machine stocke les mails sur un support qui pourra être utilisé par sa-learn.
 
Un impératif que j'ai et que l'on doit pouvoir superviser les messages mis en quarantaine de façon ludique. Pour le moment j'utilise Mailzu qui stocke les spams en base de donnée.
 
Quelques fichiers de configuartion :
 
Le main.cf de postfix :

Code :
  1. alias_database = hash:/etc/aliases
  2. alias_maps = hash:/etc/aliases
  3. append_dot_mydomain = no
  4. biff = no
  5. config_directory = /etc/postfix
  6. content_filter = smtp-amavis:[127.0.0.1]:10024
  7. home_mailbox = Maildir/
  8. inet_interfaces = all
  9. mailbox_command = procmail -a "$EXTENSION"
  10. mailbox_size_limit = 0
  11. mydestination = as-dspam.localdomain, localhost.localdomain, , localhost
  12. myhostname = as-dspam.localdomain
  13. mynetworks = 127.0.0.0/8 192.168.153.0/24
  14. myorigin = /etc/mailname
  15. recipient_delimiter = +
  16. relayhost =
  17. smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
  18. smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
  19. smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
  20. smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
  21. smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
  22. smtpd_use_tls = yes
  23. transport_maps = hash:/etc/postfix/chainefiltre
  24. virtual_alias_maps = hash:/etc/postfix/alias


 
Le master.cf postfix :

Code :
  1. #
  2. # Postfix master process configuration file.  For details on the format
  3. # of the file, see the master(5) manual page (command: "man 5 master" ).
  4. #
  5. # ==========================================================================
  6. # service type  private unpriv  chroot  wakeup  maxproc command + args
  7. #               (yes)   (yes)   (yes)   (never) (100)
  8. # ==========================================================================
  9. smtp      inet  n       -       -       -       -       smtpd
  10. -o content_filtermtp-amavis:[:[127.0.0.1]:10024
  11. submission inet n - - - - smtpd
  12.   -o smtpd_enforce_tls=yes
  13.   -o smtpd_sasl_auth_enable=yes
  14.   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  15.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  16. smtps     inet  n       -       -       -       -       smtpd
  17.   -o smtpd_tls_wrappermode=yes
  18.   -o smtpd_sasl_auth_enable=yes
  19.   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  20.   -o content_filter=smtp-amavis:[127.0.0.1]:10026
  21. #628      inet  n       -       -       -       -       qmqpd
  22. pickup    fifo  n       -       -       60      1       pickup
  23. cleanup   unix  n       -       -       -       0       cleanup
  24. qmgr      fifo  n       -       n       300     1       qmgr
  25. #qmgr     fifo  n       -       -       300     1       oqmgr
  26. tlsmgr    unix  -       -       -       1000?   1       tlsmgr
  27. rewrite   unix  -       -       -       -       -       trivial-rewrite
  28. bounce    unix  -       -       -       -       0       bounce
  29. defer     unix  -       -       -       -       0       bounce
  30. trace     unix  -       -       -       -       0       bounce
  31. verify    unix  -       -       -       -       1       verify
  32. flush     unix  n       -       -       1000?   0       flush
  33. proxymap  unix  -       -       n       -       -       proxymap
  34. smtp      unix  -       -       -       -       -       smtp
  35. # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
  36. relay     unix  -       -       -       -       -       smtp
  37. -o fallback_relay=
  38. #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
  39. showq     unix  n       -       -       -       -       showq
  40. error     unix  -       -       -       -       -       error
  41. discard   unix  -       -       -       -       -       discard
  42. local     unix  -       n       n       -       -       local
  43. virtual   unix  -       n       n       -       -       virtual
  44. lmtp      unix  -       -       -       -       -       lmtp
  45. anvil     unix  -       -       -       -       1       anvil
  46. scache   unix - - - - 1 scache
  47. #
  48. # ====================================================================
  49. # Interfaces to non-Postfix software. Be sure to examine the manual
  50. # pages of the non-Postfix software to find out what options it wants.
  51. #
  52. # Many of the following services use the Postfix pipe(8) delivery
  53. # agent.  See the pipe(8) man page for information about ${recipient}
  54. # and other message envelope options.
  55. # ====================================================================
  56. #
  57. # maildrop. See the Postfix MAILDROP_README file for details.
  58. # Also specify in main.cf: maildrop_destination_recipient_limit=1
  59. #
  60. maildrop  unix  -       n       n       -       -       pipe
  61.   flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
  62. #
  63. # See the Postfix UUCP_README file for configuration details.
  64. #
  65. uucp      unix  -       n       n       -       -       pipe
  66.   flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
  67. #
  68. # Other external delivery methods.
  69. #
  70. ifmail    unix  -       n       n       -       -       pipe
  71.   flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
  72. bsmtp     unix  -       n       n       -       -       pipe
  73.   flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
  74. scalemail-backend unix - n n - 2 pipe
  75.   flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
  76. mailman   unix  -       n       n       -       -       pipe
  77.   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  78.   ${nexthop} ${user}
  79. smtp-amavis unix -      -       n       -       2  smtp
  80.   -o smtp_data_done_timeout=1200
  81.   -o smtp_send_xforward_command=yes
  82.   -o disable_dns_lookups=yes
  83. 127.0.0.1:10025 inet n  -       n       -       -  smtpd
  84.   -o content_filter=
  85.   -o mynetworks=127.0.0.0/8
  86.   -o strict_rfc821_envelopes=yes
  87.   -o smtpd_error_sleep_time=0
  88.   -o smtpd_soft_error_limit=1001
  89.   -o smtpd_hard_error_limit=1000
  90.   -o smtpd_client_connection_count_limit=0
  91.   -o smtpd_client_connection_rate_limit=0


 
 
Le 20-debian-default de Amavis :

Code :
  1. $QUARANTINEDIR = "$MYHOME/virusmails";
  2. $log_recip_templ = undef;    # disable by-recipient level-0 log entries
  3. $DO_SYSLOG = 1;              # log via syslogd (preferred)
  4. $syslog_ident = 'amavis';    # syslog ident tag, prepended to all messages
  5. $syslog_facility = 'mail';
  6. $syslog_priority = 'debug';  # switch to info to drop debug output, etc
  7. $enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)
  8. $enable_global_cache = 1;    # enable use of libdb-based cache if $enable_db=1
  9. $inet_socket_port = 10024;   # default listenting socket
  10. $sa_spam_subject_tag = '***SPAM*** ';
  11. $sa_tag_level_deflt  = -20.0;  # add spam info headers if at, or above that level
  12. $sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
  13. $sa_kill_level_deflt = 7.0; # triggers spam evasive actions
  14. $sa_dsn_cutoff_level = 10.0;   # spam level beyond which a DSN is not sent
  15. $sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger
  16. $sa_local_tests_only = 0;    # only tests which do not require internet access?
  17. # Quota limits to avoid bombs (like 42.zip)
  18. $MAXLEVELS = 14;
  19. $MAXFILES = 1500;
  20. $MIN_EXPANSION_QUOTA =      100*1024;  # bytes
  21. $MAX_EXPANSION_QUOTA = 300*1024*1024;  # bytes
  22. # You should:
  23. #   Use D_DISCARD to discard data (viruses)
  24. #   Use D_BOUNCE to generate local bounces by amavisd-new
  25. #   Use D_REJECT to generate local or remote bounces by the calling MTA
  26. #   Use D_PASS to deliver the message
  27. #
  28. # Whatever you do, *NEVER* use D_REJECT if you have other MTAs *forwarding*
  29. # mail to your account.  Use D_BOUNCE instead, otherwise you are delegating
  30. # the bounce work to your friendly forwarders, which might not like it at all.
  31. #
  32. # On dual-MTA setups, one can often D_REJECT, as this just makes your own
  33. # MTA generate the bounce message.  Test it first.
  34. #
  35. # Bouncing viruses is stupid, always discard them after you are sure the AV
  36. # is working correctly.  Bouncing real SPAM is also useless, if you cannot
  37. # D_REJECT it (and don't D_REJECT mail coming from your forwarders!).
  38. $final_virus_destiny      = D_DISCARD;  # (data not lost, see virus quarantine)
  39. $final_banned_destiny     = D_REJECT;   # D_REJECT when front-end MTA
  40. $final_spam_destiny       = D_REJECT;
  41. $final_bad_header_destiny = D_PASS;     # False-positive prone (for spam)
  42. $virus_admin = "administrateur\@$mydomain"; # due to D_DISCARD default
  43. # Leave empty (undef) to add no header
  44. $X_HEADER_LINE = "Debian $myproduct_name at $mydomain";


Message édité par seb-info le 19-03-2009 à 14:20:09
mood
Publicité
Posté le 18-03-2009 à 09:54:15  profilanswer
 

n°51077
seb-info
Posté le 19-03-2009 à 11:19:08  profilanswer
 

Un complèment d'information pour m'aider à ce que les spams ne soit pas délivrer à mes utilisateurs:
 
Les paramètres de filtrage pour Amavis sont récupérér en base SQL et pour mon test les règles de niveau de spam sont les suivantes :
 
spam_kill_level = 6
spam_quarantine_cutoff_level = 6
 
Dans /etc/amavis/conf.d/20-debian-default j'ai :
 
# $final_virus_destiny      = D_DISCARD;  # (data not lost, see virus quarantine)
# $final_banned_destiny     = D_REJECT;   # D_REJECT when front-end MTA
# $final_spam_destiny       = D_REJECT;
# $final_bad_header_destiny = D_PASS;     # False-positive prone (for spam)
 
Malgré cela je reçoit les spams.
 
Help SVP je comprend pas :s

n°51622
laura_ge
Posté le 02-04-2009 à 14:11:26  profilanswer
 

bonjour
quel est le score des spams reçus ?


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Systèmes & Réseaux Pro
  Sécurité

  Ne pas envoyer les spams détectés par Amavis aux utilisateurs

 

Sujets relatifs
Postfix Amavis et ses filtresEnvoyer du contenu vers des lecteurs multimedia via un WAN
Cisco ASA 5505 : utilisateurs limités ?Utilisateurs authentifiés/du domaine
Prix de licences Windows Server 2008 pour plus de 1000 utilisateursDroits de vos utilisateurs nomades (pc portables)
Profils Utilisateurs = Workroup => Domaine[ HyperV ] - Gestion des droits utilisateurs
[AD] - Récupérer une liste d'utilisateurs avec droits sur autre mailboEthernet sous Wndows : écouter et envoyer des paquets ?
Plus de sujets relatifs à : Ne pas envoyer les spams détectés par Amavis aux utilisateurs


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR