You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Lee <uk...@btinternet.com> on 2009/06/28 07:36:14 UTC

SA on Windows (XP) with Cygwin

Hello René and anyone else who has run SA on Windows under Cygwin,

I've been dabbling a little with this, having not used Cygwin 
beforehand, and I think I have grasped the basic operational principles 
of installing/building modules and SA, but it appears it may turn out to 
be a waste of time and fruitless venture; by that I mean it seems to be 
a pain or impossible to get various modules working including things 
like DCC and Razor. Is this indeed the case?
I think however René earlier said he had a 'full' install working?
 
Bearing in mind I am only a Windows XP person, whose grasp of 'command 
line' operations previously went no further than basic .bat files or 
using 'run' and typing 'cmd' 'ok', I need a relatively guaranteed and 
specific guide on how to get all the above working, should it in fact be 
possible.
As usual, I've found various bits and pieces on the net on SA under 
Cygwin, but none fully comprehensive or seemingly up to date.

My thinking is;  I only want to pursue SA under Cygwin if I can at least 
achieve a better and more up to date equivalent of the Sourceforge 
September 2007 package of SAwin32/SAProxy. Otherwise, I may as well 
revert to using Popfile which is an active project although just a naive 
bayesian training method. (I think.)
I appreciate I will also need to install some other bits to pipe the 
emails into SA and out to a desktop email client; presumably this will 
involve something like Procmail or  Fetchmail which were mentioned 
recently. Maybe even a Windows mail server. I do appreciate all this may 
be considered highly excessive for the sake of filtering personal email, 
but I like a project as long as I know how to do it specifically and can 
be assured it will work.

For info, here's what that SAwin32/SAProxy package claims/claimed to do:
-------------------------------------------------------
SpamAssassin POP3 Proxy for Win32 (SAproxy) v3.2.3.3

Includes SpamAssassin v3.2.3, DCC v1.3.58 and Vipul's Razor v2.84.

This tool is a free and powerful spam filter for any Microsoft
Windows mail client (Outlook Express, Eudora, Microsoft Outlook, etc.).
It supports SSL, but it is for POP3 accounts only and will not work with
IMAP, Exchange, Lotus, web-based (such as Hotmail) and other non-POP3
accounts.

