Generated from ./ with ROBODoc v4.0.12 on Fri Dec 26 16:52:18 2003

1. configuration/POP3-related

NOTES

 SpamFree is fully configurable. The configuration is very easy. It in Tcl
 syntax. Don't worry it is not as cryptic as "user 'foo' there with
 password 'buzz' is 'bar' here". On the contrary, it is intuitive and
 straight forward. All the configurable variables have good default values
 and are well commented, which are shown below. Copy and paste the
 variables into the default configuration file (~/.sf.rc), and made the
 changes there according to your taste.

 The only thing you must change is the POP server's address/port and your
 account information. Also remember to put your procmail rules in
 ~/.sf.procmailrc. See the 'SPAM-related' section below.

SOURCE

    # ....................................... POP3 related configuration ...
    
    # -- account defaults
    set POP_SERVER  "localhost"
    set POP_PORT    "5058"
    # The default POP server is YahooPOPs <http://yahoopops.sourceforge.net/>.
    # If your ISP is my.isp.org, use the following:
    #set POP_SERVER "my.isp.org"
    #set POP_PORT   "pop3"
    set POP_USER    "charly_brown"
    set POP_PASS    "secret"
    # you must change the above account information.
    
    # Note that the password is stored in plain text. Use the default Unix
    # security mechanism to protect your password (chmod 600 ~/.sf.rc). If this
    # is still not OK for you, set it to blank (set POP_PASS ""), SpamFree will
    # propmt you for the password every time it is launched.
    
    # -- maximum allowed wait time (in seconds)
    set POP_WAIT_CONNECT    300;            # maximum wait for POP connection
    set POP_WAIT_LIST       300;            # maximum wait for LIST cmd.
    

2. configuration/SPAM-related

NOTES

 SPAM configuration in controlled by the following variables: 
  SPAM_PROG, SPAM_FILE and SPAM_LINE.

 You are free to choose whatever spam detection software you want, just
 configure the SPAM_PROG variable. Each message is piped to the 'SPAM_PROG'
 program by SpamFree. The only requirement to 'SPAM_PROG' program is to
 read the email message from the pipe and write the spam prediction as one
 digit into the 'SPAM_FILE' file. SpamFree will read the returned number
 and delete the mail from the POP if it is greater or equal to 8, and hold
 the mail in the POP without retrieving if it is between 1 and
 7. Otherwise, the mail will be retrieved and then deleted from the server.

 By default the powerful procmail is used as the spam detection software,
 and the procmail script for SpamFree is ~/.sf.procmailrc. To achieve the
 behavior outlined above, your ~/.sf.procmailrc file should look something
 like this:


     SPAM_FILE=$HOME/.sf.ret

     # == sure spams
 
     # spam!, said SpamAssassin
     :0:.spam
     * ^X-Spam-Status: Yes
     | echo 9 > $SPAM_FILE
 
     # [...]
 
     # == mlists that I'm on, OK to retrieve
 
     # [...]
 
     # == might be false alarms
 
     # not directly to me? 
     :0:.spam
     * !^(To|Cc):.*tong
     | echo 2 > $SPAM_FILE
 
     # [...]
 
     # == fall through all spam detection, OK to retrieve
     :0:.spam
     | echo 0 > $SPAM_FILE
 

TODO

 Document how I convert my existing procmail scripts automatically for
 SpamFree (so that I only need to maintain one set of rules). Show how I
 detect spams using my procmail. But, anybody cares?

 SPAM_LINE determines the number of lines of the message body to retrieve for 
 spam detection. To disable body retrieving, "set SPAM_LINE 0".
 
 The default setting for the above variables are: 
 

SOURCE

    # ...................................... SPAM fighting configuration ...
    set SPAM_PROG           "procmail ~/.sf.procmailrc"
    set SPAM_FILE           "~/.sf.ret"
    
    set SPAM_LINE           5
    

3. configuration/runtime-environment

NOTES

 
 MAIL_DELIVER determines which program to pipe mail to. Use whatever MTA 
 (mail transfer agent) you like. The default is procmail.
 
 SpamFree uses netcat to talk to the pop server. The netcat is called nc in
 some systems, and netcat in other systems. Set its name in the the NETCAT
 variable.
 

 The 'verbose' variable determines how noisy SpamFree is. Use the -v
 command line option to set it. Refer to below 'command-line' section.
 

SOURCE

    # ...................................... email deliver configuration ...
    
    set MAIL_DELIVER        "procmail "
    
    # ........................................... Misc constant settings ...
    set NETCAT      "nc"
    
    set verbose     0
    # verbose:
    # 0 - be quite, do not show anything except error messages
    # 1 - show one dot when processing each email
    # 2 - show POP3 command sent and server respond
    # 3 - show full interaction, including password, email headers and bodies
    # 4 - show full debug info, including Expect internal status, HUGE output!
    
    # You don't need to touch this section unless you know what you are doing
    set prompt_ok   "\r\n\\+OK"
    set prompt_ok_line "$prompt_ok \[^\n]*\r\n"
    set prompt_done "\r\n\\.\r+\n"
    

4. run/command-line

NOTES

 Use sf -h to obtain a brief usage description.

 Try using 'sf -v -v -v -m 2' to test run it for the first time after
 you've done the configuration, to verify that you've got the pop server
 and your account settings right. After you've get used to it and get
 confident with it, you can decrease the number of -v used and increase the
 maximum number of messages to download, or even omit the -m parameter
 entirely.

 If you have more than one POP3 need to be checked, I suggest you create
 configuration files as .sf.rc.isp1, .sf.rc.isp2, etc. Then use the
 following sh script to check them one by one:

   for sf_cfg in my/path/.sf.rc.*; do sf -c $sf_cfg; done


 If you have high speed connection, you can check all POPs simultaneously
 with the following sh script. But be sure to set and use a different
 SPAM_FILE file for every simultaneously connection.

   for sf_cfg in my/path/.sf.rc.*; do sf -c $sf_cfg &; done


 Note, if you want to send me bug report (to the bug report forum on
 sourceforge), be sure to set SpamFree to maximum verbose mode, i.e., 

   sf -v -v -v -v