LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] hash tables

[ILUG] hash tables

lbedford at wbtsystems.com lbedford at wbtsystems.com
Tue Aug 3 12:00:32 IST 1999


I have a strange problem in work. I have two machines, one with RedHat 6.0, 
and one with RedHat 5.2. (stock, upgrades haven't gone through yet). They're 
both running whichever version of sendmail came with them, and use 
/etc/mail/popip.db as a hash database to allow relaying from (which is updated 
by poprelayd.pl). It works fine on 5.2, but on 6.0, the perl script and 
sendmail seem to use different versions of the hash files. Sendmail's version 
ends with lots of ÿÿÿÿÿ. The perl script one doesn't.

Anyone know much about hash files and version? The perl script as follows is 
roughly equivalent to the full one, and if I let it create the hash file, it 
works fine.

-----------[ perl script ]------------------
#!/usr/bin/perl -w
use Fcntl;
use GDBM_File;
use POSIX;

tie %db, "GDBM_File", "localip.db",O_RDWR|O_CREAT,0640 ||\
        die "Can't open localip.db: $!\n";

$db{"192.168.1.1"} = "OK";
$db{"193.120.231.1"} = "OK";

foreach $key (sort(keys(%db))) {
        print "$key\n";
}

untie %db;
-------------[ end perl ]-------------------


Regards
L.
-- 
---
Liam Bedford							System Administrator
WBT Systems, Block 2, Harcourt Centre, Harcourt St.			01-4170153
18, Edenbrook Manor, Rathfarnham, Dublin 14				01-4950344






More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell