On Jul 02 11:18:30, [email protected] wrote:
> On Sun, 30 Jun 2013 21:13:06 +0200
> Jan Stary <[email protected]> wrote:
> >
> > Thank you for the port. I have been using
> > the previous verions from github.
> >
> > I am having the following problem with the default installation.
> >
> > Jun 30 10:35 2013 [email protected]: L="example" T="test" S=441
> > Use of uninitialized value $nconf{"archive"} in lc at /dev/fd/3 line
> > 1755, <CONF> line 6.
> > Jun 30 14:16 2013 [email protected]: L="mnichov" T="test" S=787
> > Use of uninitialized value $nconf{"archive"} in lc at /dev/fd/3 line
> > 1755, <CONF> line 6.
> > Insecure dependency in open while running with -T switch at /dev/fd/3
> > line 1883.
> > Jun 30 17:32 2013 [email protected]: L="mnichov" T="Re:
> > [mnichov] test" S=3 006
> >
> > The culprit seems to this line:
> >
> > $nconf{archive} = lc($nconf{archive}); } }
> >
> >
> > When I comment it out (but not the horrendously
> > styled and indented braces), minimalist works
> > just fine.
> >
> > I remember almost nothing from my Perl coding skills.
> > Could you please shed some light on what could be causing that?
> >
> > Thanks again
> >
> > Jan
> >
>
>
> Hi Jan,
>
> thanks for using and testig the port!
> does the following diff fix the error for you?
This patch doesn't seem to apply
to the minimalist.pl installed by minimalist-20130413
$ patch < /home/hans/minimalist.diff
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/minimalist.pl b/minimalist.pl
|index 8d683b7..684dd4c 100755
|--- a/minimalist.pl
|+++ b/minimalist.pl
--------------------------
Patching file minimalist.pl using Plan A...
Hunk #1 failed at 1752.
Hunk #2 failed at 1770.
Hunk #3 failed at 1779.
Hunk #4 failed at 1879.
4 out of 4 hunks failed--saving rejects to minimalist.pl.rej
done
> diff --git a/minimalist.pl b/minimalist.pl
> index 8d683b7..684dd4c 100755
> --- a/minimalist.pl
> +++ b/minimalist.pl
> @@ -1752,7 +1752,9 @@ sub read_config ($$) {
> $nconf{archive} = "pipe"; }
> else {
> $nconf{archpgm} = 'BUILTIN';
> - $nconf{archive} = lc($nconf{archive}); } }
> + $nconf{archive} = lc($value);
> + }
> + }
> when ('status') {
> # Calculate mask for status
> my %strel = ("open", $OPEN, "ro", $RO, "closed", $CLOSED,
> "mandatory", $MANDATORY);
> @@ -1768,7 +1770,8 @@ sub read_config ($$) {
> when ('maxusers') { $nconf{maxusers} = $value; }
> when ('maxrcpts') {
> $nconf{maxrcpts} = 20 if ($value < 1);
> - $nconf{maxrcpts} = 50 if ($value > 50); }
> + $nconf{maxrcpts} = 50 if ($value > 50);
> + }
> when ('delay') { $nconf{delay} = $value; }
> when ('maxsize') { $nconf{maxsize} = $value; }
> when ('language') { $nconf{language} = lc $value; }
> @@ -1776,7 +1779,8 @@ sub read_config ($$) {
> # Make lowercase if value isn't URL
> $nconf{listinfo} = lc($value) if ($value =~ /^(yes|no)$/i);
> # In global config only 'yes' or 'no' allowed
> - $nconf{listinfo} = 'no' if ($scope eq 'global' &&
> $nconf{listinfo} ne 'yes'); }
> + $nconf{listinfo} = 'no' if ($scope eq 'global' &&
> $nconf{listinfo} ne 'yes');
> + }
> when ('strip rrq') { $nconf{strip_rrq} = lc($value); }
> when ('modify message-id') { $nconf{modify_msgid} = lc($value); }
> when ('remove resent') { $nconf{remove_resent} = lc($value); }
> @@ -1875,7 +1879,12 @@ sub archive ($$$) {
> my $msgnum;
> if (open(NUM, $path."SEQUENCE")) {
> read NUM, $msgnum, 16;
> - $msgnum = int($msgnum);
> + if ($msgnum =~ /^([0-9]+)$/) {
> + $msgnum = int($1);
> + }
> + else {
> + die "Error reading sequence number from ${path}SEQUENCE";
> + }
> close NUM;
> }
> else { $msgnum = 0 }