[Mimedefang] tie'd files
    Tuc at T-B-O-H.NET 
    ml at t-b-o-h.net
       
    Sat Aug 30 21:37:52 EDT 2008
    
    
  
Hi,
	I stole the following "filter_initialize" :
sub filter_initialize {
  require DB_File;
  use Fcntl;
  my($key,$val);
  tie %mailid, "DB_File", "/etc/mail/mailid.db", O_RDONLY;
  tie %variout, "DB_File", "/etc/mail/variout.db", O_RDONLY;
}
	and at the bottom of my filter_end I do :
      $varilookup = $variout{$LookupRecipient};
      if ($varilookup) {
        $changeto     = $varilookup;
      }
	pretty normal stuff. BESIDES the fact that the /etc/mail
maps are 640 (FreeBSD atleast) and owned by root/wheel, I'm running
into a more important problem... 
	If I update and remake the map, and then chmod it, the next
time the subroutine runs, it gets the OLD data. I've tried assigning
the tie to a variable, and then $variable->sync before and after any
use, but that doesn't seem to be helping.
	It seems to be something I've run into before when I was
writing a perl helper for Squid. Any long running process seems
not to pick up changes to the DB_File formatted files unless the
process is stopped and restarted.
	Am I fighting with a perl thats not working right, or
have I overlooked something? 
		Thanks, Tuc
    
    
More information about the MIMEDefang
mailing list