summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-04 06:09:01 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-14 01:39:08 (GMT)
commitea533d40a74fbd2e55f7856acc66074cd5d53789 (patch)
tree674769df0a7172f13e161fbff3cf87bccdbd1222
parent313acdf3d40ea9d31e8223855ee9252bd7d00177 (diff)
more explicit SMTP error when email is rejected by spam filter
plus some comments
-rw-r--r--qmail.c15
1 files changed, 8 insertions, 7 deletions
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)";