Malte S. Stretz wrote:

I'm writing this backwards, short minor points first so they don't get lost in my large message:

At the end of this I got all tests working under Windows except spamd_unix.t which wasn't supposed to be run but tried because of a typo: It says RUNNING_IN_WINDOWS instead of RUNNING_ON_WINDOWS in two places near the beginning.

I can't test dns.t behind the firewall where I am now, but it did behave as expected in this environment.

The makefile calls perl2bat on spamc.exe which is not correct. perl2bat is supposed to be called only on perl scripts. I this is something to fix in Makefile.PL. It doesn't really hurt anything, just creates a bogus bat file named spamc.exe.bat.

Ok, now for the heart of this message:

You need to set the following variables:
  SPAMD_FORKER=start \cygwin\bin\perl
  SPAMD_SCRIPT=\cygwin\bin\perl -w -T /bin/spamd

I don't like having to use all these environment variables, and I don't think both are necessary.


Since the tests run under SATest.pm are always running in a native perl environment, you can always set $spamd_fork to "start $perl_path" when running under Windows and $perl_path otherwise.

The Windows perl is perfectly capable of running SATest.pl to invoke spamd after doing the redirection.

I just tried it and it works. The only change I made was at line 280 in SATest.pm

  my $spamd_forker = $perl_path;
  $spamd_forker = "start " . $spamd_forker if ($^O =~ /^MS(DOS|Win)/i);

And I had SPAMD_SCRIPT set to

SPAMD_SCRIPT=\cygwin\bin\perl -w -T /bin/spamd --syslog-socket none

 -- sidney



Reply via email to