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

invalid_localhost test in helo plugin?

From:
salvisbe
Date:
January 3, 2015 22:06
Subject:
invalid_localhost test in helo plugin?
Message ID:
trinity-57b00fc2-9061-49b9-b2db-a8321f923908-1420322780765@msvc-mesg-gmx003
How can this ever pass when receiving mail from the outside?

sub invalid_localhost {
    my ($self, $host) = @_;
    if ($self->is_localhost($self->qp->connection->remote_ip)) {
        $self->log(LOGDEBUG, "pass, is localhost");
        return;
    }
    if ($host && lc $host eq 'localhost') {
        $self->log(LOGDEBUG, "pass, host is localhost");
        return;
    };

    #$self->log( LOGINFO, "fail, not localhost" );
    return "You are not localhost", "invalid localhost";
}

What is the relation between the helo and fcrdns plugins? Isn't helo doing everything and more than fcrdns does?



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