Internet Service Provider con Debian: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
Riga 1 661: Riga 1 661:
</pre>
</pre>
Questo comando andrà ripetuto ad ogni modifica del file.
Questo comando andrà ripetuto ad ogni modifica del file.
==== Un esempio di main.cf ====
<pre>
###############################
# Configurazioni iniziali
###############################
# Messaggio di benvenuto
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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
#############################
# Configurazione SSL
#############################
# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/mailserver.pem
smtpd_tls_key_file = /etc/ssl/private/mailserver.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
######################################
# Configurazione
######################################
myhostname = mail01.xxxxx.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail01.xxxxx.org, localhost.xxxxx.org, , localhost.xxxxxyy.com, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
queue_directory = /var/spool/postfix
#######################################
# Configurazione utenti virtuali MySQL
#######################################
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
###################
# Regole Antispam
###################
# Verifico correttezza header e body
header_checks = pcre:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
# Abilito a spedire solo gli utenti presenti in MySQL
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-sender-login-maps.cf
# Restrizioni helo
smtpd_helo_required = yes
smtpd_helo_restrictions =
        permit_mynetworks
        #reject_unknown_client
        #reject_invalid_hostname
        #reject_unauth_pipelining
        #reject_unknown_hostname
        #reject_non_fqdn_hostname
# Restrizioni sui mittenti abilitati
smtpd_sender_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        #reject_unknown_address
        #reject_unauth_destination
        reject_unauth_pipelining
reject_unknown_sender_domain
reject_non_fqdn_sender
reject_sender_login_mismatch
# Blocco alcuni domini spammer
smtpd_client_restrictions =
permit_mynetworks
        #check_client_access hash:/etc/postfix/access
        #reject_invalid_hostname
        reject_rbl_client zen.spamhaus.org
        #reject_unknown_client
        permit
# Restrizioni sui destinatari
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
reject_rbl_client dnsbl.sorbs.net
reject_rbl_client bl.spamcop.net
reject_rbl_client zen.spamhaus.org
reject_rbl_client dnsbl-1.uceprotect.net
        check_client_access hash:/etc/postfix/access
        reject_unknown_sender_domain
        reject_unauth_pipelining
        check_policy_service unix:private/tumgreyspf
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_non_fqdn_hostname
        reject_invalid_hostname
# Non piu' di 200 destinatari al minuto
smtpd_client_recipient_rate_limit = 200
# Non piu' di 50 destinatari per ogni messaggio
smtpd_recipient_limit = 50
# Numero di destinatari in eccesso prima che scatti il blocco
smtpd_recipient_overshoot_limit = 21
# Numero di errori massimi di un client prima di essere disconnesso
smtpd_hard_error_limit = 20
# Impedisco invio mail ad alcuni utenti locali
authorized_submit_users = !www-data, static:all
#########################
# Configurazione Dovecot
#########################
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
###############################
# Integrazione con AMaViS
###############################
content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
</pre>


=== SPF per ridurre ancora di più lo spam ===
=== SPF per ridurre ancora di più lo spam ===

Menu di navigazione