среда, 30 июня 2010 г.

Настройка почты PostFix

Рабочая конфигурация main.cf:

myorigin = /etc/mailname
biff = no

append_dot_mydomain = no

smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

myhostname = mx.domain.ru
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost mx.domain.ru
relayhost =
mynetworks = 127.0.0.0/8 192.168.0.0/24 192.168.2.45/32 95.234.234.234/32
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 51200000
message_size_limit = 25000000
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
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
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

strict_rfc821_envelopes = yes
strict_mime_encoding_domain = no
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_banner = $myhostname
smtpd_error_sleep_time = 1s
smtpd_soft_error_limit = 5
smtpd_hard_error_limit = 10
smtpd_recipient_restrictions =
        reject_non_fqdn_recipient
        permit_mynetworks
        reject_non_fqdn_sender
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        permit_sasl_authenticated
        reject_unauth_destination
        reject_non_fqdn_helo_hostname
        reject_invalid_helo_hostname
        check_helo_access pcre:/etc/postfix/helo_checks
        check_sender_mx_access cidr:/etc/postfix/bogus_mx
        reject_unknown_helo_hostname
        reject_rbl_client bl.spamcop.net
        reject_rbl_client sbl.spamhaus.org=127.0.0.2
        reject_rbl_client cbl.abuseat.org=127.0.0.2
        reject_rbl_client dnsbl.sorbs.net
        reject_rbl_client dnsbl.njabl.org
        hash:/etc/postfix/recipients
        check_policy_service inet:127.0.0.1:60000
        permit

smtpd_data_restrictions =
        reject_multi_recipient_bounce

smtpd_client_restrictions =
        permit_mynetworks
        check_client_access hash:/etc/postfix/sender_checks
        permit

content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

transport_maps = hash:/etc/postfix/transport

Ярлыки