Apple 10.6 manual Self-Defined Forwarding, Basic Sort and Antijunk Mail Filter, 129

Models: 10.6

1 134
Download 134 pages 4.38 Kb
Page 129
Image 129

Self-Defined Forwarding

#--------

#This is a sample script to illustrate how Sieve could be used

#to let users handle their own mail forwarding needs.

#Read the comments following the pound/hash to find out what the

#script is doing.

#---------

#

#No need to add any extension. 'redirect' is built-in.

#Redirect all my incoming mail to the listed address redirect "my-other-address@example.com";

#But keep a copy of it on the IMAP server

keep;

# End of script

Basic Sort and Antijunk Mail Filter

#--------

#This is a sample script to show discarding and filing.

#Read the comments following the pound/hash to find out

#what the script is doing

#---------

#

#Make sure filing and rejection are enabled require "fileinto";

#If it's from my mom...

if header ["From"] :contains ["Mom"]{

#send it to my home email account redirect "home-address@example.com";

}

#

#If the subject line has a certain keyword...

else if header "Subject" :contains "daffodil" {

#forward it to the postmaster

forward "postmaster@server.edu";

}

#

#If the junk mail filter has marked this as junk...

else if header :contains ["X-Spam-Flag"] ["YES"]{

#throw it out

discard;

Appendix B    Sample Sieve Scripts

129

Page 129
Image 129
Apple 10.6 manual Self-Defined Forwarding, Basic Sort and Antijunk Mail Filter, 129