Yample is a processing language for email. It sorts for email based on criteria you define. It can deliver email to Unix mailboxes (MBOX), Maildirs (used by Courier IMAP and others) or pipes.
I discovered the Perl module Mail::Audit some time ago. It is very powerful and makes sorting email very easy. But I did not feel comfortable writing my filtering rules in Perl. One misplaced comma and your mail bounces. Besides, when you have more then 30 rules a Perl-script might not be as lucid as you could wish for.
Procmails syntax is ugly and incomprehensible.
Exim Filter is quite nice, but endless if/then/else-constructs makes it a bit unclear. if/then/else should really be implied by putting things in a certain order.
# example rules # this rule need spamassassin or spamc to work spam(): maildir(.junk.spam) # if the mail is SA-tagged already head(^X-Spam-Flag: YES): maildir(.junk.spam) head(^X-Infected:): maildir(.junk.virii) # get rid of duplicates dup(): maildir(.junk.duplicates) # put the lists in a folder, auto-create subfolders for each list list((.*)): maildir(.lists.$1) # these lists are not detected by Mail::ListDetect subject(\[SDLperl\]): maildir(.lists.SDLperl) subject(\[mytop\]): maildir(.lists.mytop) # archive all mail which is not spam/virus/listmail in a mbox for "deep # storage". requires yample 0.21 # we use perl(1) because this condition /always/ evaluates to "true" perl(1): unseen mbox(/home/perbu/mailarchive/mbox) # sort mail to firstname.lastname@example.org info folder "foo" and mail # to email@example.com into folder "bar" rcpt(perbu@(\w+).com): maildir(.$1) # send mail too firstname.lastname@example.org into .webmaster.quux rcpt(webmaster@(\w+).(com|net|org)): maildir(.webmaster.$1) # we don't like these guys sender(@bongo.net): ignore() # we like these guys even less: sender(@bongo.com) and subject((.*)): reject(You message with subject '$1' was rejected) # composite rule sender(email@example.com) and rcpt(firstname.lastname@example.org): reject(Message rejected - invalid foo) # ( rcpt(@bongo.com) or sender(@bongo.com) and subject(bingo) ): maildir(.bingo.bongo) # catch-all (if you dont catch all your mail it will end up in the # "PANIC MBOX". perl(1) is the easiest way of getting a rule which # /always/ matches perl(1): maildir(.junk.unknown)As you can see - the syntax is pretty straight forward. On each line there is a set of conditions and an action which will be executed if the conditions match.
More on regular expressions can be found here: http://etext.lib.virginia.edu/helpsheets/regex.html;
The software is licensed under the GNU GPL license.
CVS access described here
Yample is written by Per Andreas Buer. The logo is made by Geir Isene. The project is hosted by sourceforge.net. You can find the project page here. Yample is partly written in time paid by my excellent employer Linpro AS - the number one Linux-something in Norway.
Yample need Mail::Internet.
Text::Balanced is used to balance parenthesis.
The list-rules rely on Mail::ListDetect.
If use invoke yample with --spamassassin you will of course need to install Mail::Spamassassin.
The other modules are optional and if they are missing they will not cause fatal errors.
Yample draws most of its power from Perl and the Mail-modules (Mail::Internet, Mail::Spamassassin). Yample is possible only because these guys have made these modules available.
$Id: index.html,v 1.23 2004/01/13 23:04:13 perbu Exp $