[Spambayes] pop3proxy and Mozilla documentatio (third try)

Remi Ricard papaDoc at videotron.ca
Tue Dec 3 01:56:31 2002


Hi again,

I don't know what is going on but my attachment are not following my
mail. (Evolution should be a good mail program ?????)

Since my documentation is not really big I will include it in my email

Here it comes
---------------------------
<!-- Authors: Remi Ricard papaDoc@videotron.ca -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?xml-stylesheet href="./style.css" type="text/css"?>
<html>

<HEAD>

</HEAD>

<TITLE>Documentation for the Spambayes pop3proxy.py program.</TITLE>

<BODY>

<CENTER><H1>Documentation for the Spambayes pop3proxy.py
program.</H1></CENTER>


This documentation will describe how to use pop3proxy.py with
Mozilla:mail.
But pop3proxy is not restricted to be used with mozilla. <BR>
<BR>
I will talk about mozilla:mail because this is the only mail
reader I use with pop3proxy.

<BR><BR>
<H3>First some definitions:</H3>

<UL>
<LI>
What is <A HREF="http://www.spambayes.org/">Spambayes</a>?
<p>
This project is developing a Bayesian anti-spam classifier, initially
based on the work of <A HREF="http://www.paulgraham.com/spam.html">Paul
Graham, in python.</A>
</p>
</LI>
<LI>
What is spam?
<P>
broadly speaking: any email that's not wanted by the end-user. More
specifically: unsolicited bulk email; email that you do not want and did
not ask for, and was sent to a whole bunch of people by automated means
at the same time it was sent to you. This definition deliberately
excludes viruses and those stupid jokes sent to you by your Aunt Tillie.
</P>
</LI>
<LI>
What is ham?
<P>
the opposite of spam; not necessarily email that you want or that you
asked for, just anything that's not unsolicited bulk email.
</P>
</LI>
<LI>
What is a proxy?
<P>
A proxy is a program that acts as an intermediary between your PC and
something.
(I hope this is general enough).
</P>
</LI>
</UL>

<HR>
Now that we have some definitions we can be more specific:<BR>
<BR>


<H3>So what is pop3proxy ?</H3>
<P>
pop3proxy.py is a program written by the <A
HREF="http://www.spambayes.org/">Spambayes team</a>, it is a middle man
installed between your current pop servers (usually provided by your
ISP) and your Mail reader. Upon request It will call your (or one of
your) usual pop servers and get mails from it. Then class the mail in 3
different categories: Spam|Ham|Unsure. After the classification, it will
add a new Header which is by default <EM>X-Spambayes-Classification</EM>
that you might look at to find the status of the mail. Then, it will
forward the mail to you the same way your usual pop server does
it.<BR><BR>
Your mail reader can use the new header to classify the mails into 3
categories: ham, spam and unsure.



pop3proxy.py can talk to as many pop servers that you want. For me I
have 3 pop server on 3 different ISP, but to simplify the documentation
I will only use two different pop servers. If you have only one pop
server then it is even simpler.
</P>
With pop3proxy installed and running:
<PRE>

  pop server on ISP                Proxy on localhost       Port on
localhost   Mail reader
                                                             
  --------------------             ---------------------         
----       
 |pop.videotron.ca:110|  <------->|                     | <----> |6110|
<-\     --------------
  --------------------            |                     |        
----     \   |              |
                                  | pop3proxy.py       
|                   -> | Mozilla:mail |
  ------------------              |                     |        
____     /   |              |
 |mail.ulaval.ca:110|    <_------>|                     | <----> |6111|
<-/     --------------
  ------------------               ---------------------          ----
</PRE>

Without pop3proxy installed and running:
<PRE>
 pop server on ISP                Mail reader
                                                             
  --------------------           
 |pop.videotron.ca:110|   <-\      --------------
  --------------------       \    |              |
                              ->  | Mozilla:mail |
  ------------------         /    |              |
 |mail.ulaval.ca:110|     <-/      --------------
  ------------------ 
</PRE>

If you keep in mind the <EM>pictures</EM> above I will explain how all
of this is working.

Usually when pop3proxy is not installed and you want to get your email
from your pop server.
You set you mail reader to talk to your pop server and tell the mail
reader to use port 110 to do that.
(the usual port for pop server). And you do this for all your pop
servers.<BR>
<BR>

When pop3proxy is running your mail reader will talk to pop3proxy and
ask it to get the mail
from different pop server (pop.videotron.ca or mail.ulaval.ca in the
picture above). To distinguish which pop server you want the mail from,
you will talk to pop3proxy on different ports. <BR>
<BR>
On the <EM>pictures</EM> aboves talking by the port 6110 (on your PC) to
pop3proxy will tell him to
talk to pop.videotron.ca. If you talk to pop3proxy by the port 6111 then
it will know that you what
the mail on the mail.ulaval.ca server.<BR>
<BR>
The association <EM>local port <--> pop server</EM> can be done when you
start pop3proxy by adding
some command line options or by configuring some parameters in the file
Options.py or by using the new
OptionConfig.py program.

