Differences between version 10 and predecessor to the previous major change of EximFilter.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 10 | Last edited on Tuesday, April 5, 2005 8:54:30 pm | by PeterWiersig | Revert |
Older page: | version 8 | Last edited on Monday, December 6, 2004 10:36:56 am | by AristotlePagaltzis | Revert |
@@ -11,8 +11,10 @@
<pre>
/usr/sbin/exim -bf $HOME/exim.filter -f ''fromaddress'' -bfl ''username'' -bfs ''+suffix''
</pre>
+You might need to use "/usr/sbin/exim4" instead of "/usr/sbin/exim", depending on which version you have installed, and the naming scheme used by your distribution.
+
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
@@ -44,9 +46,9 @@
</verbatim>
!! 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.
+Since [Exim] on the WlugServer
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 <tt>save</tt> command, it saves to the named MailBox using [MBox] format rather than MailDir.
<verbatim>
@@ -63,8 +65,14 @@
# discard any mail that has "+nospam" as a suffix...
if ${local_part_suffix} is "+nospam" then
seen # tell exim that we've delivered it (even though we haven't really)
finish # don't try any more tests or deliveries
+endif
+
+# discard mail that spam assassin assigned 5 or more points
+# (SA on hoiho puts '+' chars in the X-Spam-Score header)
+if $h_x-spam-score: contains +++++ then
+ seen finish
endif
# any mail with the "+foo" suffix will have a copy sent elsewhere,
@@ -113,4 +121,6 @@
deliver ${local_part}
endif
</verbatim>
+
+PeterWiersig: The example with the bugs Maildir should be reworked. To my knowledge (and in my exim-setup) you should specify "save $home/Maildir/bugs/" and exim should recognize the trailing slash that it should deliver to a Maildir.