[ Michael S. James writes: ]
>
> Being the hack programmer that I am, I decided to take an easy way out of
> the 'Invalid archive directory' aborts. I'll present the cludge to see
> if anyone knows of any SERIOUS problems with it.
[...]
> I've been grappling with a portion of the archive2.pl script which causes
> problems with my system for some reason. The code and the cludge are
> presented side by side below.
>
> Cludge
> [snip] ======
> undef $valid_dir;
> foreach $dir (@archive_dirs) {
> if ($dir eq $dirname) { if ($dirname eq $dirname) ....
> $valid_dir = $dirname;
> last;
> }
> }
>
> That one line was all I changed. The archive file is not saved in the
> @archive_dirs directory, but directory up in the path. That's fine. I
> can adjust the pathnames in /etc/aliases & majordomo.cf accordingly to put
> the files where I want.
I really don't recommend doing this. That check is in there for your
protection. All you have to do is enter the proper directory names (yes,
you can have more than one, or even the glob I showed in an earlier
message) in @archive_dirs. If you still have questions as to the values
for @archive_dirs and the -f parameter on the resend alias, I'll try to
answer them via e-mail.
BTW, it's "a stitch in time saves nine". Aka "an ounce of prevention is
worth a pound of cure". Checking for a valid archive directory is the
prevention. Your cure has about 15.999999999999 ounces (US) to go. ;-)
--
Dave Wolfe *Not a spokesman for Motorola*
Motorola MMTG 6501 Wm. Cannon Dr. W. OE112 Austin TX 78735-8598
Follow-Ups:
References:
|
|