ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Postfix + SMTP-AUTH + SASL + MySQL
@ 2005-10-30 16:01 Eugene Prokopiev
  2005-10-30 16:28 ` Alexei Takaseev
  0 siblings, 1 reply; 11+ messages in thread
From: Eugene Prokopiev @ 2005-10-30 16:01 UTC (permalink / raw)
  To: ALT Linux Community

Здравствуйте!

Задача: настроить SMTP-авторизацию в Postfix, имена и пароли 
пользователей уже хранятся в MySQL (открытым текстом):

mysql> select userid, passwd from dbmail_users;
+--------------------------------+----------+
| userid                         | passwd   |
+--------------------------------+----------+
| john                           | jpwd     |
+--------------------------------+----------+

Имею установленные:

# rpm -qa | grep postfix (взят из бэкпортов)
postfix-control-1.2-alt1
postfix-2.2.4-alt0.M24.1
postfix-html-2.2.4-alt0.M24.1
postfix-mysql-2.2.4-alt0.M24.1
postfix-tls-2.2.4-alt0.M24.1

# rpm -qa | grep sasl (сначала пытался взять из бекпортов, но там alt0, 
т.е. версия младше - как это получилось?)
libsasl2-2.1.19-alt1
libsasl2-plugin-sql-2.1.19-alt1
cyrus-sasl2-2.1.19-alt1
cyrus-sasl2-docs-2.1.19-alt1

Читаю /usr/share/doc/postfix-2.2.4/README.ALT-ru_RU.KOI8-R: "Вся 
конфигурация SASL находится в /etc/postfix/sasl"

Однако:

# ls -l /etc/postfix/sasl
ls: /etc/postfix/sasl: No such file or directory

Пытаюсь определить, где лежат конфиги, стандартым методом :)

# rpm -qli `rpm -qa | grep sasl` | grep /etc
/etc/sasl2
/etc/sasl2/sasldb2
/etc/rc.d/init.d/saslauthd
/etc/sasl2/saslauthd.conf
/etc/sasl2/saslpasswd.conf
/etc/sysconfig/saslauthd

Cмотрю, что там уже наконфигурено:

# cat /etc/sasl2/saslpasswd.conf
pwcheck_method: sasldb

# cat /etc/sasl2/saslauthd.conf | grep -v "^[#]"
ldap_servers: ldap://10.1.1.15/ ldap://10.1.1.25/
ldap_bind_dn: cn=operator,ou=Profile,o=foo.com
ldap_bind_pw: secret
ldap_version: 3
ldap_timeout: 5
ldap_time_limit: 5

Прихожу в некоторое замешательство от отсутствия упоминаний об sql и иду 
в search.altlinux.ru, где упоминается совсем другой файл 
/usr/lib/sasl2/smtpd.conf. О lib говорит и google в ответ на "postfix 
sasl mysql". Предполагаю, что и в ALT когда-то следовали общим правилам, 
а затем решили поместить этот файл в более приличное место.

Создаю этот файл и вписываю в него:

pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
sql_engine: mysql
sql_hostnames: localhost
sql_user: dbmail
sql_passwd: dbmailpwd
sql_database: dbmail
sql_select: select passwd from dbmail_users where userid='%u'

После запуска сервиса saslauthd приходит мысль протестировать 
когфигурацию с помощью testsaslauthd, который я успел заметить в rpm 
-qli cyrus-sasl2:

testsaslauthd: usage: testsaslauthd -u username -p password
               [-r realm] [-s servicename]
               [-f socket path] [-R repeatnum]

Мана нет, что указывать в -r и -s непонятно, приходится оставить эту 
затею и тестировать непосредственно Postfix.

В /usr/share/doc/postfix-2.2.4/README.ALT-ru_RU.KOI8-R сказано: 
"Некоторые типы представлений (и поддержка SASL) требуют дополнительной
настройки (не отраженной в оригинальной документации) для работы в
chroot окружении.  Простое решение этой проблемы - использовать для
таких представлений сервис proxy, который работает вне chroot.
Для SASL решение более нетривиальное и требует частного подхода, но, в
большистве случаев, может быть решено следующим образом - сокет демона
saslauthd должен находится в пределах chroot (например, в каталоге
/var/spool/postfix/var/run/saslauthd)"

Осталось придумать, как поместить сокет демона saslauthd в чрут 
постфикса. Как сделать это правильно (и проверить, правильно ли сделал) 
не знаю, поэтому делаю так:

# mkdir /var/spool/postfix/var/run
# ln -s /var/run/saslauthd/mux /var/spool/postfix/var/run/mux

Дальше в main.cf дописываю:

smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks 
permit_sasl_authenticated reject

Перезапускаю Postfix и тестирую то, что получилось:

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 myserver.myprovider.ru ESMTP Postfix
ehlo client
250-myserver.myprovider.ru
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH SRP PLAIN OTP NTLM LOGIN DIGEST-MD5 CRAM-MD5
250 8BITMIME

Ага, теперь спрашиваю у google, чем кодировать логин/пароль при 
использовании PLAIN или LOGIN. Последний отвечает, что нужен mimencode.

# apt-cache search mimencode
#

Никого ...

Ладно, воспользуемся Thunderbird. Отправляю письмо, указываю 
логин/пароль, у меня спрашивают его еще раз. В логах:

SASL CRAM-MD5 authentication failed
SASL NTLM authentication failed
SASL PLAIN authentication failed
SASL LOGIN authentication failed
SASL CRAM-MD5 authentication failed

и т.д.

И постоянно повторяется:

postfix/smtpd[12043]: warning: SASL authentication problem: unable to 
open Berkeley db /etc/sasl2/sasldb2: No such file or directory

Файл этот есть, но если Postfix пытается искать его у себя в чруте, то 
он естественно его не найдет. Но откуда он вообще берет это? Догадка, 
что сервис saslauthd не виноват, подтверждается, т.к. после его 
опускания в лог валятся те же сообщения. Т.е. Postfix плевал на 
saslauthd и пытается искать логин/пароль сам.

Все, я шокирован окончательно ...

Последняя идиотская попытка: если /etc/postfix/sasl упомянут, то может 
нужно создать такой файл и вписать туда содержимое smtpd.conf? Или 
создать такой каталог и в него этот файл положить? А демон saslauthd не 
нужен?

Попробовал, не работает.

Что мне делать дальше?

Кстати, при старте saslauthd я вижу тоже не совсем то, что хотелось бы:

Oct 30 18:51:03 myserver saslauthd[16198]: detach_tty      : master pid 
is: 16198
Oct 30 18:51:03 myserver saslauthd[16198]: ipc_init        : listening 
on socket: /var/run/saslauthd/mux
Oct 30 18:53:31 myserver postfix/smtpd[16697]: sql_select option missing
Oct 30 18:53:31 myserver postfix/smtpd[16697]: auxpropfunc error no 
mechanism available
Oct 30 18:53:31 myserver postfix/smtpd[16697]: _sasl_plugin_load failed 
on sasl_auxprop_plug_init for plugin: sql

Что не так?

-- 
С уважением, Прокопьев Евгений


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 16:01 [Comm] Postfix + SMTP-AUTH + SASL + MySQL Eugene Prokopiev
@ 2005-10-30 16:28 ` Alexei Takaseev
  2005-10-30 18:27   ` Eugene Prokopiev
  0 siblings, 1 reply; 11+ messages in thread
From: Alexei Takaseev @ 2005-10-30 16:28 UTC (permalink / raw)
  To: ALT Linux Community

On Sun, 30 Oct 2005 19:01:21 +0300
Eugene Prokopiev wrote:

> Здравствуйте!
> 
> Задача: настроить SMTP-авторизацию в Postfix, имена и пароли 
> пользователей уже хранятся в MySQL (открытым текстом):
> 
> mysql> select userid, passwd from dbmail_users;
> +--------------------------------+----------+
> | userid                         | passwd   |
> +--------------------------------+----------+
> | john                           | jpwd     |
> +--------------------------------+----------+
> 
> Имею установленные:
> 
> # rpm -qa | grep postfix (взят из бэкпортов)
> postfix-control-1.2-alt1
> postfix-2.2.4-alt0.M24.1
> postfix-html-2.2.4-alt0.M24.1
> postfix-mysql-2.2.4-alt0.M24.1
> postfix-tls-2.2.4-alt0.M24.1
> 
> # rpm -qa | grep sasl (сначала пытался взять из бекпортов, но там
> # alt0, 
> т.е. версия младше - как это получилось?)
> libsasl2-2.1.19-alt1
> libsasl2-plugin-sql-2.1.19-alt1
> cyrus-sasl2-2.1.19-alt1
> cyrus-sasl2-docs-2.1.19-alt1
> 
> Читаю /usr/share/doc/postfix-2.2.4/README.ALT-ru_RU.KOI8-R: "Вся 
> конфигурация SASL находится в /etc/postfix/sasl"
> 
> Однако:
> 
> # ls -l /etc/postfix/sasl
> ls: /etc/postfix/sasl: No such file or directory
> 
> Пытаюсь определить, где лежат конфиги, стандартым методом :)

postfix-2.2.x относить к стандартным в ALM24 сомнительно.

> # rpm -qli `rpm -qa | grep sasl` | grep /etc
> /etc/sasl2
> /etc/sasl2/sasldb2
> /etc/rc.d/init.d/saslauthd
> /etc/sasl2/saslauthd.conf
> /etc/sasl2/saslpasswd.conf
> /etc/sysconfig/saslauthd
> 
> Cмотрю, что там уже наконфигурено:
> 
> # cat /etc/sasl2/saslpasswd.conf
> pwcheck_method: sasldb
> 
> # cat /etc/sasl2/saslauthd.conf | grep -v "^[#]"
> ldap_servers: ldap://10.1.1.15/ ldap://10.1.1.25/
> ldap_bind_dn: cn=operator,ou=Profile,o=foo.com
> ldap_bind_pw: secret
> ldap_version: 3
> ldap_timeout: 5
> ldap_time_limit: 5
> 
> Прихожу в некоторое замешательство от отсутствия упоминаний об sql и
> иду  в search.altlinux.ru, где упоминается совсем другой файл 
> /usr/lib/sasl2/smtpd.conf. О lib говорит и google в ответ на "postfix 
> sasl mysql". Предполагаю, что и в ALT когда-то следовали общим
> правилам,  а затем решили поместить этот файл в более приличное место.

Вообще-то ноги у этого поведения растут от Debian.

> Создаю этот файл и вписываю в него:
> 
> pwcheck_method: auxprop
> auxprop_plugin: sql
> mech_list: plain login
> sql_engine: mysql
> sql_hostnames: localhost
> sql_user: dbmail
> sql_passwd: dbmailpwd
> sql_database: dbmail
> sql_select: select passwd from dbmail_users where userid='%u'
> 
> После запуска сервиса saslauthd приходит мысль протестировать 

saslauthd не умеет работать с SQL. Для этого существует
libsasl2-plugin-sql

Конфиги от реально работающей системы ALM24:
postfix-2.0.20-alt1.3
postfix-pgsql-2.0.20-alt1.3
postfix-pcre-2.0.20-alt1.3
libsasl2-2.1.19-alt1
libsasl2-plugin-sql-2.1.19-alt1

 username |  password  | domain_name | active
----------+------------+-------------+--------
 user1    | XXXXXXXXXX | mydomain.ru |      1

/etc/postfix/sasl/smtpd.conf:
auxprop_plugin: sql

sql_engine: pgsql
sql_user: mail
sql_passwd: secret
sql_hostnames: localhost
sql_database: mail

sql_statement: select password from mailusers where username = '%u' and
domain_name = '%r' and active = 1


Вот, собственно, и вся настройка.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 16:28 ` Alexei Takaseev
@ 2005-10-30 18:27   ` Eugene Prokopiev
  2005-10-30 18:43     ` Eugene Prokopiev
  2005-10-30 19:13     ` Eugene Prokopiev
  0 siblings, 2 replies; 11+ messages in thread
From: Eugene Prokopiev @ 2005-10-30 18:27 UTC (permalink / raw)
  To: ALT Linux Community

> postfix-2.2.x относить к стандартным в ALM24 сомнительно.

а я не постфикс, а способ поиска конфигов отношу к стандартным :)

> saslauthd не умеет работать с SQL. Для этого существует
> libsasl2-plugin-sql

libsasl2-plugin-sql у меня установлен

> Конфиги от реально работающей системы ALM24:
> postfix-2.0.20-alt1.3
> postfix-pgsql-2.0.20-alt1.3
> postfix-pcre-2.0.20-alt1.3
> libsasl2-2.1.19-alt1
> libsasl2-plugin-sql-2.1.19-alt1
> 
>  username |  password  | domain_name | active
> ----------+------------+-------------+--------
>  user1    | XXXXXXXXXX | mydomain.ru |      1
> 
> /etc/postfix/sasl/smtpd.conf:
> auxprop_plugin: sql
> 
> sql_engine: pgsql
> sql_user: mail
> sql_passwd: secret
> sql_hostnames: localhost
> sql_database: mail
> 
> sql_statement: select password from mailusers where username = '%u' and
> domain_name = '%r' and active = 1
> 
> 
> Вот, собственно, и вся настройка.

Создал практически идентичную конфигурацию, разве что вместо pgsql у 
меня mysql.

При попытке отослать письмо из Thunderbird имею:

/var/log/auth/messages:

Oct 30 21:08:36 myserver postfix/smtpd[29932]: sql plugin Parse the 
username john
Oct 30 21:08:36 myserver postfix/smtpd[29932]: sql plugin try and 
connect to a host
Oct 30 21:08:36 myserver postfix/smtpd[29932]: sql plugin trying to open 
db 'dbmail' on host 'localhost'
Oct 30 21:08:36 myserver postfix/smtpd[29932]: sql plugin could not 
connect to host localhost
Oct 30 21:08:36 myserver postfix/smtpd[29932]: sql plugin couldn't 
connect to any host

/var/log/mail/all:

Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: OTP: auxprop backend can't store properties
Oct 30 21:08:32 myserver postfix/smtpd[29932]: connect from 
localhost.localdomain[127.0.0.1]
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: no secret in database
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL CRAM-MD5 authentication failed
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: no secret in database
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL NTLM authentication failed
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: Password verification failed
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL PLAIN authentication failed
Oct 30 21:08:32 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL LOGIN authentication failed
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: no secret in database
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL CRAM-MD5 authentication failed
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: no secret in database
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL NTLM authentication failed
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: SASL 
authentication failure: Password verification failed
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL PLAIN authentication failed
Oct 30 21:08:36 myserver postfix/smtpd[29932]: warning: 
localhost.localdomain[127.0.0.1]: SASL LOGIN authentication failed

При этом причин для "could not connect to host localhost" или "couldn't 
connect to any host" вроде бы нет:

$ mysql -u dbmail dbmail -h localhost -p
Enter password:

mysql> show tables;
+---------------------------+
| Tables_in_dbmail          |
+---------------------------+
| dbmail_acl                |
| dbmail_aliases            |
| dbmail_auto_notifications |
| dbmail_auto_replies       |
| dbmail_filters            |
| dbmail_mailboxes          |
| dbmail_messageblks        |
| dbmail_messages           |
| dbmail_pbsp               |
| dbmail_physmessage        |
| dbmail_subscription       |
| dbmail_users              |
+---------------------------+
12 rows in set (0.00 sec)

mysql>

И еще:

1. Как ограничить список способов авторизации? NTLM мне точно не нужен.

2. Как авторизоваться телнетом? Чем генерить логин/пароль?

3. Зачем в принципе нужен saslauthd? Если Postfix в состоянии без него 
обходиться, то кто не в состоянии и почему?

-- 
С уважением, Прокопьев Евгений


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 18:27   ` Eugene Prokopiev
@ 2005-10-30 18:43     ` Eugene Prokopiev
  2005-10-30 19:13     ` Eugene Prokopiev
  1 sibling, 0 replies; 11+ messages in thread
