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

badrcptto ignores $reason

From:
frank
Date:
July 20, 2015 05:19
Subject:
badrcptto ignores $reason
Message ID:
alpine.LRH.2.03.1507200117020.9351@they.org
The badrcptto plugin says it lets you give a custom response for a 
matching regex but the code doesn't appear to use it. Shouldn't it be 
something like this?

Thanks
-frank


diff --git a/plugins/badrcptto b/plugins/badrcptto
index 0dec099..eb3d31c 100644
--- a/plugins/badrcptto
+++ b/plugins/badrcptto
@@ -66,7 +66,7 @@ sub hook_rcpt {
          if ($self->is_match($to, lc($bad), $host)) {
              $self->adjust_karma(-2);
              if ($reason) {
-                return DENY, "mail to $bad not accepted here";
+                return DENY, $reason;
              }
              else {
                  return Qpsmtpd::DSN->no_such_user(




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