On
your Linux box create three mail aliases (In sendmail
syntax)
spamlearn: "|/usr/local/bin/sa-learn
--spam --norebuild"
hamlearn:
"|/usr/local/bin/sa-learn --ham --norebuild"
spamforget: "/usr/local/bin/sa-learn
--forget --norebuild"
Install a copy of Fetchmail on your Linux box and create three
.fetchmailrc files (I call mine .fetchmailrc-spam, .fetchmailrc-ham,
.fetchmailrc-forget) with a content of something like:
----
#
Configuration created Fri Nov 14 07:36:28 2003
set no
bouncemail
set no spambounce
set properties ""
defaults proto imap
poll mailbox.hunter.com proto imap
user "NTDomain/UserName/MailboxName" pass "userpassword"
is spamlearn here folder "Your spam folder" keep fetchall no rewrite
set no spambounce
set properties ""
defaults proto imap
poll mailbox.hunter.com proto imap
user "NTDomain/UserName/MailboxName" pass "userpassword"
is spamlearn here folder "Your spam folder" keep fetchall no rewrite
----
This
one feeds the "spamlearn" alias (note the "is spamlearn here") change that for
the ham and forget folders.
Make
sure IMAP is enabled on your Exchange server.
Create
a public folder to put spam in.
Create
a public folder to put ham in.
Create
a public folder to put things to be forgotten (False
positives).
Add
crontab entries on your Linux box which run fetchmail with each of the three
.fetchmailrc files, this MUST be either in the crontab of the user that sendmail
runs as or in your /etc/crontab file run as your mail user. This works on
FreeBSD:
45 */4
* * * mailnull /usr/local/bin/fetchmail -f
/path/to/.fetchmailrc-spam
15 */4 * * *
mailnull /usr/local/bin/fetchmail -f
/path/to/.fetchmailrc-ham
35 */6 * * *
mailnull /usr/local/bin/fetchmail -f
/path/to/.fetchmailrc-forget
15 01 * * *
mailnull /usr/local/bin/sa-learn
--rebuild
Seems
to work for me here after using this for about 3 weeks.
-----Original Message-----
From: Gabrie van Zanten [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 3:21 PM
To: [EMAIL PROTECTED]
Subject: [SAtalk] Using outlook mail to feed sa-learnHi
I have about 7000 spam messages in an Outlook pst file. I tried exporting the pst to a text file, but after two hours processing this file, sa-learn told me it had seen only 1 message.
What should a text file with mail in it look like?
Or does someone know a good way to transfer the mail from exchange / outlook to my linux mailgateway system?
Gabrie