From: Art Cancro Date: Mon, 29 Nov 2021 15:43:14 +0000 (-0500) Subject: Cleaned up another set of conditionals in the SMTP server. X-Git-Tag: v941~2 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0f36c303808d7c3713db27c2fa9e2fd4f9c3eb6a Cleaned up another set of conditionals in the SMTP server. --- diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index 2a4b84642..a74e2bb9f 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -705,13 +705,14 @@ void smtp_rcpt(void) { return; } - if (valid->num_internet > 0) { - if ( (SMTP->message_originated_locally == 0) - && (SMTP->is_lmtp == 0) ) { - cprintf("551 <%s> - relaying denied\r\n", ChrPtr(SMTP->OneRcpt)); - free_recipients(valid); - return; - } + if ( + (valid->num_internet > 0) // If it's outbound Internet mail... + && (SMTP->message_originated_locally == 0) // ...and also inbound Internet mail... + && (SMTP->is_lmtp == 0) /// ...and didn't arrive via LMTP... + ) { + cprintf("551 <%s> - relaying denied\r\n", ChrPtr(SMTP->OneRcpt)); + free_recipients(valid); + return; } cprintf("250 RCPT ok <%s>\r\n", ChrPtr(SMTP->OneRcpt));