Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rubyist/rgte
Email Filter
https://github.com/rubyist/rgte
Last synced: 23 days ago
JSON representation
Email Filter
- Host: GitHub
- URL: https://github.com/rubyist/rgte
- Owner: rubyist
- License: mit
- Created: 2008-08-13T15:13:24.000Z (about 16 years ago)
- Default Branch: master
- Last Pushed: 2008-08-13T15:13:55.000Z (about 16 years ago)
- Last Synced: 2023-04-10T09:21:44.542Z (over 1 year ago)
- Language: Ruby
- Homepage: http://rubyi.st/rgte
- Size: 97.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: CHANGELOG
- License: MIT-LICENSE
Awesome Lists containing this project
README
= RGTE: An email filter
RGTE is a small, opinionated email filter which processes and filters incoming email into Maildirs.
== License
RGTE is copyright 2008 Scott Barron. It is licensed under the MIT license. See the included MIT-LICENSE file for details.
== Installation
$ [sudo] gem install --source http://rubyi.st/gems/ rgte
One of these days I'll register a Rubyforge project for the gem, but that's such a pain.
And don't forget that trailing slash - otherwise it doesn't go.
== Usage
Set up whatever processes your incoming mail to pipe through rgte. Examples:
Using .forward:
$ cat ~/.forward
"|exec /usr/local/bin/rgte"Using procmail:
$ cat ~/.procmail
:0:
| /usr/local/bin/rgteUsing fetchmail:
$ cat ~/.fetchmailrc
poll myaccount.email.com protocol imap:
user "[email protected]" there has password "blah" ssl
is "foo" here and wants mda "/usr/local/bin/rgte"Write your filters in ~/.rgte
# Set up some configuration
config :maildir_root => '/home/scott/Maildir', :maildir_backup => '/home/scott/Mail-backup'# Keep a copy of every email in :maildir_backup
backup# sets up an alias, :me, containing my addresses
group :me, '[email protected]', '[email protected]'# Mark every message that's From the :me alias as read
from(:me).read# Pipe the mail through spamprobe, file it into @spam if it's a hit and halt processing
pipe('/usr/bin/spamprobe train', /^SPAM/, '@spam').halt# Put every message From this address into archive and mark it read
from('[email protected]', 'archive').read# Email lists - list is a shorthand that matches To, Cc, and From
list '[email protected]', 'lists/hbd'
list '[email protected]', 'lists/rubycore'
list '[email protected]', 'lists/dtrace'== Contact
Send questions or feedback to Scott Barron ([email protected]).