Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Feb 2002 14:25:19 -0500 (EST)
From:      Jim Sander <jim@federation.addy.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   /etc/mail/Makefile and virtusertable.db
Message-ID:  <Pine.BSF.4.10.10202131325120.69459-100000@federation.addy.com>
In-Reply-To: <200202131532.g1DFWKl02432@joeandlane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
   I've got my sendmail config'd up properly- everything works. But I need
to periodically examine a database, and rebuild my virtusertable. So I've
got a perl script to do that, looking roughly like this:

@data=read_from_database();
open VUT, ">temp.virtusertable";
for $line (@data){
   print VUT "$line\n";
}
close VUT;
rename "temp.virtusertable", "/etc/mail/virtusertable";
system("cd /etc/mail; make");

   Everything appears to work splendidly- the output this generates is:
/usr/sbin/makemap hash virtusertable.db < virtusertable

   The .db file does indeed appear to be updated, but when I do a
'praliases -f /etc/mail/virtusertable.db' I get zilch. So of course when I
send email to any of these virtualized email aliases, it gets returned as
'User Unknown' - and that's a bad thing.

   This happens both when I run the script via cron, and from the
command-line. If I log in via a shell and manually do the make- 
'cd /etc/mail; touch virtusertable; make' then I get what I expect from
praliases, and (duh!) incoming mail works.

   I've changed my script to do all sorts of things, including invoking
the "/usr/sbin/makemap" directly in numerous ways, all with the same exact
result. It seems that this functionality doesn't "like" being run out of
perl for some reason.

   Anyone seen this before? Any suggestions as to what I should look at
next? Need more information?

-=Jim=-







To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10202131325120.69459-100000>