X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fserv_smtp.c;h=2ebcc4bc12440a88e14dd1a3927376a1fb25a606;hb=38d1198ddb58242b90bd84ee152742e8b3426cd2;hp=e5e066328e56c4b6abc6a2193fab6e856fbbc2a9;hpb=194ee6709f01560434de4450b70d1f667731966d;p=citadel.git 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']);