From 38d1198ddb58242b90bd84ee152742e8b3426cd2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 23 Jul 2012 11:16:52 -0400 Subject: [PATCH] Changed the behavior introduced in commit fb862a2894f01c5fb6144ec781f188445c13c7f1 to a compile-time option. We know of too many existing installations where this would break a lot of legitimate users. --- citadel/modules/smtp/serv_smtp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index e5e066328..2ebcc4bc1 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -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']); -- 2.30.2