On Sat, 01 Aug 2009, Mike Cappella wrote:
> On 8/1/09 7:26 PM, Sahil Tandon wrote:
> > In amavisd.conf, I have:
> >
> > @trusted_networks = ( read_hash("$MYHOME/trusted_networks") );
> >
> > and:
> >
> > @client_ipaddr_policy = (
> > \...@trusted_networks => 'BYPASS',
> > \...@mynetworks => 'MYNETS',
> > );
> >
> > which leads to:
> >
> > Error in config file "/usr/local/etc/amavisd.conf": Global symbol
> > "@trusted_networks" requires explicit package name at
> > /usr/local/etc/amavisd.conf line 36.
> > Global symbol "@trusted_networks" requires explicit package name at
> > /usr/local/etc/amavisd.conf line 55.
>
> The error is telling you that the perl compiler cannot find its
> definition in the current package name. This occurs when "use strict"
> is in force. So you have to define it if it doesn't exist:
>
> our @trusted_networks = ( read_hash("$MYHOME/trusted_networks") );
>
> or be explicit with the package name if it did: Eg:
>
> Amavis::@trusted_networks = ( read_hash("$MYHOME/trusted_networks") );
>
> Since you are defining it, just declare it global with "our". You could
> use "my" as well since you are using @trusted_networks in the same perl
> package.
>
> I believe this answers your Q 1 below. I don't know about Q 2.
Indeed, thank you. Sorry for the trivial oversight.
--
Sahil Tandon <[email protected]>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/