Changed the behavior introduced in commit fb862a2894f01c5fb6144ec781f188445c13c7f1...
authorArt Cancro <ajc@uncensored.citadel.org>
Mon, 23 Jul 2012 15:16:52 +0000 (11:16 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Mon, 23 Jul 2012 15:16:52 +0000 (11:16 -0400)
citadel/modules/smtp/serv_smtp.c

index e5e066328e56c4b6abc6a2193fab6e856fbbc2a9..2ebcc4bc12440a88e14dd1a3927376a1fb25a606 100644 (file)
@@ -691,6 +691,8 @@ void smtp_data(void) {
         * is read with a Citadel client.
         */
        if ( (CC->logged_in) && (config.c_rfc822_strict_from == 0) ) {
+
+#ifdef SMTP_REJECT_INVALID_SENDER
                int validemail = 0;
 
                if (!IsEmptyStr(CC->cs_inet_email) && 
@@ -709,11 +711,11 @@ void smtp_data(void) {
                        }
                }
                if (!validemail) {
-                       syslog(LOG_ERR, "rejecting email because of invalid sender: %s\n", msg->cm_fields['F']);
-                       cprintf("550 fix your mail client config; this is not you!.\r\n");
+                       syslog(LOG_ERR, "invalid sender '%s' - rejecting this message", msg->cm_fields['F']);
+                       cprintf("550 Invalid sender '%s' - rejecting this message.\r\n", msg->cm_fields['F']);
                        return;
-
                }
+#endif /* SMTP_REJECT_INVALID_SENDER */
 
                if (msg->cm_fields['A'] != NULL) free(msg->cm_fields['A']);
                if (msg->cm_fields['N'] != NULL) free(msg->cm_fields['N']);