1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
from filter on 25 November 2000 -->
<TITLE>Exim Filter Specification - Examples of filter commands</TITLE>
</HEAD>
<body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
Go to the <A HREF="filter_1.html">first</A>, <A HREF="filter_28.html">previous</A>, <A HREF="filter_30.html">next</A>, <A HREF="filter_34.html">last</A> section, <A HREF="filter_toc.html">table of contents</A>.
<P><HR><P>
<H2><A NAME="SEC29" HREF="filter_toc.html#TOC29">Examples of filter commands</A></H2>
<P>
Simple forwarding:
<PRE>
# Exim filter
deliver baggins@rivendell.middle.earth
</PRE>
<P>
Vacation handling using traditional means, assuming that the <EM>.vacation.msg</EM>
and other files have been set up in your home directory:
<PRE>
# Exim filter
unseen pipe "/usr/ucb/vacation \"$local_part\""
</PRE>
<P>
Vacation handling inside Exim, having first created a file called
<EM>.vacation.msg</EM> in your home directory:
<PRE>
# Exim filter
if personal then vacation endif
</PRE>
<P>
File some messages by subject:
<PRE>
# Exim filter
if $header_subject: contains "empire" or
$header_subject: contains "foundation"
then
save $home/mail/f&e
endif
</PRE>
<P>
Save all non-urgent messages by weekday:
<PRE>
# Exim filter
if $header_subject: does not contain "urgent" and
$tod_full matches "^(...),"
then
save $home/mail/$1
endif
</PRE>
<P>
Throw away all mail from one site, except from postmaster:
<PRE>
# Exim filter
if $reply_address contains "@spam.site" and
$reply_address does not contain "postmaster@"
then
seen finish
endif
</PRE>
<P>
Handle multiple personal mailboxes
<PRE>
# Exim filter
if $local_part_suffix is "-foo"
then
save $home/mail/foo
elif $local_part_suffix is "-bar"
then
save $home/mail/bar
endif
</PRE>
<P><HR><P>
Go to the <A HREF="filter_1.html">first</A>, <A HREF="filter_28.html">previous</A>, <A HREF="filter_30.html">next</A>, <A HREF="filter_34.html">last</A> section, <A HREF="filter_toc.html">table of contents</A>.
</BODY>
</HTML>
|