Имеется сервер на FreeBSD 8.1. На нем установлен Postfix, который выполняет функции релея на Exchange. С этой функцией он справлялся на ура. Но решил я прикрутить к этому делу авторизацию SMTP через sasl, и тут появились проблемы. Немного о себе:
Код: Выделить всё
out# uname -a
FreeBSD out 8.1-RELEASE FreeBSD 8.1-RELEASE #3: Mon Apr 25 17:55:35 MSD 2011 Admin@out.ac-construction.local:/usr/obj/usr/src/sys/main_kernell.2011-25-04 amd64
Код: Выделить всё
out# pkg_info | grep postfix
postfix-2.8.3,1 A secure alternative to widely-used Sendmail
postfixadmin-2.3.3 PHP web-based management tool for Postfix virtual domains a
Код: Выделить всё
out# pkg_info | grep sasl
cyrus-sasl-2.1.23_3 RFC 2222 SASL (Simple Authentication and Security Layer)
Код: Выделить всё
out# pkg_info | grep openldap
openldap-client-2.4.23 Open source LDAP client implementation
Код: Выделить всё
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix
content_filter = scan:[127.0.0.1]:10025
myhostname = out.strashnaya.su
mydomain = strashnaya.su
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 127.0.0.0/8, 192.168.0.0/23
alias_maps = hash:/etc/aliases
smtpd_sasl_auth_enable = yes
smtpd_sasl_application_name = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = /usr/local/share/doc/postfix
Код: Выделить всё
out# cat /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
Код: Выделить всё
out# cat /etc/pam.conf
# Mail services
smtp auth sufficient /usr/local/lib/pam_ldap.so
Код: Выделить всё
out# cat /usr/local/etc/openldap/ldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example,dc=com
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
base dc=ac-construction,dc=local
scope sub
uri ldap://primarydc.ac-construction.local
port 389
ldap_version 3
binddn cn=ldap,cn=Users,dc=domain,dc=org
bindpw qwerty
pam_filter objectclass=User
pam_login_attribute sAMAccountName
pam_password ad
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
Код: Выделить всё
Jul 7 11:18:57 out postfix/smtpd[37125]: warning: when SASL type is "dovecot", SASL path "smtpd" should be a socket pathname
Jul 7 11:18:57 out postfix/smtpd[37125]: connect from unknown[192.168.0.8]
Jul 7 11:18:57 out postfix/smtpd[37125]: warning: SASL: Connect to smtpd failed: No such file or directory
Jul 7 11:18:57 out postfix/smtpd[37125]: fatal: no SASL authentication mechanisms
Jul 7 11:18:58 out postfix/master[1298]: warning: process /usr/local/libexec/postfix/smtpd pid 37125 exit status 1
Jul 7 11:18:58 out postfix/master[1298]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling