Cleaned up another set of conditionals in the SMTP server.
authorArt Cancro <ajc@citadel.org>
Mon, 29 Nov 2021 15:43:14 +0000 (10:43 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 29 Nov 2021 15:43:14 +0000 (10:43 -0500)
citadel/modules/smtp/serv_smtp.c

index 2a4b8464281b9d5cb6949edd90c7ae16f2c2dfc4..a74e2bb9fa7fc0fdf9927a937afd42d484ac520d 100644 (file)
@@ -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));