REBOL [ Title: "Email Spam Filter" File: %despam.r Date: 6-Jun-1999 Author: "Scrip Rebo" Purpose: { Filters spam by removing all messages from your incoming email that were not sent directly to you. Valid email is not affected and remains on server. } Note: "Deletes email. Use at your own risk." Category: [email net 3] ] ;-- Email sent to these addresses is not considered spam: accept-to: [rebo@ober.dom coder@inet.dom] do %secrets.r ; obtain user and pass mailbox: open join pop:// [user ":" pass "@mail.server.dom"] print [length? mailbox "messages on server"] list: make block! 10 while [not tail? mailbox] [ mail: import-email first mailbox clear list if mail/to [append list mail/to] if mail/cc [append list mail/cc] if mail/bcc [append list mail/bcc] either foreach name accept-to [ if find list name [break/return true] false ][ mailbox: next mailbox ][ print ["removing spam from" mail/from] mailbox: remove mailbox ] ] close mailbox