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

PATCH: Check relayclient in dnsbl

Thread Next
From:
Gordon Rowell
Date:
July 2, 2005 00:16
Subject:
PATCH: Check relayclient in dnsbl
Message ID:
42C63FCA.8080205@gormand.com.au
--- plugins/dnsbl.orig  2005-07-02 12:17:32.000000000 +1000
+++ plugins/dnsbl       2005-07-02 17:17:00.000000000 +1000
@@ -17,6 +17,8 @@
  sub connect_handler {
    my ($self, $transaction) = @_;

+  return (DECLINED) if $self->qp->connection->relay_client();
+
    my $remote_ip = $self->qp->connection->remote_ip;

    # perform RBLSMTPD checks to mimic Dan Bernstein's rblsmtpd
@@ -155,6 +157,8 @@
    my ($self, $transaction, $rcpt) = @_;
    my $connection = $self->qp->connection;

+  return (DECLINED) if $self->qp->connection->relay_client();
+
    # RBLSMTPD being non-empty means it contains the failure message to 
return
    if (defined ($ENV{'RBLSMTPD'}) && $ENV{'RBLSMTPD'} ne '') {
      my $result = $ENV{'RBLSMTPD'};

Thread Next


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