From: Eugene Prokopiev @ 2005-10-30 18:43 UTC (permalink / raw)
  To: ALT Linux Community

> 1. Как ограничить список способов авторизации? NTLM мне точно не нужен.

mech_list: PLAIN LOGIN в /etc/postfix/sasl/smtpd.conf

здесь 
http://lists.altlinux.ru/pipermail/community/2004-December/139758.html 
даже говорят, что отсутствие этого может быть причиной "OTP: auxprop 
backend can't store properties".

Но остальные вопросы остаются открытыми

-- 
С уважением, Прокопьев Евгений


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 18:27   ` Eugene Prokopiev
  2005-10-30 18:43     ` Eugene Prokopiev
@ 2005-10-30 19:13     ` Eugene Prokopiev
  2005-10-31  6:02       ` Laaz Vadim
                         ` (4 more replies)
  1 sibling, 5 replies; 11+ messages in thread
From: Eugene Prokopiev @ 2005-10-30 19:13 UTC (permalink / raw)
  To: ALT Linux Community

>> sql_hostnames: localhost

вот здесь пришлось указать 127.0.0.1, и все заработало :)

может можно как-нибудь оставить localhost, но указать, что интересует 
именно tcp сокет?

Эти вопросы по-прежнему актуальны:

> 2. Как авторизоваться телнетом? Чем генерить логин/пароль?
> 3. Зачем в принципе нужен saslauthd? Если Postfix в состоянии без него 
> обходиться, то кто не в состоянии и почему?



-- 
С уважением, Прокопьев Евгений


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 19:13     ` Eugene Prokopiev
@ 2005-10-31  6:02       ` Laaz Vadim
  2005-10-31  7:36       ` Alexey I. Froloff
                         ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Laaz Vadim @ 2005-10-31  6:02 UTC (permalink / raw)
  To: ALT Linux Community

