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

relay plugin ignores empty $ENV{RELAYCLIENT}

July 20, 2015 05:34
relay plugin ignores empty $ENV{RELAYCLIENT}
Message ID:
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.


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->log(LOGINFO, "pass, enabled by env");
          return DECLINED; Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About