qpsmtpd Wiki

[[plugins:spam:nodialup]]

You are here: start » plugins » spam » nodialup

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Set new password

Plug-in Summary

Plug-in name: nodialup
Info: Disallow connections from known dialup FQDN
Author: tyskjohan
Email: Won't say
Compatibility: all
Download: here

nodialup

Informasi | Jasa SEO | Teknik Retrieve | Mancing

# Crude direct-connect stopper
# written by Johan Almqvist
sub hook_connect {
        my ($self, $transaction) = @_;
        my $remote_ip = $self->qp->connection->remote_ip;
        my $remote_host = $self->qp->connection->remote_host;
        my $reverse_remote_ip = join (".", reverse(split(/\./,$remote_ip)));
        if ($remote_ip eq $remote_host) {
                return (DENYSOFT, "Reverse DNS lookup for $remote_ip failed.");
        }
        elsif (($remote_host =~ /$reverse_remote_ip/)
                        || ($remote_host =~ /$remote_ip/)
                        || ($remote_host =~ /\.dsl\./)
                        || ($remote_host =~ /\.adsl\./)
                        || ($remote_host =~ /\.ppp\./)
                        || ($remote_host =~ /\.dhcp\./)
                        || ($remote_host =~ /\.dynamicIP\./)
                        || ($remote_host =~ /\.dynamic\./)
                        || ($remote_host =~ /\.dip\./i)
                        || ($remote_host =~ /\.abo\.wanadoo\.fr/i)
                        || ($remote_host =~ /\.pool\./))  {
                return (DENY, "Sorry, $remote_host ($remote_ip) seems to ".
                        "be a dialup, use your ISP's SMTP server");
        }
        else {  
                return DECLINED;
        }
}