Страница 1 из 1

Auth в Exim

Добавлено: 2007-12-15 16:09:23
Riskator
Настроил Exim как описано здесь http://www.lissyara.su/?id=1194
Не могу понять почему при авторизации возникает ошибка 503 AUTH command used when not advertised

Код: Выделить всё

# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.mydomen.ru.
Escape character is '^]'.
220 mydomen.ru, ESMTP EXIM 4.68
ehlo localhost
250-mydomen.ru Hello localhost.mydomen.ru [127.0.0.1]
250-SIZE 5242880
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP 

Код: Выделить всё

# exim -bP authenticators

PLAIN authenticator:
client_condition =
driver = plaintext
public_name = PLAIN
server_advertise_condition =
server_condition = ${if saslauthd{{$1}{$2}}{1}{0}}
server_debug_print =
server_mail_auth_condition =
server_set_id = $2
no_client_ignore_invalid_base64
client_send =
server_prompts = :

LOGIN authenticator:
client_condition =
driver = plaintext
public_name = LOGIN
server_advertise_condition =
server_condition = ${if saslauthd{{$1}{$2}}{1}{0}}
server_debug_print =
server_mail_auth_condition =
server_set_id =
no_client_ignore_invalid_base64
client_send =
server_prompts = Username:: : Password:: 

Код: Выделить всё

# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.mydomen.ru.
Escape character is '^]'.
220 mydomen.ru, ESMTP EXIM 4.68
AUTH PLAIN AG5hbWUAcGFzc3dvcmQ=
503 AUTH command used when not advertised

Re: Auth в Exim

Добавлено: 2007-12-15 18:14:13
dikens3
Нужно указать те хосты, кому можно использовать команду AUTH.
В основном конфиге посмотри, auth_advertise_hosts = * или что-то типа того.

Re: Auth в Exim

Добавлено: 2007-12-18 15:21:59
Riskator
Спасибо за ответ, осталась еще одна грабля, похоже что в строке
server_condition = ${if saslauthd{$auth2}{$auth3}}{1}{0}}

Код: Выделить всё

# testsaslauthd -u a -p 1
0: OK "Success."
]# ./encode '\0a\01'
AGEB
# exim -d+auth -bh 127.0.0.1

<skip>

SMTP>> 250-mydomain.ru Hello localhost.mydomain.ru [127.0.0.1]
250-SIZE 5242880
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
AUTH PLAIN
SMTP<< AUTH PLAIN
SMTP>> 334
334
AGEB
SMTP<< AGEB
PLAIN authenticator:
  $auth1 =
  $auth2 = a
  $1 =
  $2 = a
expansion failed: too few arguments or bracketing error for saslauthd
SMTP>> 435 Unable to authenticate at present
435 Unable to authenticate at present
LOG: MAIN REJECT
  PLAIN authenticator failed for localhost.mydomain.ru (localhost) [127.0.0.1]: 435 Unable to authenticate at present (set_id=a\001): too few arguments or bracketing error for saslauthd
Вот здесь http://wiki.exim.org/AuthenticatedSmtpUsingSaslauthd считают что это вызвано ошибкой в Local/Makefile, но как в там можно ошибиться если эта опция стоит по умолчанию?