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
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!