From ea533d40a74fbd2e55f7856acc66074cd5d53789 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 3 Jun 2012 23:09:01 -0700 Subject: more explicit SMTP error when email is rejected by spam filter plus some comments --- qmail.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'qmail.c') diff --git a/qmail.c b/qmail.c index 186c092..51883e1 100644 --- a/qmail.c +++ b/qmail.c @@ -28,7 +28,7 @@ struct qmail *qq; if (pipe(pim) == -1) return -1; if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; } - + switch(qq->pid = vfork()) { case -1: close(pim[0]); close(pim[1]); @@ -105,21 +105,22 @@ struct qmail *qq; exitcode = wait_exitcode(wstat); switch(exitcode) { - case 115: /* compatibility */ + case 115: /* compatibility ... fall through */ case 11: return "Denvelope address too long for qq (#5.1.3)"; + case 21: return "Dmessage rejected by spam filter (#4.2.2)"; case 31: return "Dmail server permanently rejected message (#5.3.0)"; case 51: return "Zqq out of memory (#4.3.0)"; case 52: return "Zqq timeout (#4.3.0)"; case 53: return "Zqq write error or disk full (#4.3.0)"; - case 0: if (!qq->flagerr) return ""; /* fall through */ + case 0: if (!qq->flagerr) return ""; /* else fall through */ case 54: return "Zqq read error (#4.3.0)"; case 55: return "Zqq unable to read configuration (#4.3.0)"; case 56: return "Zqq trouble making network connection (#4.3.0)"; case 61: return "Zqq trouble in home directory (#4.3.0)"; - case 63: - case 64: - case 65: - case 66: + case 63: /* fall through */ + case 64: /* fall through */ + case 65: /* fall through */ + case 66: /* fall through */ case 62: return "Zqq trouble creating files in queue (#4.3.0)"; case 71: return "Zmail server temporarily rejected message (#4.3.0)"; case 72: return "Zconnection to mail server timed out (#4.4.1)"; -- cgit v1.2.3