SASL 인증 실패: 클라이언트 응답이 우리가 생성한 응답과 일치하지 않습니다.

SASL 인증 실패: 클라이언트 응답이 우리가 생성한 응답과 일치하지 않습니다.

다음 튜토리얼은 가상 메일 서버 설정을 위한 것입니다:

GNU/Linux 시스템에서 메일 서버를 설정하는 방법

모든 것이 잘 작동하지만 메시지를 보낼 때마다 다음 오류가 발생합니다.

mail postfix/smtpd[10569]: warning: SASL authentication failure: client response doesn't match what we generated (tried bogus)
mail postfix/smtpd[10569]: warning: unknown[so.me.ext.ip]: SASL DIGEST-MD5 authentication failed: authentication failure
mail postfix/smtpd[10569]: 1298562035: client=unknown[so.me.ext.ip], sasl_method=LOGIN, [email protected]

그런 다음 계속해서 메시지를 보냅니다.

따라서 etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5
log_level: 7
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: mailuser
sql_passwd: mailpassword
sql_database: maildb
sql_select: select crypt from users where id='%u@%r' and enabled = 1

다이제스트-md5 부분을 제외하고는 잘 작동합니다. 이 부분은 로그인으로 직접 이동하고 메시지를 성공적으로 보냅니다.

또한 /etc/default/saslauthd(# 텍스트 생략)

START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
#OPTIONS="-r -c -m /var/spool/postfix/var/run/saslauthd"
OPTIONS="-r -c -m /var/run/saslauthd"

postfix의 chroot 환경에서는 작동하는데 문제가 없습니다. 그렇지 않으면 오류가 보고됩니다.

warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

이것은 약 4년 동안 매력적으로 작동해 온 오래된 설정이지만, 여전히 이 메시지가 중간에 문제가 있다는 의미가 아닌지 확인하고 싶었습니다.

답변1

귀하의 질문이 제가 파헤치는 데 도움이 되었습니다... 저는 최근 메일 서버를 Ubuntu 14.04 LTS에서 18.04 LTS로 업그레이드했는데 정말 악몽이었습니다. 그러나 결국 모든 것이 잘 작동했습니다 :)

귀하의 오류:

SASL authentication failure: client response doesn't match what we generated (tried bogus)

다음을 포함하는 구성으로 인해 발생했습니다 /etc/postfix/sasl/smtpd.conf.

mech_list: plain login cram-md5 digest-md5

이것후위 SASL 가이드일반 로그인만 지원되며 "클라이언트가 다른 메커니즘을 선택하도록 허용하면 인증이 실패합니다"라고 명시되어 있으므로 해당 행은 다음과 같아야 합니다.

mech_list: plain login

마지막 줄:

warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

현재 chroot에서 실행 중인 postfix로 인해 발생 /var/run/saslauthd/했으며 /var/spool/postfix/var/run/saslauthd/.

이것은 마지막에 설정됩니다 /etc/default/saslauthd.

OPTIONS="-c -r -m /var/spool/postfix/var/run/saslauthd"

[email protected]인증할 때 영역을 포함하기 위해 -r 플래그를 추가했습니다(예: 인증하는 데 대신 사용됩니다 aaron).


마지막으로 다음을 사용하여 만들어야 했습니다 /etc/pam.d/smtp.

auth    required   pam_mysql.so user=mail passwd=******** host=******** db=maildb table=users usercolumn=id passwdcolumn=crypt crypt=1
account sufficient pam_mysql.so user=mail passwd=******** host=******** db=maildb table=users usercolumn=id passwdcolumn=crypt crypt=1

지금쯤이면 아시겠지만 다른 불쌍한 영혼들을 백발로부터 구하기 위해 어쨌든 공유합니다. 회색 이후...:/

관련 정보