summaryrefslogtreecommitdiff
path: root/src/qmail-qmtpd.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 19:03:11 +0200
commit20b85c03e751b4876fa3c92040464e483172b746 (patch)
tree734fadbfdbc143ec4465093857f4c239448715e0 /src/qmail-qmtpd.c
parenta6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff)
manual format adjustment
Diffstat (limited to 'src/qmail-qmtpd.c')
-rw-r--r--src/qmail-qmtpd.c23
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 */
}