View Single Post
Old 15 Nov 2005, 12:40 AM   #5
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
This example will copy emails to a secondary site and keep a copy at Fastmail. Note that you must include copy in the require declaration.

You must place the redirect :copy statement in a location in your script where it captures the messages you want to redirect. So I would place it after any code which discards spam, but before filing code.

I have also included a test using the new body search.
Code:
### Forwarding example using new copy feature

require ["envelope", "fileinto", "reject", "notify", "vacation",
"regex","relational","comparator-i;ascii-numeric","body","copy"];

redirect :copy "jcitizen@gmail.com";

if body :text :contains "testing"
    { fileinto "INBOX.Junk Mail"; stop; }
n5bb is offline   Reply With Quote