develooper Front page | perl.qpsmtpd | Postings from July 2015

relay plugin ignores empty $ENV{RELAYCLIENT}

From:
frank
Date:
July 20, 2015 05:34
Subject:
relay plugin ignores empty $ENV{RELAYCLIENT}
Message ID:
alpine.LRH.2.03.1507200123440.9351@they.org
Upgrading from a heavily customized and ancient version, I've always used 
an empty $RELAYCLIENT in my tcpserver configs but the latest version 
ignores the empty variable. This fixed it for me.

-frank



diff --git a/plugins/relay b/plugins/relay
index fdae3ad..6c7974b 100644
--- a/plugins/relay
+++ b/plugins/relay
@@ -230,7 +230,7 @@ sub hook_connect {
          return DECLINED;
      }

-    if ($ENV{RELAYCLIENT}) {
+    if (defined $ENV{RELAYCLIENT}) {
          $self->qp->connection->relay_client(1);
          $self->log(LOGINFO, "pass, enabled by env");
          return DECLINED;




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About