diff options
Diffstat (limited to 'src/qmail-qmtpd.c')
-rw-r--r-- | src/qmail-qmtpd.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/qmail-qmtpd.c b/src/qmail-qmtpd.c index 8ae81e0..b3a121d 100644 --- a/src/qmail-qmtpd.c +++ b/src/qmail-qmtpd.c @@ -29,6 +29,7 @@ void badproto() { _exit(100); } + void resources() { _exit(111); @@ -233,7 +234,7 @@ int main() /* XXX: check for loops? only if len is big? */ - if (flagdos) + if (flagdos) { while (len > 0) { buffer_get(&bi, &ch, 1); --len; @@ -249,12 +250,11 @@ int main() if (!--bytestooverflow) qmail_fail(&qq); qmail_put(&qq, &ch, 1); } - else { - if (databytes) - if (len > databytes) { - bytestooverflow = 0; - qmail_fail(&qq); - } + } else { + if (databytes && len > databytes) { + bytestooverflow = 0; + qmail_fail(&qq); + } while (len > 0) { /* XXX: could speed this up, obviously */ buffer_get(&bi, &ch, 1); --len; @@ -330,9 +330,9 @@ int main() if (databytes) if (!bytestooverflow) result = "D Sorry, that message size exceeds my databytes limit (#5.3.4)"; - if (*result) + if (*result) { len = str_len(result); - else { + } else { /* success! */ len = 0; len += fmt_str(buf2 + len, "K Ok "); @@ -348,14 +348,15 @@ int main() len += fmt_str(buf + len, result); buf[len++] = ','; - for (i = 0; i < failure.len; ++i) switch (failure.s[i]) - { + for (i = 0; i < failure.len; ++i) { + switch (failure.s[i]) { case 0: buffer_put(&bo, buf, len); break; case 'D': buffer_puts(&bo, "66:D Sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1),"); break; default: buffer_puts(&bo, "46:D Sorry, I can't handle that recipient (#5.1.3),"); break; } + } /* bo will be flushed when we read from the network again */ } |