diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:23:02 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:23:02 +0200 |
commit | 9837632ea985b87eb6aaa7f619a0b859fc6c40f6 (patch) | |
tree | f143461843ba2fdaa8e7499ebf52afda3eb08cd4 /src/qmail-remote.c | |
parent | 7b4d3ab22988d021d5f12b81aec746f7e486fa52 (diff) |
Diffstat (limited to 'src/qmail-remote.c')
-rw-r--r-- | src/qmail-remote.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qmail-remote.c b/src/qmail-remote.c index a6ef155..5440a22 100644 --- a/src/qmail-remote.c +++ b/src/qmail-remote.c @@ -389,13 +389,13 @@ void blast() while ((r = buffer_get(&bi,inbuf,sizeof(inbuf)))) { // read into buffer if (r == -1) temp_read(); - for (in = out = 0; in < r;) { + for (in = out = 0; in <= r;) { if (eom && inbuf[in] == '.') { tmpbuf[out++] = '.'; tmpbuf[out++] = inbuf[in++]; } eom = 0; - while (in < r) { + while (in <= r) { if (inbuf[in] == '\r') { in++; continue; } // CR is DKIM input if (inbuf[in] == '\n') { eom = 1; @@ -946,7 +946,12 @@ void qmtp() /* the following code was substantially taken from serialmail's serialqmtp.c */ - scan_ulong(msgsize,&len); + if (msize) + len = msize; + else { + out("DMessage for: "); outhost(); out(" has zero bytes. Giving up.\n"); + } + buffer_put(&bo,num,fmt_ulong(num,len + 1)); buffer_put(&bo,":\n",2); while (len > 0) { @@ -1339,7 +1344,7 @@ int main(int argc,char **argv) if (port == PORT_QMTPS) flagtls += 20; } - if (flagtls == 8) flagverify = -1; + if (flagtls == 8 || flagtls == 18 || flagtls == 28) flagverify = -1; /* no TLSA */ if (!flagtls && qmtpsend == 2) flagtls = 20; /* QMTPS */ |