<HR>

<H3>Settings the things up!</H3>

<H4>Modification to the Options.py file:</H4>
I changed the following lines:<BR>
<PRE>
pop3proxy_servers:
pop3proxy_ports:
</PRE>
for
<PRE>
pop3proxy_servers: pop.videotron.ca:110,mail.ulaval.ca:110
pop3proxy_ports: 6110, 6111
</PRE>
Note: The order is important since the first item in the
pop3proxy_servers list will be associated with the first item in the
pop3proxy_ports list. This mean that I have associated port 6110 on my
PC (i.e. localhost) to the pop server pop.videotron.ca. When I will be
talking to pop3proxy by the port 6110 it will know that I want the mail
from the server pop.videotron.ca.<BR>
<BR>
<H4>Modification to the Mail reader. (i.e Mozilla:mail)</H4>
You need to do some modification in the <EM>Mail & Newsgroups Account
Setting</EM> windows. To get this window start Mozilla. Then select the
menu <EM>Windows->Mail & Newsgroup</EM>. The <EM>Mail & Newsgroup</EM>
window will appear select the menu <EM>Edit->Mail & Newsgroups Account
Setting...</EM>. You will get the window you need. If you already have
created an Email account then you will need to edit this entry (See
below). But for now we will start from scratch.<BR>
<BR>
<UL>
<LI>We select: Add Account</LI>
<LI>We select: Email Account, then we press the Next Button</LI>
<LI>We enter the required information, then we press the Next
Button</LI>
<LI>We select: 
  <UL>
  <LI>For server type = POP (this is what most of us will need)</LI>
  <LI>Incoming Server = localhost (This is different since usually here
we were use to enter our ISP mail server but now the mail reader talk to
pop3proxy which is on our computer (i.e. localhost) and pop3proxy will
talk to the mail server.</LI>
  <LI>Outgoing Server: relais.videotron.ca (Here you enter what your ISP
had tell you what to enter. We follow what they said  since we don't
need to classify our outgoing mail. P.S. Spammer here you enter
dev_null.spammer.com), then we press the Next Button</LI>
  </UL>
</LI>
  <LI>We enter the required information (User Name), then we press the
Next Button</LI>
  <LI>We enter the required information (Account Name=ricard), then we
press the Finish Button</LI>
</UL>
Now you need to edit the information you just have entered to specify
the port we will use to talk to
pop3proxy.<BR>
In the left part of the window, select under the entry you created by
the above manipulation (for me it is ricard) the item Server Settings.
The right part of the window should change and you should have the
following fields.
<UL>
<LI>Server Name: localhost</LI>
<LI>User Name: ricard</LI>
<LI>Port: 110</LI>
</UL>
You need to change the port number to the one you specified in the file
Options.py. (For me I change this
to 6110). (For the next account I will use the second number of the line
pop3proxy_ports:.

<H3>Using the new header to classify the mail</H3>
To classify the mail we will use the filter option available in
mozilla:mail.<BR>
<BR>
First we need to create a new filter item. Usually we can filter on:
subject, sender or  body, but we need to filter on the new header
<EM>X-Spambayes-Classification</EM>. To do this you need at least one
account (see above on how to create a new account). 
<UL>
<LI>In the <EM>Mail & Newsgroups</EM> window select the menu
<EM>Tools->Message Filters...</EM></LI>
<LI>In the new window, click on new.</LI>
<LI>Create the new item by click on the arrow on the right of Subject,
then go to the item Customize in the drop down list.</LI>
<LI>Write <EM>X-Spambayes-Classification</EM> in the field and click the
<EM>Add</EM> button.</LI>
</UL>
Now it is possible to use this new header as a filter criteria. Since we
can do whatever you want with this new criteria I will give you the
setup I use.

<H3>Example on how to use the new filter item</H3>
In my in box I have 4 sub folders. 2 that receive the mail from mailing
lists (Spambayes and Freesco). One that receive mails that was
classified has unsure by pop3proxy and finally a sub folder for the
spams. The Inbox will have only mail from my friends (hopefully).<BR>
<BR> 
Each good folders filters with X-Spambayes-Classification = ham.
<PRE>
Inbox              (Filter on X-Spambayes-Classification = ham)
 |-----> Spambayes (Filter on Subject = [Spambayes] and
X-Spambayes-Classification = ham)
 |-----> Freesco   (Filter on Subject = [freesco] and
X-Spambayes-Classification = ham)
 |-----> Unsure    (Filter on X-Spambayes-Classification = unsure)
 |-----> Spam      (Filter on X-Spambayes-Classification = spam)
</PRE>


</BODY>
</HTML>
 
-- 
Remi Ricard <papaDoc@videotron.ca>




More information about the Spambayes mailing list