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. > > Is it possible to define a custom @foo? Or would it be more direct to > read_hash() within the @client_ipaddr_policy declaration? Incidentally, is > there a way to specify hostnames in addition to IPs in the aforementioned > policy list? i.e. .google.com instead of enumerating all their sending IPs > and/or the associated CIDR. > > If any of these are explained in the RELEASE_NOTES or docs, please feel free > to hit me with a cluebat. :-) > ------------------------------------------------------------------------------ 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 AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/