+ /* If there are modules that want to scan this message before final
+ * submission (such as virus checkers or spam filters), call them now
+ * and give them an opportunity to reject the message.
+ */
+ scan_errors = PerformMessageHooks(msg, EVT_SMTPSCAN);
+
+ if (scan_errors > 0) { /* We don't want this message! */
+
+ if (msg->cm_fields['0'] == NULL) {
+ msg->cm_fields['0'] = strdoop(
+ "Message rejected by filter");
+ }
+
+ cprintf("552 %s\r\n", msg->cm_fields['0']);