Mail::Procmailrc

An interface to Procmail recipe files
Download

Mail::Procmailrc Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Scott Wiersdorf
  • Publisher web site:
  • http://search.cpan.org/~scottw/

Mail::Procmailrc Tags


Mail::Procmailrc Description

An interface to Procmail recipe files Mail::Procmailrc is a Perl module that can parse procmail recipe files and store the contents in an object which can be later manipulated and saved (see "CAVEATS" and "BUGS/TODO" for limitations and special conditions).You may also start with a fresh, empty Mail::Procmailrc object, populate it with recipes and/or variables and write it to file.Recipes and variables are written to the file in the order they're parsed and added. If you want to re-order the recipes you may do so by getting a handle on the variable or recipe list and ordering them yourself.The Mail::Procmailrc object is primarily a list of procmail component objects (see below). When Mail::Procmailrc parses a procmail rc file, it decides which lines are variable assignments, which lines are comments, and which lines are recipes. It preserves the order in which it encounters these procmail components and stores them as a list of objects in the main Mail::Procmailrc object.SYNOPSIS use Mail::Procmailrc; ## create a new procmailrc object and initialize it $pmrc = new Mail::Procmailrc("$HOME/.procmail/rc.spam"); ## add a new variable $pmrc->push( new Mail::Procmailrc::Variable() ); ## add a new recipe $recipe =rc} ) { ## find the recipe we just added by its 'info' string next unless $obj->stringify =~ /^## this will catch evil email messages/m; ## we want to block emails about censorship, too ;o) push @{$obj->conditions}, '* 1^0 censor(ship|ing)?' } ## write this object to disk $pmrc->flush; Requirements: · Perl


Mail::Procmailrc Related Software