This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 6bb8f554734fc4b614452b19878ee69f2bb5d124
Author: Benoit Tellier <[email protected]>
AuthorDate: Mon Dec 6 16:11:30 2021 +0700

    JAMES-3680 SMTPServer: Refactor isRelayingAllowed
---
 .../src/main/java/org/apache/james/smtpserver/netty/SMTPServer.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServer.java
 
b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServer.java
index b2f5b38..56d15f3 100644
--- 
a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServer.java
+++ 
b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServer.java
@@ -235,11 +235,10 @@ public class SMTPServer extends 
AbstractProtocolAsyncServer implements SMTPServe
 
         @Override
         public boolean isRelayingAllowed(String remoteIP) {
-            boolean relayingAllowed = false;
             if (authorizedNetworks != null) {
-                relayingAllowed = 
SMTPServer.this.authorizedNetworks.matchInetNetwork(remoteIP);
+                return 
SMTPServer.this.authorizedNetworks.matchInetNetwork(remoteIP);
             }
-            return relayingAllowed;
+            return false;
         }
 
         @Override

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to