You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Di Martino <Di...@telx.com> on 2006/06/20 21:35:52 UTC

ham and spam

I am sure this has been posted b/4 however I am having a hard
time finding it in the archives

How does one feed bayes ham and spam on an smpt gateway(no local
deliverey).
All sever does is accetp mail for one 2 domains scrub for virus and spam
and
then forward it to its nastly littly exchange server.
 


Regards,
Michael Di Martino
Director of MIS
The telx Group, Inc
17 State St 33rd Floor
New York, NY 10004
p:  212.480.3300
m: 646.207.6603
www.telx.com

-----Original Message-----
From: Dirk Bonengel [mailto:dirk@bonengel.de] 
Sent: Tuesday, June 20, 2006 11:57 AM
To: users@spamassassin.apache.org
Subject: Re: How to install iXhash

Marc,

just drop both files (.cf and .pm) into the directory where your
local.cf is.
One important piece of (missing) info: You must be running SA v 3.1.0 or
higher (not 3.0 as stated). If this is a problem I can easily post a
version working with 3.0.x

Dirk

Marc Perkel schrieb:
>
>
> Matt Kettler wrote:
>> Marc Perkel wrote:
>>   
>>> Here's the link to the wiki, but I don't know what to do with it.
>>>
>>> http://wiki.apache.org/spamassassin/iXhash
>>>
>>>     
>> Disclaimer: I've never tried this. However, the following is a fairly

>> well educated guess at how to install it.
>>
>> 1) copy paste the bottom half into a file called iXhash.pm
>> 2) copy-paste the top half into a file called "ixhash.cf"
>> 3) place iXhash.pm somewhere that is global r/x
>> 4) edit the ixhash.cf to reflect where iXhash.pm is.
>> 5) copy ixhash.cf into /etc/mail/spamassasssin
>> 6) run spamassassin --lint
>> 7) if it passes, restart spamd or any other persistent daemons that 
>> use the spamassassin perl API.
>>
>>
>>   
>
> Thanks Matt - what directory would you put iXhash.pm in? If I get this

> to work I'll update the wiki.


Re: ham and spam

Posted by Steven Stern <su...@sterndata.com>.
John D. Hardin wrote:
> On Tue, 20 Jun 2006, Michael Di Martino wrote:
> 
>> How does one feed bayes ham and spam on an smpt gateway(no local
>> deliverey). All sever does is accetp mail for one 2 domains scrub
>> for virus and spam and then forward it to its nastly littly
>> exchange server.
> 
> Can you set up shared Exchange folders that can be exported to mbox
> format? If so, set up learn-ham and learn-spam folders, tell people to
> train to them, then periodically export them, transfer them to the SA
> host, and run sa-learn on them.
> 
> Perhaps someone sufficiently motivated could write an sa-learn <->
> IMAP client utility to train from arbitrary IMAP folders hosted
> remotely...
> 

We have trained users to put misclassified ham and spam into two public
folders, should-be-spam and should-be-ham.  We created an exchange user,
spamiam, that has full rights to these folders.

At the top of every hour, this script is run on the one MX server:


# more get_ham_spam
#! /bin/sh
rm -f /var/spool/mail/spamiam
touch /var/spool/mail/spamiam
chown spamiam:mail /var/spool/mail/spamiam
su  spamiam -c 'fetchmail -a -K -f
/usr/local/scripts/spamiam.fetchmailrc -r "Public Folders/should-
be-spam"'
cat /var/spool/mail/spamiam >> /var/www/html/spamstuff/should-be-spam
sa-learn --spam --mbox /var/www/html/spamstuff/should-be-spam
rm -f /var/spool/mail/spamiam
touch /var/spool/mail/spamiam
chown spamiam:mail /var/spool/mail/spamiam
su  spamiam -c 'fetchmail -a -K -f
/usr/local/scripts/spamiam.fetchmailrc -r "Public Folders/should-
be-ham"'
cat /var/spool/mail/spamiam >> /var/www/html/spamstuff/should-be-ham
sa-learn --ham --mbox /var/www/html/spamstuff/should-be-ham

# more spamiam.fetchmailrc
poll    exchange.xxxx.com
        proto imap
        user spamiam
        password xxxxxxxxx
        is spamiam here

At 15 past each hour, the two other mail servers use wget to grab the
should-be files to their local /tmp and run sa-learn.

The files are included in logrotate, so they get zero'd every Sunday
morning.

-- 

  Steve

RE: ham and spam

Posted by Bret Miller <br...@wcg.org>.
> 
> > How does one feed bayes ham and spam on an smpt gateway(no local
> > deliverey). All sever does is accetp mail for one 2 domains scrub
> > for virus and spam and then forward it to its nastly littly
> > exchange server.
> 
> Can you set up shared Exchange folders that can be exported to mbox
> format? If so, set up learn-ham and learn-spam folders, tell people to
> train to them, then periodically export them, transfer them to the SA
> host, and run sa-learn on them.
> 
> Perhaps someone sufficiently motivated could write an sa-learn <->
> IMAP client utility to train from arbitrary IMAP folders hosted
> remotely...

Actually a few people have created various versions of that already. I
modified one based on the IMAP interface found here
http://gagravarr.org/code/ and use that. I found another here
http://www.dmzs.com/tools/files/spam.phtml. 

Essentially, they just use IMAP to retrieve messages from the learn-spam
and learn-ham folders (or whatever you want to call them), and pass it
to SA to learn.

I don't use Exchange, but it is my understanding that it supports IMAP
access to its folders...

Bret




Re: ham and spam

Posted by "John D. Hardin" <jh...@impsec.org>.
On Tue, 20 Jun 2006, Michael Di Martino wrote:

> How does one feed bayes ham and spam on an smpt gateway(no local
> deliverey). All sever does is accetp mail for one 2 domains scrub
> for virus and spam and then forward it to its nastly littly
> exchange server.

Can you set up shared Exchange folders that can be exported to mbox
format? If so, set up learn-ham and learn-spam folders, tell people to
train to them, then periodically export them, transfer them to the SA
host, and run sa-learn on them.

Perhaps someone sufficiently motivated could write an sa-learn <->
IMAP client utility to train from arbitrary IMAP folders hosted
remotely...

--
 John Hardin KA7OHZ    ICQ#15735746    http://www.impsec.org/~jhardin/
 jhardin@impsec.org    FALaholic #11174    pgpk -a jhardin@impsec.org
 key: 0xB8732E79 - 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  You are in a maze of twisty little protocols,
  all written by Microsoft.
----------------------------------------------------------------------