On 5/21/2009 5:50 AM, Zhang Huangbin wrote: > MrC wrote: >> >> What is the value of your AMAVISD_DB_HOME environment variable? >> >> # echo AMAVISD_DB_HOME > > Perhaps you mean 'echo $AMAVISD_DB_HOME', right? It's empty. > > > Mark Martinec wrote: >> Perhaps you changed the line 60: >> my($db_home) = # DB databases directory >> and left the expression in the continuation line 61 dangling >> without an assignment. > > not changed.
Actually, it *is changed*. Compare yours with the original, at line 60: > > # grep -i 'db_home' /etc/amavisd.conf > $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D > > # grep -i 'db_home' /usr/sbin/amavisd-nanny > my($db_home) = "/var/amavis/db"; ^^^^^^^^^^^^^^^^^ this is line 60 > defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : > '/var/amavis/db'; 2 lines above are dangling, useless expressions. Your version is: $ cat /tmp/foo #!/usr/bin/perl -w my($db_home) = "/var/amavis/db"; defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; print "DB: $db_home\n"; $ /tmp/foo Useless use of hash element in void context at /tmp/foo line 4. Useless use of a constant in void context at /tmp/foo line 4. DB: /var/amavis/db Original version is: $ cat /tmp/foo #!/usr/bin/perl -w my($db_home) = # DB databases directory defined $ENV{'AMAVISD_DB_HOME'} ? $ENV{'AMAVISD_DB_HOME'} : '/var/amavis/db'; print "DB: $db_home\n"; $ /tmp/foo DB: /var/amavis/db > @dbstat = stat("$db_home/$dbfile"); > $errn==0 || $errn==ENOENT or die "stat $db_home/$dbfile: $!"; > printf STDERR ("Reopening nanny database %s/%s\n", $db_home,$dbfile); > -Home => $db_home, -Flags => DB_INIT_CDB | DB_INIT_MPOOL, > $db_home,$dbfile); > > My amavisd-new is 2.6.2. > > Thanks for your replies. :) > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ 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/