текущие конфиги постфикса:
Код: Выделить всё
root@intmail:/home/m0ps# cat /etc/postfix/main.cf | grep -v ^# | grep -v ^$
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
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
myhostname = intmail.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = EXAMPLE.COM
mydestination = intmail.example.com, localhost.example.com, localhost
relayhost = relay.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_mailbox_domains = /etc/postfix/domains.cf
virtual_mailbox_base = /var/mail
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_minimum_uid = 8
virtual_uid_maps = static:8
virtual_gid_maps = static:8
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
message_size_limit = 20480000
smtpd_sasl_auth_enable = no
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,permit
Код: Выделить всё
root@intmail:/home/m0ps# cat /etc/postfix/ldap-users.cf | grep -v ^# | grep -v ^$
version = 3
server_host = example.com:3268
search_base = OU=Example,DC=example,DC=com
query_filter = (&(objectclass=user)(mail=%s))
result_format = %s
result_attribute = mail
bind = yes
bind_dn = EXAMPLE\postfix
bind_pw = postfix
Код: Выделить всё
base_dir = /var/run/dovecot
protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
login_greeting = Welcome to IMAP/POP3 server. Dovecot ready.
mail_location = maildir:/var/mail/%d/%n
mail_privileged_group = mail
mail_debug = yes
first_valid_uid = 8
last_valid_uid = 8
first_valid_gid = 8
last_valid_gid = 8
maildir_copy_with_hardlinks = yes
protocol imap {
login_executable = /usr/lib/dovecot/imap-login
mail_executable = /usr/lib/dovecot/imap
imap_max_line_length = 65536
imap_client_workarounds = outlook-idle outlook-idle netscape-eoh tb-extra-mailbox-sep
}
protocol pop3 {
login_executable = /usr/lib/dovecot/pop3-login
mail_executable = /usr/lib/dovecot/pop3
pop3_uidl_format = %08Xu%08Xv
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol managesieve {
}
protocol lda {
postmaster_address = postmaster@example.com
hostname = intmail.example.com
sendmail_path = /usr/lib/sendmail
auth_socket_path = /var/run/dovecot/auth-master
}
auth_username_format = %Lu
auth_verbose = yes
auth_debug = yes
auth_debug_passwords = no
auth default {
mechanisms = plain
passdb pam {
}
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb passwd {
}
userdb static {
args = uid=8 gid=8 allow_all_users=yes
}
user = nobody
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = mail
group = mail
}
client {
path = /var/run/dovecot/auth-client
mode = 0660
user = postfix
group = postfix
}
}
!include_try /etc/dovecot/auth.d/*.auth
}
dict {
}
plugin {
}
!include_try /etc/dovecot/conf.d/*.conf
Код: Выделить всё
root@intmail:/home/m0ps# cat /etc/dovecot/dovecot-ldap.conf | grep -v ^# | grep -v ^$
hosts = example.com:3268
dn = postfix@EXAMPLE.COM
dnpass = postfix
auth_bind = yes
ldap_version = 3
base = OU=Example,DC=EXAMPLE,DC=COM
deref = never
scope = subtree
pass_filter = (&(objectClass=user)(mail=%n@%d))
default_pass_scheme = CRYPT