В сообщении от 30 Октябрь 2005 22:13 Eugene Prokopiev написал(a):
> >> sql_hostnames: localhost
>
> вот здесь пришлось указать 127.0.0.1, и все заработало :)
>
> может можно как-нибудь оставить localhost, но указать, что интересует
> именно tcp сокет?
postfix работает в chroot, что-бы он работал через сокет, нужно
ln -f /var/lib/mysql/mysql.sock /var/spool/postfix/var/lib/mysql/mysql.sock
причем ссылку нужно делать при каждом старте/рестарте mysql
я изменял /etc/rc.d/init.d/mysqld
...
make_link()
{
 while true; do
 if [ -S /var/lib/mysql/mysql.sock ]; then
   break;
 fi
 done
 ln -f /var/lib/mysql/mysql.sock /var/spool/postfix/var/lib/mysql/mysql.sock
}
...
case "$1" in
        start)
                start
                make_link
                ;;
        stop)
                stop
                ;;
        restart|reload)
                restart
                make_link
                ;;
...
esac


> Эти вопросы по-прежнему актуальны:
> > 2. Как авторизоваться телнетом? Чем генерить логин/пароль?
> > 3. Зачем в принципе нужен saslauthd? Если Postfix в состоянии без него
> > обходиться, то кто не в состоянии и почему?

