website server_side.ht,1.6,1.7

"Skip Montanaro" <[email protected]>
Newsgroups gmane.mail.spam.spambayes.cvs
Message-ID <[email protected]>
Update of /cvsroot/spambayes/website
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26201

Modified Files:
	server_side.ht 
Log Message:
ever-so-slightly more than minimal changes to try make the web page stretch
and shrink better



Index: server_side.ht
===================================================================
RCS file: /cvsroot/spambayes/website/server_side.ht,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** server_side.ht	9 Aug 2004 06:22:47 -0000	1.6
--- server_side.ht	19 Apr 2005 02:01:14 -0000	1.7
***************
*** 26,64 ****
  <li>Create the DB by training with a mailbox of ham and a mailbox of spam.
  I put the DB in /var/spambayes/hammie.db (as a DBM store).</li>
! <li>In master.cf, the smtp line has been changed for the following two lines:<br />
  <pre>
! smtp      inet  n       -       n       -       -       smtpd
    -o content_filter=spambayes:
  </pre>
  and the following two lines were added at the end of the file:<br />
  <pre>
! spambayes unix  -       n       n       -       -       pipe
!   user=nobody argv=/usr/local/bin/hammiewrapper.sh $sender $recipient
  </pre></li>
  <li>Here's what the hammiewrapper.sh file looks like:<br />
  <pre>
  #!/bin/sh
! /usr/local/bin/sb_filter.py -d /var/spambayes/hammie.db -f | /usr/sbin/sendmail -f $*
  </pre></li>
  </ol>
  
  <h2>qmail notes from Michael Martinez</h2>
- <p>SpamBayes is installed on our agency's smtp / MX gateway. This machine runs Redhat
- Linux 7.1, qmail 1.03, qmail-scanner 1.16, and hbedv's <em>Antivir</em>. Incoming mail is
- accepted by tcpserver and handed off to qmail-scanner. Qmail-scanner runs the virus
- software (<em>antivir</em>) and hands the message to qmail. Qmail accepts local delivery
- on all domain-bound email. This email is delivered to <b>~alias/.qmail-default</b>.
- (This is a standard configuration for qmail).</p>
  
! <p><b>~alias/.qmail-default</b> pipes each email through Spambayes. The .qmail-default
! is set up as follows:<br />
  
  <pre>
! | /usr/local/spambayes/hammiefilter.py -d /usr/local/spambayes/.hammiedb | qmail-remote MSServer.csrees.usda.gov "$SENDER" [email protected]
  </pre>
  </p>
   
! <p>The permissions for the /usr/local/spambayes directory are set with the following command:<br />
! <pre>chown –R qmailq.qmail /usr/local/spambayes</pre>
  </p> 
  
--- 26,75 ----
  <li>Create the DB by training with a mailbox of ham and a mailbox of spam.
  I put the DB in /var/spambayes/hammie.db (as a DBM store).</li>
! <li>In master.cf, the smtp line has been changed for the following two
! lines:<br />
! 
  <pre>
! smtp      inet   n   -   n   -   -   smtpd
    -o content_filter=spambayes:
  </pre>
  and the following two lines were added at the end of the file:<br />
  <pre>
! spambayes unix  -   n   n   -   -   pipe
!   user=nobody argv=/usr/local/bin/hammiewrapper.sh
!     $sender $recipient
  </pre></li>
  <li>Here's what the hammiewrapper.sh file looks like:<br />
  <pre>
  #!/bin/sh
! /usr/local/bin/sb_filter.py \
!     -d /var/spambayes/hammie.db -f \
! | /usr/sbin/sendmail -f $*
  </pre></li>
  </ol>
  
  <h2>qmail notes from Michael Martinez</h2>
  
! <p>SpamBayes is installed on our agency's smtp / MX gateway. This machine
! runs Redhat Linux 7.1, qmail 1.03, qmail-scanner 1.16, and hbedv's
! <em>Antivir</em>. Incoming mail is accepted by tcpserver and handed off to
! qmail-scanner. Qmail-scanner runs the virus software (<em>antivir</em>) and
! hands the message to qmail. Qmail accepts local delivery on all domain-bound
! email. This email is delivered to <b>~alias/.qmail-default</b>.  (This is a
! standard configuration for qmail).</p>
! 
! <p><b>~alias/.qmail-default</b> pipes each email through Spambayes. The
! .qmail-default is set up as follows (note line wrapping):<br />
  
  <pre>
! | /usr/local/spambayes/hammiefilter.py \
!     -d /usr/local/spambayes/.hammiedb \
! | qmail-remote MSServer.csrees.usda.gov \
!     "$SENDER" [email protected]
  </pre>
  </p>
   
