[Mimedefang] Tie to aliases.db doesn't work

Matthew Schumacher matt.s at aptalaska.net
Mon May 23 22:37:05 EDT 2005


List,

I just can't figure this out.  This code:

require DB_File;
use Fcntl;
tie %aliases, "DB_File", "/etc/mail/aliases.db", O_RDONLY;

while ( ($k,$v) = each %aliases ) {
    print "$k => $v\n";
}

finds all of the keys and values and works just fine:

root => matt.s at aptalaska.net
@ => @
nobody => root

However if I try to pull out a specific value with:

require DB_File;
use Fcntl;
tie %aliases, "DB_File", "/etc/mail/aliases.db", O_RDONLY;

print $aliases{root};

It doesn't work.  If I use `makemap hash aliases < aliases` to make the
database all is well, but when I make it with newaliases I can't find a
value in the hash by key name.

Any ideas?

Thanks,

schu



More information about the MIMEDefang mailing list