Perl Help? (OT)
Pete
pete at eatathome.com.au
Thu Apr 8 14:17:43 IST 2004
I know this is OT, but so many people here know this stuff... and it is
kinda MS related, my scripts is for postfix/mailscanner :)
This script is for queriying LDAP (lotus Domino) and building a postfix
access map. www.eatathome.com.au/maps/gettext.zip
<http://www.eatathome.com.au/maps/gettext.pl.txt>
Previously i had to use a bash script to do
% scriptname > textfile
% postmap textfile
The reason i added the email die error msgs is because its pretty
important to know if this has failed to update or real email can get
bounced, because using the above method of populating the textfile i can
never know if the script returned nothing before it deletes and
recreates a new blank textfile - so i figured i either needed to make
the for loop in the script write to the textfile directly, but only if
hadnt already died - safe enough, but beyond my skills.
Or i could use a bash script to run the script and do something like the
following
% scriptname > tempfile
% does the tempfile contain anything
% then cp tempfile to relay_maps_file
% postmap relay_maps_file
% else do nothing
The only other way i can think of doing this is to include the writing
to output file inside of the main script? But how?
If anyone has the time, could you give me a hint on what i would need
to do? i have uploaded the script www.eatathome.com.au/maps/gettext.zip
<http://www.eatathome.com.au/maps/gettext.pl.txt>
More information about the MailScanner
mailing list