postfix+smtp авторизация=проблема

From
Wadim Shkirmantov (2:5030/556.9)
To
All
Date
2006-11-28T17:42:26Z
Area
RU.UNIX.BSD
Hello, All!



Трабла postfix+sasl и авторизация по smtp


Итак, версия postfix 2.2.11
sasl cyrus-sasl-2.1.22

sasl собран
./configure --enable-login

postfix собран с поддержкой sasl

Исходные данные

su-2.05b# ldd /usr/sbin/postfix
/usr/sbin/postfix:
        libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x28072000)
        libc.so.4 => /usr/lib/libc.so.4 (0x28087000)
su-2.05b#

файл БД

su-2.05b# l /etc/sasldb2.db
-rw-rw-r--  1 root  postfix  16384 22 ноя 23:41 /etc/sasldb2.db
su-2.05b#

less /usr/lib/sasl2/smtpd.conf

# This sets smtpd to authenticate using the saslauthd daemon.
pwcheck_method: saslauthd
#pwcheck_method: auxprop
# This allows only plain, login, cram-md5 and digest-md5 as the authentication mechanisms.
mech_list: plain login cram-md5 digest-md5

less /etc/postfix/mail.cf

command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix

mail_owner = postfix
default_privs = nobody
myhostname = mail.wad.spb.ru
mydomain = wad.spb.ru
mynetworks = 192.168.1.0/24, 127.0.0.0/8

relayhost = smtp.rol.ru

myorigin = $mydomain
inet_interfaces =  all
mydestination = $myhostname, localhost.$mydomain, $mydomain, /etc/postfix/mydestination, mail.wad.spb.ru
default_transport = smtp
alias_database = hash:/etc/aliases
mailbox_command = /usr/local/bin/procmail



enable_sasl_authentication = yes
smtpd_sasl_auth_enable = yes
smtpd_helo_required = yes
smtpd_sasl_local_domain = $myhostname
smtp_sasl_security_options = noanonymous
#smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
broken_sasl_auth_clients = yes
smtpd_etrn_restrictions = permit_mynetworks,reject
smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown
_hostname

header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks

#home_mailbox = Maildir/
smtpd_banner = $myhostname ESMTP READY! NOT FOR CRACKERS CONNECT!

disable_vrfy_command = yes
smtpd_client_restrictions = permit_sasl_authenticated, reject_unknown_client, reject_rbl_client, permit_mynetw
orks, regexp:/etc/postfix/brj_checks,
                        reject_rbl_client blackholes.mail-abuse.org,
                                reject_rbl_client dialups.mail-abuse.org,
                                reject_rbl_client relays.ordb.org,
                                reject_rbl_client dul.ru,
                                reject_rbl_client opm.blitzed.org,
                                reject_rbl_client list.dsbl.org,
                                reject_rbl_client sbl.spamhaus.org,
                                reject_rbl_client cbl.abuseat.org,
                                reject_rbl_client dul.dnsbl.sorbs.net,
                                reject_rbl_client dnsbl.njabl.org,
                                reject_rbl_client dynablock.njabl.org,
                                reject_rbl_client combined.njabl.org,
                                permit_mynetworks,
                                reject_unknown_client,
                                permit
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unknown_sender_domain, reject
_unknown_address, reject_non_fqdn_sender, reject_invalid_hostname, check_sender_access hash:/etc/postfix/sende
r_access, warn_if_reject, reject_unverified_sender
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, permit_auth_destination, reject_u
nauth_destination, reject_non_fqdn_sender, reject_unknown_sender_domain, check_relay_domains, reject_unknown_c
lient,  reject_unknown_recipient_domain, reject_unverified_recipient, reject_maps_rbl

smtpd_data_restrictions = reject_unauth_pipelining




strict_rfc821_envelopes = yes
maps_rbl_client =  relays.ordb.org, rbl.ukr.net, bl.spamcop.net, sbl.spamhaus.org, spam.dnsrbl.net, dun.dnsrbl
.net
maps_rbl_reject_code = 550
in_flow_delay = 1s
bounce_queue_lifetime = 2h
#maximal_queue_lifetime = 5h

content_filter             = scan:127.0.0.1:10025
receive_override_options   = no_address_mappings

local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 5
debug_peer_level = 2
debugger_command =
         PATH=/usr/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
manpage_directory = /usr/local/man
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
queue_directory = /var/spool/postfix
unknown_local_recipient_reject_code = 450
virtual_alias_maps = hash:/etc/postfix/virtual


html_directory = no

далее......

su-2.05b# ps ax|grep sasl
90866  ??  Is     0:00,01 /usr/local/sbin/saslauthd -a pam
90867  ??  I      0:00,00 /usr/local/sbin/saslauthd -a pam
90868  ??  I      0:00,00 /usr/local/sbin/saslauthd -a pam
90869  ??  I      0:00,00 /usr/local/sbin/saslauthd -a pam
90870  ??  I      0:00,00 /usr/local/sbin/saslauthd -a pam
91059  p1  S+     0:00,01 grep sasl
su-2.05b#

пользователь wadim@wad.spb.ru добавлен

su-2.05b# saslpasswd2 -c -u wad.spb.ru -a smtpd wadim
Password:
Again (for verification):
su-2.05b#

после чего при попытке отправить письмо

Nov 22 23:58:41 wad postfix/smtpd[91240]: connect from monkey.valuehost.ru[217.112.34.254]
Nov 22 23:58:41 wad postfix/smtpd[91240]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Nov 22 23:58:41 wad postfix/smtpd[91240]: warning: SASL authentication failure: Password verification failed
Nov 22 23:58:41 wad postfix/smtpd[91240]: warning: monkey.valuehost.ru[217.112.34.254]: SASL PLAIN authentication failed
Nov 22 23:58:41 wad postfix/smtpd[91240]: lost connection after AUTH from monkey.valuehost.ru[217.112.34.254]
Nov 22 23:58:41 wad postfix/smtpd[91240]: disconnect from monkey.valuehost.ru[217.112.34.254]


настройки проги

учётное имя wadim@wad.spb.ru
pass такой же как и тут
su-2.05b# saslpasswd2 -c -u wad.spb.ru -a smtpd wadim
Password:
Again (for verification):


У кого какие мысли? Какого хрена не работает?










                                                        С уважением, Wadim

... Виpyс детям не игpyшка, не товаpищ и не дpyг!
--- GoldED+/W64 1.1.5 for DOS UNREG
 * Origin: http://wad.spb.ru Home Page by Wadim Shkirmantov (2:5030/556.9)
SEEN-BY: 50/12 203 400/814 450/186 1024 451/30 550/196 4614/20 4635/4
SEEN-BY: 5000/5000 5011/13 5012/46 5015/28 5019/31 5020/154 175 400 545 549
SEEN-BY: 5020/758 1523 1604 1630 2142 2238 2395 2450 2590 2871 4441 5021/3 29
SEEN-BY: 5022/128 5025/3 750 5027/12 5029/32 5030/49 500 556 966 1063 1080
SEEN-BY: 5030/1900 1957 2828 5031/47 70 5035/38 5040/47 5042/13 5045/7 5049/50
SEEN-BY: 5049/97 5054/1 4 8 9 11 28 35 36 37 45 63 66 67 70 75 84 85 5055/95
SEEN-BY: 5059/9 37 5062/1 10 5063/3 5064/7 5076/1 5077/70 5080/80 1003 5082/6
SEEN-BY: 5083/21 5084/9 5085/13 5090/108 5094/4 5095/20 5096/18 5099/11
SEEN-BY: 6001/10
PATH: 5030/556 5020/4441 545 5054/1 37