From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4365109E.70206@stc.donpac.ru> Date: Sun, 30 Oct 2005 21:27:42 +0300 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: ALT Linux Community Subject: Re: [Comm] Postfix + SMTP-AUTH + SASL + MySQL References: <4364EE51.3010105@stc.donpac.ru> <20051031002800.49ededfa.alexei@taf.ru> In-Reply-To: <20051031002800.49ededfa.alexei@taf.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Community List-Id: ALT Linux Community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 18:25:41 -0000 Archived-At: List-Archive: List-Post: > 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 в состоянии без него обходиться, то кто не в состоянии и почему? -- С уважением, Прокопьев Евгений