seb-info | 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 :
- alias_database = hash:/etc/aliases
- alias_maps = hash:/etc/aliases
- append_dot_mydomain = no
- biff = no
- config_directory = /etc/postfix
- content_filter = smtp-amavis:[127.0.0.1]:10024
- home_mailbox = Maildir/
- inet_interfaces = all
- mailbox_command = procmail -a "$EXTENSION"
- mailbox_size_limit = 0
- mydestination = as-dspam.localdomain, localhost.localdomain, , localhost
- myhostname = as-dspam.localdomain
- mynetworks = 127.0.0.0/8 192.168.153.0/24
- myorigin = /etc/mailname
- recipient_delimiter = +
- relayhost =
- smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
- smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
- smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
- smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
- smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
- smtpd_use_tls = yes
- transport_maps = hash:/etc/postfix/chainefiltre
- virtual_alias_maps = hash:/etc/postfix/alias
|
Le master.cf postfix :
Code :
- #
- # Postfix master process configuration file. For details on the format
- # of the file, see the master(5) manual page (command: "man 5 master" ).
- #
- # ==========================================================================
- # service type private unpriv chroot wakeup maxproc command + args
- # (yes) (yes) (yes) (never) (100)
- # ==========================================================================
- smtp inet n - - - - smtpd
- -o content_filtermtp-amavis:[:[127.0.0.1]:10024
- submission inet n - - - - smtpd
- -o smtpd_enforce_tls=yes
- -o smtpd_sasl_auth_enable=yes
- -o smtpd_client_restrictions=permit_sasl_authenticated,reject
- -o content_filter=smtp-amavis:[127.0.0.1]:10026
- smtps inet n - - - - smtpd
- -o smtpd_tls_wrappermode=yes
- -o smtpd_sasl_auth_enable=yes
- -o smtpd_client_restrictions=permit_sasl_authenticated,reject
- -o content_filter=smtp-amavis:[127.0.0.1]:10026
- #628 inet n - - - - qmqpd
- pickup fifo n - - 60 1 pickup
- cleanup unix n - - - 0 cleanup
- qmgr fifo n - n 300 1 qmgr
- #qmgr fifo n - - 300 1 oqmgr
- tlsmgr unix - - - 1000? 1 tlsmgr
- rewrite unix - - - - - trivial-rewrite
- bounce unix - - - - 0 bounce
- defer unix - - - - 0 bounce
- trace unix - - - - 0 bounce
- verify unix - - - - 1 verify
- flush unix n - - 1000? 0 flush
- proxymap unix - - n - - proxymap
- smtp unix - - - - - smtp
- # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
- relay unix - - - - - smtp
- -o fallback_relay=
- # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
- showq unix n - - - - showq
- error unix - - - - - error
- discard unix - - - - - discard
- local unix - n n - - local
- virtual unix - n n - - virtual
- lmtp unix - - - - - lmtp
- anvil unix - - - - 1 anvil
- scache unix - - - - 1 scache
- #
- # ====================================================================
- # Interfaces to non-Postfix software. Be sure to examine the manual
- # pages of the non-Postfix software to find out what options it wants.
- #
- # Many of the following services use the Postfix pipe(8) delivery
- # agent. See the pipe(8) man page for information about ${recipient}
- # and other message envelope options.
- # ====================================================================
- #
- # maildrop. See the Postfix MAILDROP_README file for details.
- # Also specify in main.cf: maildrop_destination_recipient_limit=1
- #
- maildrop unix - n n - - pipe
- flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
- #
- # See the Postfix UUCP_README file for configuration details.
- #
- uucp unix - n n - - pipe
- flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
- #
- # Other external delivery methods.
- #
- ifmail unix - n n - - pipe
- flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
- bsmtp unix - n n - - pipe
- flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
- scalemail-backend unix - n n - 2 pipe
- flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
- mailman unix - n n - - pipe
- flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
- ${nexthop} ${user}
- smtp-amavis unix - - n - 2 smtp
- -o smtp_data_done_timeout=1200
- -o smtp_send_xforward_command=yes
- -o disable_dns_lookups=yes
- 127.0.0.1:10025 inet n - n - - smtpd
- -o content_filter=
- -o mynetworks=127.0.0.0/8
- -o strict_rfc821_envelopes=yes
- -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
|
Le 20-debian-default de Amavis :
Code :
- $QUARANTINEDIR = "$MYHOME/virusmails";
- $log_recip_templ = undef; # disable by-recipient level-0 log entries
- $DO_SYSLOG = 1; # log via syslogd (preferred)
- $syslog_ident = 'amavis'; # syslog ident tag, prepended to all messages
- $syslog_facility = 'mail';
- $syslog_priority = 'debug'; # switch to info to drop debug output, etc
- $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
- $enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1
- $inet_socket_port = 10024; # default listenting socket
- $sa_spam_subject_tag = '***SPAM*** ';
- $sa_tag_level_deflt = -20.0; # add spam info headers if at, or above that level
- $sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
- $sa_kill_level_deflt = 7.0; # triggers spam evasive actions
- $sa_dsn_cutoff_level = 10.0; # spam level beyond which a DSN is not sent
- $sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger
- $sa_local_tests_only = 0; # only tests which do not require internet access?
- # Quota limits to avoid bombs (like 42.zip)
- $MAXLEVELS = 14;
- $MAXFILES = 1500;
- $MIN_EXPANSION_QUOTA = 100*1024; # bytes
- $MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes
- # You should:
- # Use D_DISCARD to discard data (viruses)
- # Use D_BOUNCE to generate local bounces by amavisd-new
- # Use D_REJECT to generate local or remote bounces by the calling MTA
- # Use D_PASS to deliver the message
- #
- # Whatever you do, *NEVER* use D_REJECT if you have other MTAs *forwarding*
- # mail to your account. Use D_BOUNCE instead, otherwise you are delegating
- # the bounce work to your friendly forwarders, which might not like it at all.
- #
- # On dual-MTA setups, one can often D_REJECT, as this just makes your own
- # MTA generate the bounce message. Test it first.
- #
- # Bouncing viruses is stupid, always discard them after you are sure the AV
- # is working correctly. Bouncing real SPAM is also useless, if you cannot
- # D_REJECT it (and don't D_REJECT mail coming from your forwarders!).
- $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)
- $virus_admin = "administrateur\@$mydomain"; # due to D_DISCARD default
- # Leave empty (undef) to add no header
- $X_HEADER_LINE = "Debian $myproduct_name at $mydomain";
|
Message édité par seb-info le 19-03-2009 à 14:20:09
|