-- 
инженер-электроник Лааз Вадим
Железноводский ГУС
т. (87932) 3-14-30

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 19:13     ` Eugene Prokopiev
  2005-10-31  6:02       ` Laaz Vadim
@ 2005-10-31  7:36       ` Alexey I. Froloff
  2005-10-31 12:58       ` Alexei Takaseev
                         ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Alexey I. Froloff @ 2005-10-31  7:36 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

* Eugene Prokopiev <prokopiev@> [051030 22:19]:
> >> sql_hostnames: localhost
> вот здесь пришлось указать 127.0.0.1, и все заработало :)
> может можно как-нибудь оставить localhost, но указать, что интересует 
> именно tcp сокет?
Задайте этот вопрос кривопейсателям MySQL..

-- 
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
  Inform-Mobil, Ltd. System Administrator
       http://www.inform-mobil.ru/
Tel: +7(095)504-4709, Fax: +7(095)513-1006

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 19:13     ` Eugene Prokopiev
  2005-10-31  6:02       ` Laaz Vadim
  2005-10-31  7:36       ` Alexey I. Froloff
@ 2005-10-31 12:58       ` Alexei Takaseev
  2005-10-31 14:09       ` [Comm] " Michael Shigorin
  2005-11-01  6:30       ` [Comm] " Dmitry Lebkov
  4 siblings, 0 replies; 11+ messages in thread
