check_earlytalker plugin. Deny the connection if the client talks
before we show our SMTP banner. (From Devin Carraway) Patch Qpsmtpd::SMTP to allow connect plugins to give DENY and DENYSOFT return codes. Based on patch from Devin Carraway. git-svn-id: https://svn.perl.org/qpsmtpd/trunk@133 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
224fe807e1
commit
22ca786bac
1
CREDITS
1
CREDITS
@ -5,6 +5,7 @@ check_badmailfrom and check_mailrcptto plugins.
|
||||
Devin Carraway <qpsmtpd@devin.com>: Patch to not accept half mails if
|
||||
the connection gets dropped at the wrong moment. Support and enable
|
||||
taint checking. MAIL FROM host dns check configurable. HELO hook.
|
||||
initial earlytalker plugin.
|
||||
|
||||
Andrew Pam <xanni@glasswings.com.au>: fixing the maximum message size
|
||||
(databytes) stuff.
|
||||
|
6
Changes
6
Changes
@ -1,5 +1,11 @@
|
||||
0.26-dev
|
||||
|
||||
check_earlytalker plugin. Deny the connection if the client talks
|
||||
before we show our SMTP banner. (From Devin Carraway)
|
||||
|
||||
Patch Qpsmtpd::SMTP to allow connect plugins to give DENY and
|
||||
DENYSOFT return codes. Based on patch from Devin Carraway.
|
||||
|
||||
Support morercpthosts.cdb
|
||||
|
||||
config now takes an extra "type" parameter. If it's "map" then a
|
||||
|
@ -7,7 +7,10 @@
|
||||
# http_config http://localhost/~smtpd/config/ http://www.example.com/smtp.pl?config=
|
||||
|
||||
quit_fortune
|
||||
|
||||
#check_earlytalker
|
||||
require_resolvable_fromhost
|
||||
|
||||
rhsbl
|
||||
dnsbl
|
||||
check_badmailfrom
|
||||
|
@ -73,9 +73,21 @@ sub start_conversation {
|
||||
# this should maybe be called something else than "connect", see
|
||||
# lib/Qpsmtpd/TcpServer.pm for more confusion.
|
||||
my ($rc, $msg) = $self->run_hooks("connect");
|
||||
if ($rc != DONE) {
|
||||
if ($rc == DENY) {
|
||||
$self->respond(550, ($msg || 'Connection from you denied, bye bye.'));
|
||||
return $rc;
|
||||
}
|
||||
elsif ($rc == DENYSOFT) {
|
||||
$self->respond(450, ($msg || 'Connection from you temporarily denied, bye bye.'));
|
||||
return $rc;
|
||||
}
|
||||
elsif ($rc == DONE) {
|
||||
return $rc;
|
||||
}
|
||||
elsif ($rc != DONE) {
|
||||
$self->respond(220, $self->config('me') ." ESMTP qpsmtpd "
|
||||
. $self->version ." ready; send us your mail, but not your spam.");
|
||||
return DONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package Qpsmtpd::TcpServer;
|
||||
use Qpsmtpd::SMTP;
|
||||
use Qpsmtpd::Constants;
|
||||
|
||||
@ISA = qw(Qpsmtpd::SMTP);
|
||||
use strict;
|
||||
|
||||
@ -25,7 +27,8 @@ sub run {
|
||||
# should be somewhere in Qpsmtpd.pm and not here...
|
||||
$self->load_plugins;
|
||||
|
||||
$self->start_conversation;
|
||||
my $rc = $self->start_conversation;
|
||||
return if $rc != DONE;
|
||||
|
||||
# this should really be the loop and read_input should just get one line; I think
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user