From 26becea3d40d26790b9299e27f94c6b3b3ecb084 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Sat, 23 Mar 2013 02:17:45 -0400 Subject: [PATCH] qm_deliverable: added reject option, karma smite award senders -1 karma to senders to invalid addresses --- plugins/qmail_deliverable | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/plugins/qmail_deliverable b/plugins/qmail_deliverable index 91f6813..ec45024 100755 --- a/plugins/qmail_deliverable +++ b/plugins/qmail_deliverable @@ -45,6 +45,19 @@ option must be enabled in order for user-ext@example.org addresses to work. Default: 0 +=item reject + +karma reject [ 0 | 1 | connect | naughty ] + +I<0> will not reject any connections. + +I<1> will reject naughty senders. + +I is the most efficient setting. + +To reject at any other connection hook, use the I setting and the +B plugin. + =back =head1 CAVEATS @@ -155,6 +168,9 @@ sub register { if ( $args{vpopmail_ext} ) { $Qmail::Deliverable::VPOPMAIL_EXT = $args{vpopmail_ext}; }; + if ( $args{reject} ) { + $self->{_args}{reject} = $args{reject}; + }; } $self->register_hook("rcpt", "rcpt_handler"); } @@ -206,7 +222,8 @@ sub rcpt_handler { return DECLINED; }; - return (DENY, "Sorry, no mailbox by that name. qd (#5.1.1)" ); + $self->adjust_karma( -1 ); + return $self->get_reject( "Sorry, no mailbox by that name. qd (#5.1.1)" ); } sub _smtproute {