Добрый день. Просьба оказать посильную помощь в настройке сабжа. На данный момент имею две проблемы:
Aug 22 14:49:09 s1mx1ls postfix/smtpd[5095]: connect from unknown[192.168.3.150]
Aug 22 14:49:09 s1mx1ls postfix/smtpd[5095]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Aug 22 14:49:09 s1mx1ls postfix/smtpd[5095]: fatal: no SASL authentication mechanisms
Aug 22 14:49:10 s1mx1ls postfix/master[4999]: warning: process /usr/libexec/postfix/smtpd pid 5095 exit status 1
Aug 22 14:49:10 s1mx1ls postfix/master[4999]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Aug 22 14:49:10 s1mx1ls postfix/master[4999]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011lip=192.168.0.7#011rip=192.168.3.150#011lport=143#011rport=52744#011resp=AGVyZXNoZXRuaWtvdgBScXh6ODBtbg==
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: pam(real-user-ad,192.168.3.150): lookup service=dovecot
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: pam(real-user-ad,192.168.3.150): #1/1 style=1 msg=Password:
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: client out: OK#0111#011user=real-user-ad
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: master in: REQUEST#0111874198529#0115083#0111#0118b942bc9ace756ed53f9751cd68d769d
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: passwd(real-user-ad,192.168.3.150): lookup
Aug 22 14:45:16 s1mx1ls dovecot: auth: Debug: master out: USER#0111874198529#011real-user-ad#011system_groups_user=real-user-ad#011uid=20001#011gid=20009#011home=/home/DOMAIN/real-user-ad
Aug 22 14:45:16 s1mx1ls dovecot: imap-login: Login: user=<real-user-ad>, method=PLAIN, rip=192.168.3.150, lip=192.168.0.7, mpid=5092, secured
Aug 22 14:45:16 s1mx1ls dovecot: imap: Debug: Loading modules from directory: /usr/lib64/dovecot
Aug 22 14:45:16 s1mx1ls dovecot: imap: Debug: Module loaded: /usr/lib64/dovecot/lib20_autocreate_plugin.so
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Error: chdir(/home/DOMAIN/real-user-ad) failed: No such file or directory
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Debug: Effective uid=20001, gid=20009, home=/home/DOMAIN/real-user-ad
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Debug: Home dir not found: /home/DOMAIN/real-user-ad
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Debug: maildir++: root=/raid10/vmail/real-user-ad/Maildir, index=, control=, inbox=/raid10/vmail/real-user-ad/Maildir
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Debug: Namespace : Permission lookup failed from /raid10/vmail/real-user-ad/Maildir
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Debug: Namespace : Using permissions from /raid10/vmail/real-user-ad/Maildir: mode=0700 gid=-1
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Error: user real-user-ad: Initialization failed: Initializing mail storage from mail_location setting failed: mkdir(/raid10/vmail/real-user-ad/Maildir) failed: Permission denied (euid=20001(real-user-ad) egid=20009(domain users), euid is not dir owner)
Aug 22 14:45:16 s1mx1ls dovecot: imap(real-user-ad): Error: Invalid user settings. Refer to server log for more information.
опровержение
#ls -l /home/DOMAIN/
drwxr-xr-x 2 real-user-ad domain users 4096 Aug 21 13:20 real-user-ad
# ls -l /raid10/
drwxr-xr-x 2 vmail vmail 4096 Aug 21 19:45 vmail
уже каша в голове, а решение на горизонте не видно. Конфиг postfix
[root@s1mx1ls ~]# cat /etc/postfix/main.cf | grep -v '^#' | grep -v '^$'
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mx1.maildomain.ru
mydomain = maildomain.ru
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 192.168.0.0/16, 127.0.0.0/8
relay_domains = $mydestination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
smtpd_client_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unknown_client_hostname
permit
smtpd_helo_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
reject_unknown_helo_hostname
permit
smtpd_sender_restrictions = permit_mynetworks,
permit_sasl_authenticated
check_sender_access ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf, ldap:/etc/postfix/ldap_virtual_alias_maps.cf
reject_authenticated_sender_login_mismatch,
reject_unknown_sender_domain,
reject_unlisted_sender,
reject_unverified_sender
permit
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
check_recipient_access ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf,
reject_unlisted_recipient,
reject_unknown_recipient_domain,
reject_non_fqdn_recipient,
reject_unverified_recipient
permit
smtpd_etrn_restrictions = reject
smtpd_reject_unlisted_sender = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
show_user_unknown_table_name = no
address_verify_sender = <>
unverified_sender_reject_code = 550
smtpd_helo_required = yes
smtp_always_send_ehlo = yes
smtpd_hard_error_limit = 8
smtpd_sasl_auth_enable = yes
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
virtual_alias_maps = ldap:/etc/postfix/ldap_virtual_alias_maps.cf
virtual_mailbox_domains = maildomain.ru
virtual_mailbox_maps = ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf
virtual_gid_maps = static:400
virtual_uid_maps = static:400
virtual_minimum_uid = 400
dovecot
]# doveconf -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-358.14.1.el6.x86_64 x86_64 CentOS release 6.4 (Final) ext4
auth_debug = yes
auth_debug_passwords = yes
auth_gssapi_hostname = $ALL
auth_krb5_keytab = /etc/krb5.keytab
auth_mechanisms = plain login gssapi
auth_realms = DOMAIN.LOCAL
auth_use_winbind = yes
auth_username_format = %n
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
listen = *
login_trusted_networks = 192.168.0.0/16
mail_chroot = /raid10/vmail
mail_debug = yes
mail_gid = 400
mail_location = maildir:/raid10/vmail/%u/Maildir
mail_uid = 400
mbox_write_locks = fcntl
passdb {
driver = pam
}
plugin {
autocreate = Trash
autocreate2 = Spam
}
service auth {
unix_listener auth-userdb {
group = vmail
mode = 0660
user = vmail
}
user = $default_internal_user
}
ssl = no
userdb {
driver = passwd
}
userdb {
args = uid=400 gid=400 home=/raid10/vmail/%u/Maildir
driver = static
}
verbose_ssl = yes
protocol imap {
imap_idle_notify_interval = 2 mins
mail_max_userip_connections = 10
mail_plugins = " autocreate"
}
в конечном итоге хочу получить smtp и imap сервер берущий пользователей из Active Directory, с авторизацией по доменному логину и паролю.