It includes SpamAssassin (http://spamassassin.apache.org/)
and fully supports online spam databases 
DCC(http://www.rhyolite.com/anti-spam/dcc/) and Razor 
(http://razor.sf.net/).
This build is based on free SAproxy v1.2 and is not associated with
Stata Labs (which no longer sells SAproxy Pro).
----------------------------------------------------------

So, can an up to date and painless build of that be achieved under 
Cygwin? If so, which specific Cygwin and CPAN modules (and versions) 
will work with SA 3.2.5 or at least SA 3.2.4?

Thanks in advance;
if you feel it is most likely going to be a pain and an unknown 
quantity, just tell me so, and I won't frustrate myself with attempting 
this line of thought any further.
I appreciate one or two posters have already said / implied this.

Lee
UK

Re: SA on Windows (XP) with Cygwin

Posted by Lee <uk...@btinternet.com>.
Thanks for the below, Martin.
Maybe so far I missed it on the web, but that's the clearest description 
I've come across and actually makes sense to me.
:)

Lee

 
Martin Gregorie wrote:
> The main benefit for low volume (personal) mail is that using
> spamc/spamd avoids the considerable start/stop times of vanilla SA.
> spamd is a server that starts at boot time and runs until shutdown while
> raw SA is started and stopped for every message. spamc replaces SA in
> the message processing chain. All it does is to pass messages to spamd
> for inspection and tagging. Its a small C program, so it starts and
> stops very fast.
>
>
> Martin
>
>
>
>   

Re: SA on Windows (XP) with Cygwin

Posted by Martin Gregorie <ma...@gregorie.org>.
On Mon, 2009-06-29 at 02:45 +0100, Lee wrote:
> I've yet to grasp the purpose of SpamC and/or SpamD on Windows in my 
> kind of scenario. I've seen mention of them a lot in my web searches, 
> but all I think I have yet grasped is that SpamC makes the mail 
> filtering faster due to a multi threaded approach at calling SA. Have I 
> got that right?
> 
The main benefit for low volume (personal) mail is that using
spamc/spamd avoids the considerable start/stop times of vanilla SA.
spamd is a server that starts at boot time and runs until shutdown while
raw SA is started and stopped for every message. spamc replaces SA in
the message processing chain. All it does is to pass messages to spamd
for inspection and tagging. Its a small C program, so it starts and
stops very fast.


Martin



Re: SA on Windows (XP) with Cygwin

Posted by RW <rw...@googlemail.com>.
On Mon, 29 Jun 2009 18:20:57 -0500
René Berber <r....@computer.org> wrote:


> The alternative, as said before, is fetchmail (or similar: fdm,
> animail, mailfiter, etc.)  Its more complicated because you also need
> to install and configure procmail, 

FWIW you don't actually need procmail In this context getmail could
replace fetchmail and procmail.

Re: SA on Windows (XP) with Cygwin

Posted by René Berber <r....@computer.org>.
Lee wrote:

> Hello Kevin,
> 
> I agree with you regarding my ambitions V ability. I have decided to
> give up. I do however still want to find something for free and using
> online lookups, but I appreciate that's not for here. I'm aware I am
> resisting one or two commercial desktop solutions apparently offering
> what I'm looking for.

I think your objective wasn't clear from the start, now it is and that's
a plus.

Another point is you came asking in this forum which is 99% sys admins
with mail servers, 1% desktop users.  SA is useful for both as you can
deduce from seeing pages like :
	http://wiki.apache.org/spamassassin/SingleUserUnixInstall

What you are looking for is not unusual.  Like I mentioned, there's
SpamAware for Outlook and nothing for Thunderbird... but there's
something close for TB and ClamAV (and with 3rd party signatures you can
use ClamAV as anti-spam, it already does anti-phishing and safe browsing
besides anti-virus).

Take a look at https://addons.mozilla.org/en-US/thunderbird/addon/6663,
the needed ClamAV is distributed with Cygwin.

The alternative, as said before, is fetchmail (or similar: fdm, animail,
mailfiter, etc.)  Its more complicated because you also need to install
and configure procmail, and at least something like UW IMAP; not
difficult but you have to learn to configure all of those.

The idea with fetchmail, to make things clear, is to use it to get all
your mail from external servers (pop3, imap, pop3s, imaps), pipe the
messages through procmail which pipes it through SA and classifies it if
necessary, and then deliver the messages with dmail.  Your mail client,
Thunderbird, connects only to your local IMAP server (UW IMAP since
that's the only one distributed with Cygwin) and you can use TB's
built-in functionality to use SA's headers.

Now that I was writing this I looked TB's options and besides SA there
is support for SpamPal... looks interesting, and it comes from Steve
Basford which is very well known for us ClamAV users.  Its a proxy, much
better than others I've seen.  Here's a link:
	http://spampal.sanesecurity.com/
-- 
René Berber


Re: SA on Windows (XP) with Cygwin

Posted by Lee <uk...@btinternet.com>.
Hello Kevin,

I agree with you regarding my ambitions V ability. I have decided to 
give up. I do however still want to find something for free and using 
online lookups, but I appreciate that's not for here. I'm aware I am 
resisting one or two commercial desktop solutions apparently offering 
what I'm looking for.


Kevin Parris wrote:
> This part of your message has really confused me about what you are trying to accomplish:
>
>   
>>>> Lee  06/28/09 9:45 PM >>>
>>>>         
>>> I need the ability for SA to connect to SSL connections as well as insecure
>>> ones, so I don't know if I have to install extra bits for that, maybe including
>>> openSSL and Stunnel on Cygwin. Again, I have seen bits and pieces implying
>>> this may be the case.
>>>       
>
> If you are one person trying to filter spam for one mailbox on a single-user Windows system, why do you need a filtering product that will listen on more than one connection, much less more than one type of connection?
>   
What I meant is; I have various POP accounts from various suppliers, 
some requiring or offering a secure connection, and some not.
> Separate question: have you considered switching to an ISP that provides spam filtering as part of their email service, and save yourself all the bother?
>   
I currently have a mixture of free POP email accounts from Yahoo/BT 
Internet, UK Online and Sky(Gmail), all of which offer some method of 
junk filtering but I believe none specifically use SpamAssassin. I do 
prefer doing any spam detection myself at desktop level anyway, hence my 
obsession with SA being arguably the best, although sadly not aimed at 
desktops for free.
For info, my internet connection itself is provided by the ISP UK Online.

Lee

Re: SA on Windows (XP) with Cygwin

Posted by Lee <uk...@btinternet.com>.
Thanks for your reply, René,

René Berber wrote:
> The easy way is really easy: Install base Cygwin, then install perl and
> gcc (version 3.x or 4.x) for Cygwin (using the same installer:
> http://cygwin.com/setup-1.7.exe).  Use cpan shell and 'install
> spamassassin' ... that will pull all the dependencies (is a very long
> install, one of those where you only have to answer 'yes' to
> everything).  You still have to configure SA, the usual way, and at that
> point you have a working spamassassin command; 
I can handle that much ok so far, assuming no dependency installs fail. 
Then I have no idea what to do, except trying to 'force them' which may 
not work properly.
I need the ability for SA to connect to SSL connections as well as 
insecure ones, so I don't know if I have to install extra bits for that, 
maybe including OpenSSL and Stunnel on Cygwin. Again, I have seen bits 
and pieces implying this may be the case.

> spamd/spamc need more
> setting up, in Cygwin you use cygrunsrv to configure and install
> services, spamd is enabled as a service with that.
>   
I've yet to grasp the purpose of SpamC and/or SpamD on Windows in my 
kind of scenario. I've seen mention of them a lot in my web searches, 
but all I think I have yet grasped is that SpamC makes the mail 
filtering faster due to a multi threaded approach at calling SA. Have I 
got that right?

> Now, the above procedure I don't think it installs DCC and Razor (is
> that even used anymore?), I never used those plugins, but I used others
> and they are just as easy to install.
>   
If DCC and Razor no longer exist, especially for free, which other 
look-up / blacklist methods are recommended for SA? My plan had/has 
using DCC and Razor as a central benefit to it all, to avoid just naive 
bayesian training alone.
> There are more tools you'll need, like cron, bind, and perhaps others I
> don't recall.  The point being if you are not a sys admin or developer
> this gets more confusing as you progress; yes there are guides,
> articles, and books, but perhaps is overkill for what you really want.
>
> The second part of your question shows you don't have a clear idea of
> what to do with SA, procmail is a tool used if you run a mail server,
> fetchmail is a tool used if you don't (but fetch your mail from other
> server(s)).  With both tools the idea is to run spamassassin or spamc on
> each message, then use the added headers in your mail client; I haven't
> used them, I had exim which has support for using spamd (and clamd).
>   
I know what I want to do with SA, but I'm indeed not clear on how to 
achieve it, once having successfully installed the latest SA with 
necessary modules/plugins. I would need to explore mail piping and 
retrieval methods in much detail, probably more elsewhere than on here.
> You need to make a plan that solves your specific needs.  I still see
> SpamAware as a better choice, it beats SAWin which anyway was intended
> to be used on mail servers not mail clients, the POP3 proxy is an
> independent tool, not really needed if you have a proper plugin.
>   
The trouble is, I really am not keen on using Outlook Express to be able 
to use SpamAware. The Thunderbird spinoff seems to be 
discontinued/incomplete, as I think you said. I'm not fixated on keeping 
Thunderbird, and would happily move to another free client if it 
incorporated junk detection using online lookups. I'm aware of something 
called NoSpamToday but I read it runs on a Java Runtime Environment and 
reviews say it is very cumbersome and laggy. I think I mean NoSpamToday, 
anyway; I'm just typing this from memory.

So where does this leave me at the moment ... probably, as expected, 
still somewhat out of my depth with much work ahead, doesn't it ?  I 
suspect I will have to shortly conclude this whole project is really a 
non starter for me, and put it back in its box. Then just use TB and 
Popfile until the end of time.
Or indeed until a mystical time when a new XP/Vista desktop 
SAproxy/client gets made.
:)

