On Wed, Feb 21, 2007 at 10:36:02PM +1300, Mark Signal wrote:
> Thank you for taking the time to respond.
>
> The mod doesn't seem to work in that sender addresses ending .nz are
> still being greylisted. Could there bee something else that I could have
> missed.
Where did you add Matt's snippet Mark? You should be adding it right
at the front of the mail_handler, unless you've turned deny_late on.
Also, the clean way to do this is via inheritance, rather than modifying
the plugin code directly, so future updates etc. don't lose your changes.
Put something like this in 'greylisting_nz':
sub init {
my $self = shift;
$self->isa_plugin('greylisting');
}
sub mail_handler {
my $self = shift;
my ($txn, $sender) = @_;
if ($sender->format =~ /\.nz>$/i) {
$self->log(LOGWARN, "Sender from NZ - skipping");
return DECLINED;
}
$self->SUPER::mail_handler( @_ );
}
and then use 'greylisting_nz' in your config/plugins file instead
of 'greylisting'.
Cheers,
Gavin
--
Gavin Carr
- http://www.openfusion.com.au - Linux, Perl, and Web Consulting
- http://www.xool.com.au - Xool, Australian property search engine
* Fashion is a variable, but style is a constant - Programming Perl