LINUX.ORG.RU
ФорумAdmin

saslauthd+mysql


0

0

Есть почтарь, на фряхе 7.1 все вроде нормально отправляется и получается через веб-интерфейс, но почтовым клиентом получается только получить письма, на отправке ругается на ошибку аутентификации. На серваке стоит постфикс из портов, сасл от туда же и мускуль тоже, в auth.log пишется такая хрень

Feb 24 13:41:04 cs2508 saslauthd[74668]: pam_mysql - required option "user" is not set

Feb 24 13:41:04 cs2508 saslauthd[74668]: do_auth : auth failure: [user=sysadmin@domain.ru] [service=smtp] [realm=domain.ru] [mech=pam] [reason=PAM auth error]

хотя в /etc/pam.conf

smtp auth sufficient pam_mysql.so user=mail passwd=mailpass host=127.0.0.1 db=maildb table=mail_users usercolumn=username passwdcolumn=password_enc crypt=1 where=username='%u@%r'

smtp account sufficient pam_mysql.so user=mail passwd=mailpass host=127.0.0.1 db=maildb table=mail_users usercolumn=username passwdcolumn=password_enc crypt=1 where=username='%u@%r'

и в /etc/pam.d/smtp

auth required pam_mysql.so account required pam_mysql.so password required pam_mysql.so

Кто-нить знает где грабли зарыты? Я все уже перепробовал, эффекта ноль.

Ответ на: комментарий от Jaizer

maillog:


Feb 24 16:15:14 cs2508 postfix/smtpd[75464]: connect from router.radis.spb.ru[93.174.242.211]

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no secret in database

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: router.radis.spb.ru[93.174.242.211]: SASL CRAM-MD5 authentication failed: authentication failure

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no secret in database

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: router.radis.spb.ru[93.174.242.211]: SASL NTLM authentication failed: authentication failure

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: Password verification failed

Feb 24 16:15:19 cs2508 postfix/smtpd[75464]: warning: router.radis.spb.ru[93.174.242.211]: SASL PLAIN authentication failed: authentication failure

Feb 24 16:15:20 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:20 cs2508 postfix/smtpd[75464]: warning: SASL authentication failure: no user in db

Feb 24 16:15:20 cs2508 postfix/smtpd[75464]: warning: router.radis.spb.ru[93.174.242.211]: SASL LOGIN authentication failed: authentication failure


main.cf


queue_directory = /var/spool/postfix

command_directory = /usr/local/sbin

daemon_directory = /usr/local/libexec/postfix

data_directory = /var/db/postfix

mail_owner = postfix

mynetworks_style = host

mail_spool_directory = /usr/local/var/spool/mail

mailbox_command = /usr/local/bin/procmail -a "$EXTENSION"

smtpd_banner = $myhostname ESMTP $mail_name

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 = no

manpage_directory = /usr/local/man

readme_directory = no

program_directory = /usr/local/libexec/postfix

mydomain = mail.demolit.ru

myhostname = mail.demolit.ru

mydestination = $myhostname, $mydomain, localhost.$myhostname, localhost.$mydomain, localhost

mynetworks = 127.0.0.0/8

inet_interfaces = all

append_dot_mydomain = no

biff = no

default_destination_concurrency_limit = 20

local_destination_concurrency_limit = 2

smtpd_helo_required = yes

invalid_hostname_reject_code = 550

non_fqdn_reject_code = 550

unknown_address_reject_code = 550

unknown_client_reject_code = 550

unknown_hostname_reject_code = 550

unverified_recipient_reject_code = 550

unverified_sender_reject_code = 550

strict_rfc821_envelopes = yes

disable_vrfy_command = yes

smtpd_recipient_restrictions =
                                permit_mynetworks,

                                permit_sasl_authenticated,

                                reject_unauth_destination,

                                reject_unauth_pipelining,

                                reject_unknown_client_hostname,

                                reject_non_fqdn_sender,

                                reject_unknown_sender_domain,

                                reject_unknown_recipient_domain,

                                reject_unverified_recipient,

                                reject_rbl_client cbl.abuseat.org,

                                reject_rbl_client dul.ru,

                                reject_rhsbl_client rhsbl.sorbs.net,

                                reject_rhsbl_sender rhsbl.sorbs.net,

                                permit

message_size_limit = 52428800

mailbox_size_limit = 2097152000

virtual_mailbox_limit = 2097152000

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = $myhostname

smtpd_sasl_security_options = noanonymous

broken_sasl_auth_clients = yes

content_filter=smtp-amavis:[127.0.0.1]:10024

virtual_mailbox_base = /usr/local/var/spool/mail/

virtual_mailbox_maps = 
mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf

virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf

virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql-virtual_alias_maps.cf

virtual_uid_maps = static:2000

virtual_gid_maps = static:2000

local_transport = local

alias_database = hash:/etc/mail/aliases

alias_maps = $alias_database

dronozavr
() автор топика

Все, разобрался, в семерке оказывается надо просто написать в /etc/pam.d/smtp

auth sufficient pam_mysql.so user=mail passwd=mailpass host=127.0.0.1 db=maildb table=mail_users usercolumn=username passwdcolumn=password_enc crypt=1 where=username='%u@%r'

account sufficient pam_mysql.so user=mail passwd=mailpass host=127.0.0.1 db=maildb table=mail_users usercolumn=username passwdcolumn=password_enc crypt=1 where=username='%u@%r'sufficient

password sufficient pam_mysql.so user=mail passwd=mailpass host=127.0.0.1 db=maildb table=mail_users usercolumn=username passwdcolumn=password_enc crypt=1 where=username='%u@%r'sufficient

dronozavr
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.