Bon j'ai réussi à bloquer l'envoi de mail grace à des parametres de reject dans mon main.cf
Maintenant mon mail.log ennregistre des messages de se genre :
Mar 20 06:25:25 server01 postfix/smtpd[4491]: connect from unknown[60.209.21.101]
Mar 20 06:25:27 server01 postfix/smtpd[4491]: NOQUEUE: reject: RCPT from unknown[60.209.21.101]: 504 5.5.2 <mychat-35dafcb4>: Helo command r$
Mar 20 06:25:27 server01 postfix/smtpd[4491]: NOQUEUE: reject: RCPT from unknown[60.209.21.101]: 504 5.5.2 <mychat-35dafcb4>: Helo command r$
Mar 20 06:25:27 server01 postfix/smtpd[4491]: NOQUEUE: reject: RCPT from unknown[60.209.21.101]: 504 5.5.2 <mychat-35dafcb4>: Helo command r$
Mar 20 06:25:27 server01 postfix/smtpd[4491]: NOQUEUE: reject: RCPT from unknown[60.209.21.101]: 504 5.5.2 <mychat-35dafcb4>: Helo command r$
Mar 20 06:25:28 server01 postfix/smtpd[4491]: lost connection after DATA from unknown[60.209.21.101]
Mar 20 06:25:28 server01 postfix/smtpd[4491]: disconnect from unknown[60.209.21.101]
J'ai du mettre en place un clear du mail.log touts les jours avec cron car il devient vite volumineux.
voici mon main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
disable_vrfy_command = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
smtpd_helo_required = yes
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
myhostname = mail.*****.fr
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain
relayhost = smtp.free.fr
mynetworks = 127.0.0.0/8, 192.168.0.0/24
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = *****.fr
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_tls_auth_only = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
# SASL
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_hostname, reject_invalid_hostname, reject_non_fqdn_sender, reject_$
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_non_fqdn_hostname, reject_invalid_hostname, r$
Comment faire pour éviter ses attaques ?
Merci
Poste le Thursday 20 March 2008 22:01:36