! <p>The permissions for the /usr/local/spambayes directory are set with the
! following command:<br /> 
! <pre>chown -R qmailq.qmail /usr/local/spambayes</pre>
  </p> 
  
***************
*** 70,76 ****
  the Rules to detect the Spambayes tag in the message header. If the tag
  reads <b>Spambayes-Classification: spam</b> then the email is either deleted
! or placed in the user's Spam folder. If it reads <b>Spambayes-Classification: unsure</b>
! then it's placed in the user's Unsure folder. If it reads <b>Spambayes-Classification: ham</b>
! then nothing special is done – it is delivered to the user's Inbox as normal.</p>
   
  <p>The user is given the choice of whether to set up his rules or not.</p>
--- 81,88 ----
  the Rules to detect the Spambayes tag in the message header. If the tag
  reads <b>Spambayes-Classification: spam</b> then the email is either deleted
! or placed in the user's Spam folder. If it reads
! <b>Spambayes-Classification: unsure</b> then it's placed in the user's
! Unsure folder. If it reads <b>Spambayes-Classification: ham</b> then nothing
! special is done - it is delivered to the user's Inbox as normal.</p>
   
  <p>The user is given the choice of whether to set up his rules or not.</p>
***************
*** 92,101 ****
  
  <ol>
! <li>I use a simple script to insert a blank From: line at the top of each email</li>
! <li>I use a simple script to remove the qmail-scanner header from the bottom of each email.</li>
  <li>uuencoded attachments are removed</li>
! <li><pre>cat /usr/local/spambayes/training/spamdir/* >> /usr/local/spambayes/training/spam</pre></li>
! <li><pre>cat /usr/local/spambayes/training/hamdir/* >> /usr/local/spambayes/training/ham </pre></li>
! <li><pre>/usr/local/spambayes/mboxtrain –d /usr/local/spambayes/.hammiedb –g /usr/local/spambayes/training/ham –s /usr/local/spambayes/training/spam</pre>
  (This last step can be run without shutting down qmail.)</li>
  </ol>
--- 104,120 ----
  
  <ol>
! <li>I use a simple script to insert a blank From: line at the top of each
! email</li> 
! <li>I use a simple script to remove the qmail-scanner header from the bottom
! of each email.</li> 
  <li>uuencoded attachments are removed</li>
! <li><pre>cat /usr/local/spambayes/training/spamdir/* \
!     >> /usr/local/spambayes/training/spam</pre></li>
! <li><pre>cat /usr/local/spambayes/training/hamdir/* \
!     >> /usr/local/spambayes/training/ham </pre></li>
! <li><pre>/usr/local/spambayes/mboxtrain \
!     -d /usr/local/spambayes/.hammiedb \
!     -g /usr/local/spambayes/training/ham \
!     -s /usr/local/spambayes/training/spam</pre>
  (This last step can be run without shutting down qmail.)</li>
  </ol>
***************
*** 128,133 ****
  <a href="http://www.boost-consulting.com/writing/server-side.html">
  notes explaining how he set up server-side filtering with SpamBayes and
! an IMAP server</a>, using imapfilter.py (now sb_imapfilter.py) and
! hammiefilter.py (now sb_filter.py).</p>
  
  <h2>An Alternate method of Server Mail filtering in Linux or Unix
--- 147,152 ----
  <a href="http://www.boost-consulting.com/writing/server-side.html">
  notes explaining how he set up server-side filtering with SpamBayes and
! an IMAP server</a>, using <code>sb_imapfilter.py</code> and
! <code>sb_filter.py</code>.</p>
  
  <h2>An Alternate method of Server Mail filtering in Linux or Unix
***************
*** 158,164 ****
  
  <p>Mail is filtered by the server using a .procmailrc file in the user's
! directory that runs sb_filter.py. One further thing, which should be
! obvious, is that we have created MX records so that all mail addressed to a
! client is actually delivered to the server.</p>
  
  <p>Training can easily be done with a simple script such as:</p>
--- 177,183 ----
  
  <p>Mail is filtered by the server using a .procmailrc file in the user's
! directory that runs <code>sb_filter.py</code>. One further thing, which
! should be obvious, is that we have created MX records so that all mail
! addressed to a client is actually delivered to the server.</p>
  
  <p>Training can easily be done with a simple script such as:</p>
***************
*** 168,172 ****
  #script: trainsb
  
! /usr/bin/sb_mboxtrain.py -d $HOME/.hammie.db -g  $HOME/Mail/$1 -s $HOME/Mail/$2
  </pre>
  
--- 187,194 ----
  #script: trainsb
  
! /usr/bin/sb_mboxtrain.py \
!     -d $HOME/.hammie.db \
!     -g  $HOME/Mail/$1 \
!     -s $HOME/Mail/$2
  </pre>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.