Differences between version 7 and previous revision of EximFilter.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 7 | Last edited on Monday, December 6, 2004 8:48:56 am | by JohnMcPherson | Revert |
Older page: | version 5 | Last edited on Thursday, December 2, 2004 4:29:19 pm | by JohnMcPherson | Revert |
@@ -1,28 +1,23 @@
-If your .forward file starts
with "# Exim filter", then the [Exim] mail program can do some processing of your incoming email
.
+If you start
your <tt>
.forward</tt>
file with "<tt>
# Exim filter</tt>
", then the [Exim] mail program can do some processing of your incoming [Email]
. Documentation about this is available at:
+* <tt>/usr/share/doc/exim/filter.txt{,.gz}</tt>
+* [Exim 3.3 Filter Specification | http://www.exim.org/exim-html-3.30/doc/html/filter.html] / [Exim 4.0 Filter Specification | http://www.exim.org/exim-html-4.00/doc/html/filter.html]
-If you have exim installed, you can probably find comprehensive documentation on this in
- /usr/share/doc/exim/filter.txt{,.gz}
-otherwise have a look online at www.exim.org/exim-html-3.30/doc/html/filter.html or www.exim.org/exim-html-4.00/doc/html/filter.html depending on which version of exim you have installed.
-
-
!!!Testing a filter
+!!! Testing a filter
You can create a filter with any filename (such as $HOME/exim.filter) and then
test it with
- $ /usr/sbin/exim -bf $HOME/exim.filter -f ''fromaddress'' -bfl ''username'' -bfs ''+suffix''
-(changing fromaddress, username, and suffix if you want to test specific
-rules in your filter file).
-This will read an email message from stdin(3), but you can supply an empty message
-if your
filter is simple enough that it doesn
't use any message headers.
-If you don
't give
-bfl it will default to your
username.
+<pre>
+/usr/sbin/exim -bf $HOME/exim.
filter -f ''fromaddress
'' -bfl ''
username'' -bfs ''+suffix''
+</pre>
-Exim
will then
tell you which tests it
matched, and what it
would have done
if it received
that message 'for real
'.
+This
will read an [Email] from stdin(3) and
tell you which tests matched, and what would have happened
if that message was actually being delivered. You can change
''fromaddress'', ''username'', and ''suffix'' to test specific rules, and you can omit <tt>-bfl</tt> if ''username'' is your own username. If your filter is simple enough that it doesn't use any message headers you can supply an empty message
.
-----
-
!!!Examples
+!!! Examples
+
+!! A simple example
-Here is a simple example:
<verbatim>
# Exim filter - do not edit this line!
# only works for exim... others will treat it as a plain .forward file...
@@ -44,16 +39,14 @@
# change this to whatever address this server is accepting your mail for
deliver thisemailaddress@verisign.com
finish
</verbatim>
-----
-!Example for [WLUG] MailServer
-Since exim
on the mail server
supports a suffix (eg any mail to username+suffix@example.com gets delivered to username, regardless of what string is used for
the suffix), you can filter incoming messages based on this.
+!! For the [WLUG] MailServer
+
+
Since [Exim]
on the MailServer
supports a suffix (eg any mail to <tt>
username+suffix@example.com</tt>
gets delivered to <tt>
username</tt>
, regardless the <tt>
suffix</tt>
), you can filter incoming messages based on this.
-Probably the only thing to be aware of is that if you use the '
save'
command,
-
it saves to the named argument as a file ('mbox'
format)
rather than as a 'Maildir'
-directory
.
+Probably the only thing to be aware of is that if you use the <tt>
save</tt>
command, it saves to the named MailBox using [MBox]
format rather than MailDir
.
<verbatim>
# Exim filter - do not edit this line!