Lee

Re: SA on Windows (XP) with Cygwin

Posted by René Berber <r....@computer.org>.
Lee wrote:

[snip]
> So, can an up to date and painless build of that be achieved under
> Cygwin? If so, which specific Cygwin and CPAN modules (and versions)
> will work with SA 3.2.5 or at least SA 3.2.4?
[snip]

The easy way is really easy: Install base Cygwin, then install perl and
gcc (version 3.x or 4.x) for Cygwin (using the same installer:
http://cygwin.com/setup-1.7.exe).  Use cpan shell and 'install
spamassassin' ... that will pull all the dependencies (is a very long
install, one of those where you only have to answer 'yes' to
everything).  You still have to configure SA, the usual way, and at that
point you have a working spamassassin command; spamd/spamc need more
setting up, in Cygwin you use cygrunsrv to configure and install
services, spamd is enabled as a service with that.

Now, the above procedure I don't think it installs DCC and Razor (is
that even used anymore?), I never used those plugins, but I used others
and they are just as easy to install.

There are more tools you'll need, like cron, bind, and perhaps others I
don't recall.  The point being if you are not a sys admin or developer
this gets more confusing as you progress; yes there are guides,
articles, and books, but perhaps is overkill for what you really want.

The second part of your question shows you don't have a clear idea of
what to do with SA, procmail is a tool used if you run a mail server,
fetchmail is a tool used if you don't (but fetch your mail from other
server(s)).  With both tools the idea is to run spamassassin or spamc on
each message, then use the added headers in your mail client; I haven't
used them, I had exim which has support for using spamd (and clamd).

You need to make a plan that solves your specific needs.  I still see
SpamAware as a better choice, it beats SAWin which anyway was intended
to be used on mail servers not mail clients, the POP3 proxy is an
independent tool, not really needed if you have a proper plugin.
-- 
René Berber