Matt Sergeant said the following on 10/01/2006 14:11:
> On 10 Jan 2006, at 05:44, Robin Bowes wrote:
>
>> # cdb file containing valid local email addresses
>> my $validrcptto_file = 'config/validrcptto.cdb';
>>
>> # don't check if file not readable
>> return (DECLINED) if ( ! -f $validrcptto_file );
>>
>> # Open the cdb file and tie to hash
>> tie my %rcpt, 'CDB_File', $validrcptto_file or
>> return (DECLINED);
>
>
> As Ask suggested, use:
>
> my $rcpt = $self->config('validrcptto', 'map') || return DECLINED;
>
> Saves you a bit of code :-)
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?
R.
--
http://robinbowes.com
If a man speaks in a forest,
and his wife's not there,
is he still wrong?