From: Alexei Takaseev @ 2005-10-31 12:58 UTC (permalink / raw)
  To: ALT Linux Community

On Sun, 30 Oct 2005 22:13:47 +0300
Eugene Prokopiev wrote:

> >> sql_hostnames: localhost
> 
> вот здесь пришлось указать 127.0.0.1, и все заработало :)
> 
> может можно как-нибудь оставить localhost, но указать, что интересует 
> именно tcp сокет?
> 
> Эти вопросы по-прежнему актуальны:
> 
> > 2. Как авторизоваться телнетом? Чем генерить логин/пароль?

Где-то в ссылках на postfix.org с описанием настройки SASL и TLS было
описано как надо кодировать строку.

> > 3. Зачем в принципе нужен saslauthd? Если Postfix в состоянии без
> > него  обходиться, то кто не в состоянии и почему?

saslauthd к примеру нужен в том случае, когда надо проводить авторизацию
по PAM или LDAP.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Comm] Re: Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 19:13     ` Eugene Prokopiev
                         ` (2 preceding siblings ...)
  2005-10-31 12:58       ` Alexei Takaseev
@ 2005-10-31 14:09       ` Michael Shigorin
  2005-10-31 18:36         ` Pavel Usischev
  2005-11-01  6:30       ` [Comm] " Dmitry Lebkov
  4 siblings, 1 reply; 11+ messages in thread
