Robin Bowes said the following on 10/01/2006 15:13:
> 
> Hmmm. I'm using:
> 
>     # map to cdb file containing valid local email addresses
>     my %validrcptto = $self->config( 'validrcptto.cdb', 'map' )
>       || return DECLINED;
> 
> I get this in the log file;
> 
> 2006-01-10 15:13:48.853805500 7730 FATAL PLUGIN ERROR:  Can't locate
> object method "config" via package
> "Qpsmtpd::Plugin::check_validrcptto_cdb" at
> ./plugins/check_validrcptto_cdb line 46, <STDIN> line 3.
> 
> What am I doing wrong?

Got it.

Several things really...

1. Use $validrcptto not %validrcptto
2. Don't specify the .cdb extension (can someone confirm how this works?
Does the code take the filename and append ".cdb" ?
3. (and this is the main problem) The config object is under $self->qp,
e.g.:

    # map to cdb file containing valid local email addresses
    my $validrcptto = $self->qp->config( 'validrcptto', 'map' )
      || return DECLINED;

All working again now.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

Reply via email to