Pages : 1
#1 Le 10/09/2013, à 12:30
- njakarajaona
[RESOLU]blocage envoi mail vers des destinataire listés
Bonjour,
Mon serveur: Ubuntu 10.04 TLS
Serveur mail: Postfix 2.7
Fetchmail 6.3.9
Spamassassin: Configuration par défaut
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
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/vmail2.crt
smtpd_tls_key_file = /etc/postfix/ssl/vmail2.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${dta_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = mon_serveur_de_relais.com
alias_maps = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mon_serveur_de_relais.com, localhost.mon_serveur_de_relais.com, localhost
mynetworks = 192.168.1.0/24
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = ipv4
smtpd_sasl_local_domain =
#smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#smtpd_client_restrictions = hash:/etc/postfix/client_access
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_sender_access hash:/etc/postfix/sender_access
smtpd_tls_auth_only = yes
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
home_mailbox = Maildir/
Mail_location = /home/%u/Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_authenticated_header = yes
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium
tls_random_source = dev:/dev/urandom
local_recipient_maps = proxy:unix:passwd.byname, $alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual_maps
sender_canonical_maps = hash:/etc/postfix/sender_maps
local_header_rewrite_clients = static:all
masquerade_classes = envelope_sender, header_sender
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
masquerade_domains = mon_serveur_de_relais.com
#masquerade_exeptions = root, postmaster
message_size_limit = 4096000
maximal_queue_lifetime = 25m
bounce_queue_lifetime = 100m
smtpd_tls_session_cache_timeout = 3600s
default_destination_recipient_limit = 100
maximal_backoff_time = 4000s
mime_header_checks = regexp:/etc/postfix/mime_header_checks
queue_directory = /var/spool/postfix/
max_idle = 300s
notify_classes = bounce, 2bounce, delay, policy, protocol, resource, software
#2bounce_notice_recipient = reseaux@mon_serveur_de_relais.com
#error_notice_recipient = reseaux@mon_serveur_de_relais.com
#bounce_notice_recipient = reseau@mon_serveur_de_relais.com
queue_run_delay = 180s
debug_peer_level = 4
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 20
default_process_limit = 250
duplicate_filter_limit = 450
qmgr_message_active_limit = 250
fast_flush_domains = $relay_domains mon_serveur_de_relais.com
Ma question est:
- Est-il possible de bloquer l'envoi de mail (sur tous les ports smtp) vers
=> une adresse mail de type une_personne@domaine_blacklisté.ext
=> tous les utilisateurs du domaine_blacklisté.ext
Si oui, comment pourrais-je le faire. A noter que pour cela, je veux les bloquer pour tous mes utilisateurs
Je vous remercie d'avance
Dernière modification par njakarajaona (Le 11/09/2013, à 07:39)
Hors ligne
#2 Le 10/09/2013, à 17:10
- bruno
Re : [RESOLU]blocage envoi mail vers des destinataire listés
La directive smtpd_recipient_restrictions doit te permettre de faire cela avec check_recipient_access et une table d'accès.
Par exemple tu ajoutes a la directive smtpd_recipient_restrictions :
check_recipient_access hash:/etc/postfix/block_recipient
et tu crée le fichier :/etc/postfix/block_recipient dans le style :
toto@domaine.tld 553 Requested action not taken: mailbox name not allowed
domaine.tld 553 Requested action not taken: mailbox name not allowed
#3 Le 11/09/2013, à 07:38
- njakarajaona
Re : [RESOLU]blocage envoi mail vers des destinataire listés
Merci beaucoup Bruno,
J'ai mis 4h à chercher comment faire pour la table d’accès. J'ai essayé et ça marche parfaitement.
Encore merci:D
Hors ligne