From: Michael Shigorin @ 2005-10-31 14:09 UTC (permalink / raw)
  To: ALT Linux Community

On Sun, Oct 30, 2005 at 10:13:47PM +0300, Eugene Prokopiev wrote:
> >>sql_hostnames: localhost
> вот здесь пришлось указать 127.0.0.1, и все заработало :)
> может можно как-нибудь оставить localhost, но указать, что
> интересует именно tcp сокет?

127.0.0.2?

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Re: Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-31 14:09       ` [Comm] " Michael Shigorin
@ 2005-10-31 18:36         ` Pavel Usischev
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Usischev @ 2005-10-31 18:36 UTC (permalink / raw)
  To: shigorin, ALT Linux Community

Michael Shigorin пишет:
>>>>sql_hostnames: localhost
>>вот здесь пришлось указать 127.0.0.1, и все заработало :)
>>может можно как-нибудь оставить localhost, но указать, что
>>интересует именно tcp сокет?
> 127.0.0.2?

Тут и 127.0.0.1 сработает. А вот localhost словом указать никак не 
получится. Цитата из 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

-- 
С уважением,
Павел Усищев


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL
  2005-10-30 19:13     ` Eugene Prokopiev
                         ` (3 preceding siblings ...)
  2005-10-31 14:09       ` [Comm] " Michael Shigorin
@ 2005-11-01  6:30       ` Dmitry Lebkov
  4 siblings, 0 replies; 11+ messages in thread
From: Dmitry Lebkov @ 2005-11-01  6:30 UTC (permalink / raw)
  To: ALT Linux Community

Eugene Prokopiev wrote:
>>> sql_hostnames: localhost
> 
> 
> вот здесь пришлось указать 127.0.0.1, и все заработало :)
> 
> может можно как-нибудь оставить localhost, но указать, что интересует 
> именно tcp сокет?
> 
> Эти вопросы по-прежнему актуальны:
> 
>> 2. Как авторизоваться телнетом? Чем генерить логин/пароль?

cat /usr/share/doc/postfix-2.2.5/README_FILES/SASL_README |grep -C2 perl

>> 3. Зачем в принципе нужен saslauthd? Если Postfix в состоянии без него 
>> обходиться, то кто не в состоянии и почему?

man saslauthd:
...
The server fulfills two roles: it isolates all code requiring superuser
privileges into a single process, and it can be used to provide proxy
authentication services to clients that do not understand SASL based
authentication.

-- 
WBR, Dmitry Lebkov


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-11-01  6:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-30 16:01 [Comm] Postfix + SMTP-AUTH + SASL + MySQL Eugene Prokopiev
2005-10-30 16:28 ` Alexei Takaseev
2005-10-30 18:27   ` Eugene Prokopiev
2005-10-30 18:43     ` Eugene Prokopiev
2005-10-30 19:13     ` Eugene Prokopiev
2005-10-31  6:02       ` Laaz Vadim
2005-10-31  7:36       ` Alexey I. Froloff
2005-10-31 12:58       ` Alexei Takaseev
2005-10-31 14:09       ` [Comm] " Michael Shigorin
2005-10-31 18:36         ` Pavel Usischev
2005-11-01  6:30       ` [Comm] " Dmitry Lebkov

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git