{
if (strstr(ChrPtr(Msg->IO.IOBuf), "LOGIN") != NULL)
Msg->SendLogin = 1;
+ else if ((Msg->MultiLineBuf != NULL) &&
+ strstr(ChrPtr(Msg->MultiLineBuf), "LOGIN") != NULL)
+ {
+ Msg->SendLogin = 1;
+ }
}
}
/* else we fall back to 'helo' */
Msg->pCurrRelay->User, '\0',
Msg->pCurrRelay->Pass);
- CtdlEncodeBase64(encoded, buf,
- strlen(Msg->pCurrRelay->User) * 2 +
- strlen(Msg->pCurrRelay->Pass) + 2, 0);
-
+ size_t len = CtdlEncodeBase64(encoded, buf,
+ strlen(Msg->pCurrRelay->User) * 2 +
+ strlen(Msg->pCurrRelay->Pass) + 2, 0);
+
+ if (buf[len - 1] == '\n') {
+ buf[len - 1] = '\0';
+ }
+
StrBufPrintf(Msg->IO.SendBuf.Buf,
"AUTH PLAIN %s\r\n",
encoded);
Msg->pCurrRelay->User,
strlen(Msg->pCurrRelay->User),
0);
+ if (encoded[encodedlen - 1] == '\n') {
+ encodedlen --;
+ encoded[encodedlen] = '\0';
+ }
StrBufPlain(Msg->IO.SendBuf.Buf,
encoded,
encodedlen = CtdlEncodeBase64(
encoded,
- Msg->pCurrRelay->User,
- strlen(Msg->pCurrRelay->User),
+ Msg->pCurrRelay->Pass,
+ strlen(Msg->pCurrRelay->Pass),
0);
+ if (encoded[encodedlen - 1] == '\n') {
+ encodedlen --;
+ encoded[encodedlen] = '\0';
+ }
+
StrBufPlain(Msg->IO.SendBuf.Buf,
encoded,
encodedlen);