You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Sidney Markowitz <si...@sidney.com> on 2004/01/19 03:10:14 UTC

Re: More on spamd/win

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


Re: More on spamd/win

Posted by Sidney Markowitz <si...@sidney.com>.
Malte S. Stretz wrote:
> I checked in those changes, now everything should run smoothly.

It all tests out ok in both Cygwin and Windows.

Thanks!

  --sidney


Re: More on spamd/win

Posted by "Malte S. Stretz" <ms...@gmx.net>.
On Monday 19 January 2004 03:10 CET Sidney Markowitz wrote:
> 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.

Whoops. Corrected.

> 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.

Yeah, I wondered about that, too. But that's done automagically by EU::MM, 
nothing I can change.

> 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.

Good point.

> 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

The --syslog-socket isn't necessary, too. It's set automagically to that 
value if --syslog stderr is used.

I checked in those changes, now everything should run smoothly.

Cheers (and Thanks for your help),
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>