Postfix

main.cf
inet_interfaces = all
inet_protocols = ipv4
myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name
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/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_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.
 
#############Transport#################
local_transport = error:Local Transport Disabled
myhostname = $hostname
alias_maps = hash:/etc/postfix/aliases
# , ldap:/etc/postfix/ldap-aliases.conf
alias_database = hash:/etc/postfix/aliases
myorigin = /etc/mailname
mydestination = a1-content.ru, $hostname, localhost.localdomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
 
 
### DR ####
default_privs = nobody
mail_spool_directory = /var/mail
maps_rbl_reject_code = 554
 
smtpd_helo_restrictions =
	permit_mynetworks
	check_helo_access pcre:/etc/postfix/identitycheck.pcre
	#reject_non_fqdn_helo_hostname
	reject_invalid_hostname
 
smtpd_sender_restrictions =
        reject_non_fqdn_sender
        reject_unknown_sender_domain
 
smtpd_recipient_restrictions = 
	permit_sasl_authenticated
	permit_mynetworks
	reject_unauth_destination
	reject_non_fqdn_recipient
	reject_unknown_recipient_domain
	check_sender_ns_access cidr:/etc/postfix/drop.cidr
	check_sender_mx_access cidr:/etc/postfix/drop.cidr
	reject_rbl_client dnsbl.sorbs.net
	reject_rbl_client ix.dnsbl.manitu.net
	# reject_rbl_client      list.dsbl.org, reject_rbl_client      relays.ordb.org, reject_rbl_client      dynablock.wirehub.net, reject_rbl_client      blackholes.wirehub.net, reject_rbl_client      dnsbl.njabl.org
 
#############################
###   virtual_transport   ###
#############################
	virtual_transport = lmtp:unix:/var/lib/cyrus/socket/lmtp
# mailbox_transport = lmtp:localhost
#lmtp_sasl_auth_enable=yes
#lmtp_sasl_password_maps=hash:/etc/postfix/lmtp_passwd
#lmtp_sasl_security_options = noanonymous
 
# transport_maps = mysql:/etc/postfix/sql/transport.cf
virtual_mailbox_base = /var/mail/virtual
 
# Valid virtual domains
	virtual_mailbox_domains = hash:/etc/postfix/virtual_domains
# Our mail users:
	virtual_mailbox_maps = ldap:/etc/postfix/ldap/virtual_mailbox_maps.cf
	virtual_alias_maps = ldap:/etc/postfix/ldap/virtual_alias_maps.cf
 
#virtual_uid_maps = mysql:/etc/postfix/sql/uids.cf
#virtual_gid_maps = mysql:/etc/postfix/sql/gids.cf
 
# relay_domains = $transport_maps
	local_recipient_maps = $virtual_mailbox_maps $virtual_maps $transport_maps
	smtpd_sasl_auth_enable = yes
	smtp_sasl_security_options = noanonymous
 
# possible rem next string
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
# наши ключи. генерируются с помощью courier-imap (далее)
#smtp_tls_key_file = /usr/local/share/courier-imap/pop3d.pem
#smtp_tls_cert_file = $smtp_tls_key_file
#smtp_tls_CAfile = $smtp_tls_key_file
#smtp_tls_note_starttls_offer = yes
 
# включать возможность авторизации только в режиме tls
#smtpd_tls_auth_only = yes
 
# использовать tls для приёма почты
#smtpd_use_tls = yes
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom
 
# наши ключи. генерируются с помощью courier-imap (далее)
#smtpd_tls_key_file = /usr/local/share/courier-imap/pop3d.pem
#smtpd_tls_cert_file = $smtpd_tls_key_file
#smtpd_tls_CAfile = $smtpd_tls_key_file
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous

postfix maps

virtual_alias_maps.cf
server_host = 127.0.0.1
bind = yes
bind_dn = cn=authuser,ou=accounts,dc=a1-content,dc=ru
bind_pw = secret_pass
search_base = ou=accounts,dc=a1-content,dc=ru
scope = sub
query_filter = (&(objectClass=posixAccount)(mail=%s))
result_attribute = mail, email
virtual_mailbox_maps.cf
server_host = 127.0.0.1
bind = yes
bind_dn = cn=authuser,ou=accounts,dc=a1-content,dc=ru
bind_pw = secret_pass
search_base = ou=accounts,dc=a1-content,dc=ru
scope = sub
query_filter = (&(objectClass=posixAccount)(mail=%s))
result_attribute = mail
adv/srv10436/postfix.txt · Last modified: 2015/12/05 20:29 by rybario
About this template
CC Attribution-Share Alike 4.0 International
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5