cprintf("214- HELP\n");
cprintf("214- NOOP\n");
cprintf("214- QUIT\n");
+ cprintf("214- RSET\n");
cprintf("214- VRFY\n");
cprintf("214 I could tell you more, but then I'd have to kill you.\n");
}
}
+/*
+ * Implements the RSET (reset state) command.
+ * Currently this just zeroes out the state buffer. If pointers to data
+ * allocated with mallok() are ever placed in the state buffer, we have to
+ * be sure to phree() them first!
+ */
+void smtp_rset(void) {
+ memset(SMTP, 0, sizeof(struct citsmtp));
+ cprintf("250 Zap!\n");
+}
+
+
/*
* Main command loop for SMTP sessions.
return;
}
+ else if (!strncasecmp(cmdbuf, "RSET", 4)) {
+ smtp_rset();
+ }
+
else if (!strncasecmp(cmdbuf, "VRFY", 4)) {
smtp_vrfy(&cmdbuf[5]);
}