The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



Индекс форумов
Составление сообщения

Исходное сообщение
"POSTFIX+SASL"
Отправлено patriot, 20-Окт-05 10:04 
>>>  Здравствуй, многоуважаемый All! Никак не могу разобраться с SASL. Все
>>>установил, но при попытке отправить почту с авторизацией выскаксвает
>>>
>>>warning: SASL authentication failure: no secret in database
>>>warning: sda.xxx.ru[172.18.2.105]: SASL CRAM-MD5 authentication failed
>>>
>>>/usr/lib/sasl2/smtpd.conf:
>>>
>>>auxprop_plugin: mysql
>>>pwcheck_method: auxprop
>>>mysql_user: postfix
>>>mysql_passwd: postfix
>>>mysql_hostnames: localhost
>>>mysql_database: mail
>>>mysql_statement: select password from aliases where alias='%u@%r'
>>>mysql_verbose: yes
>>>
>>>Стоит postfix, собранный с поддержкой sasl
>>>
>>>Помогите! Спасибо!
>>
>>
>>юзер в базе есть ?
>>если есть - то криво отрабатывает запрос на извлечение данных из db.
>>
>
>
>Делал вручную выборку по этому же запросу - все ок выводит. Юзер
>в базе данных есть

Поставте courier-imap, соберите SASL с поддержкой Authdaemon и попробуйтен вот так:
SASL2 smtpd.conf

Tip for Debian (tested in sarge) Postfix runs in a jailed enviroment in the /var/spool/postfix, and that's why it cannot connect to mysql. To fix this you need to create a link to the mysql.sock in the postfix jail. Just run this commands:

mkdir -p /var/spool/postfix/var/run/mysqld
chown mysql /var/spool/postfix/var/run/mysqld
ln /var/run/mysqld/mysqld.sock /var/spool/postfix/var/run/mysqld/mysqld.sock

Change all the hosts in /etc/postfix/mysql* from localhost to 127.0.0.1 will solve above problem. Quote from mysql_table(5):

NOTE: if you specify localhost as a hostname (even if you prefix it with
inet:), MySQL will connect to the default UNIX domain socket.  In order
to instruct MySQL to connect to localhost over TCP you have to specify
                  hosts = 127.0.0.1

smtpd.conf locations:

    * FreeBSD is in /usr/local/lib/sasl2
    * Debian Sarge is in /etc/postfix/sasl

Your smtpd.conf should contain something like:

pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/var/spool/authdaemon/socket

socket locations:

    * FreeBSD with courier-authlib-mysql-0.55 is /var/run/authdaemond/socket
    * Debian Sarge is /var/run/courier/authdaemon/socket

Tip for Debian (tested in sarge)

As for the mysql socket, you must create a link to the authdaemon socket in postfix's jail (as root):

mkdir -p /var/spool/postfix/var/run/courier/authdaemon
ln /var/run/courier/authdaemon/socket /var/spool/postfix/var/run/courier/authdaemon/socket
chown -R daemon:daemon /var/spool/postfix/var/run/courier

Don't forget check the permission of the path of /var/run/authdaemond/socket.

Please note you must restart saslauthd whenever making any changes are made to the smtpd.conf file.

Полная версия мана - http://postfixwiki.org/index.php?title=Virtual_Users_and_Dom...

 

Ваше сообщение
Имя*:
EMail:
Для отправки новых сообщений в текущей нити на email укажите знак ! перед адресом, например, !user@host.ru (!! - не показывать email).
Более тонкая настройка отправки ответов производится в профиле зарегистрированного участника форума.
Заголовок*:
Сообщение*:
  Введите код, изображенный на картинке: КОД
 
При общении не допускается: неуважительное отношение к собеседнику, хамство, унизительное обращение, ненормативная лексика, переход на личности, агрессивное поведение, обесценивание собеседника, провоцирование флейма голословными и заведомо ложными заявлениями. Не отвечайте на сообщения, явно нарушающие правила - удаляются не только сами нарушения, но и все ответы на них. Лог модерирования.



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру