Menu

#8 smtp auth don't work for postfix

v1.0 (example)
open
None
5
2014-08-20
2014-08-20
Yudai Kato
No

The configuration below doesn't work for my benchmarking.


useEHLO 1
useAuthLogin 1
portNum 465


My environment is below.


[mstone host]
CentOS release 6.4 (Final)
Mstone version 4.9.4

[mail server]
CentOS release 6.4 (Final)
Postfix 2.6.6


I fix it by modifying the source smtp.c.
(modified line is #1324 and #1334.)
I think EHLO message is different between Sendmail and Postfix.



1322 if (pish->flags & useAUTHPLAIN) {
1323 / look for AUTH PLAIN LOGIN in respBuffer /
1324 if (strstr(respBuffer, "AUTH PLAIN LOGIN")!= NULL || strstr(respBuffer, "AUTH LOGIN PLAIN") != NULL) {
1325 / FIX: time get base64 time and multiple round trips /
1326 rc = smtpAuthPlain(ptcx, cmd, ptimer, ptcx->sock);
1327 if (rc != 0) {
1328 doSMTPExit (ptcx, me);
1329 return NULL;
1330 }
1331 }
1332 } else if (pish->flags & useAUTHLOGIN) {
1333 / look for AUTH LOGIN in respBuffer /
1334 if (strstr(respBuffer, "AUTH=LOGIN") != NULL || strstr(respBuffer, "AUTH LOGIN PLAIN") != NULL) {
1335 / FIX: time get base64 time and multiple round trips /
1336 rc = smtpAuthLogin(ptcx, cmd, ptimer, ptcx->sock);
1337 if (rc != 0) {
1338 doSMTPExit (ptcx, me);
1339 return NULL;
1340 }
1341 }
1342 }


I wish to support Postfix auth login.

Discussion


Log in to post a comment.