Differences between revisions 15 and 16
Revision 15 as of 2007-06-01 15:58:11
Size: 3243
Editor: RainerSigl
Comment:
Revision 16 as of 2007-06-01 16:15:33
Size: 3073
Editor: RainerSigl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 59: Line 59:
== commands and variables == == variables ==
Line 65: Line 65:
== commands ==

 || '''store email in your inbox''' || save /home/virtual_mail/$local_part/ ||
 || '''store email in folder xxx''' || save /home/virtual_mail/$local_part/.xxx (note the dot preceding the foldername, folders are created automatically if not available) ||
 || '''drop email and leave filterscript''' || finish ||
Line 67: Line 72:
The sequence '''save /home/virtual_mail/$local_part/.xxx''' is a important statement in the filter which tells exim to store the acutal email in the named folder, in this case the folder xxx and not in the default inbox. For the foldername you can use any name. The folder is created automatically in case it is not available. Notify the dot before the foldername. The rest of the pass is binding and expresses the real path on the mail server. $local_part always contains your username.

Configure User specific Filters for MPE's Mail Services

Each user has the opportunity to preprocess his incoming mail stream by a filter. Usual applications are:

  • storing or dropping tagged Spam messages depending on the score
  • putting mails from certain senders or with special subjects in different folders as inbox

Calling the Filter Editor

Login to [https://mpemail.mpe.mpg.de/tpl MPE mail user interface https://mail.mpe.mpg.de/tpl] and choose menu 'Edit Filter'

Remark:

  • When clicking the 'save' button a syntax check is performed. If no errors where found, the new filter rules are installed
  • use the 'default' button to load the MPE default filter setup

the standard filter as a example

The standard filter contents is copied automatically to a new user's environment. Take this contents as a template to construct your personal filter. Feel free to comment or discomment the given lines in order to enable/disable functionalities.

#Exim filterBR #BR #if $header_from: contains "myimportantfromaddress" thenBR #save /home/virtual_mail/$local_part/BR #finishBR #endifBR

#if $h_x-spam-level: begins "********" thenBR #seen finishBR #endifBR #BR

if $h_x-spam-level: begins "****" then BR save /home/virtual_mail/$local_part/.Spam/BR endifBR #BR

#if $h_from: contains "virusalert@rzg.mpg.de" thenBR #seen finishBR #endifBR

Please note that the first line has to begin with a '#Exim filter' line. The filter is read sequential from up to down.

  • 1 the first commented block allows to tunnel certain from-addresses direct to your inbox without scanning for spams 2 the second commented block allows to drop Spams with a certain level 3 the third active block stores all spams from 4 * and more in special Folder 'Spam' 4 the forth commented block allows to drop Mails with a certain from-Address

variables

  • $header_from

  • $header_subject

  • $sender_address The sender address that was received in the envelope of the message

  • $reply_address The contents of the Reply-to: header, if the message has one; otherwise the contents of the From: header.

  • $return_path The return path – that is, the sender field that will be transmitted as part of the message’s envelope if the message is sent to another host.

commands

  • store email in your inbox

    save /home/virtual_mail/$local_part/

    store email in folder xxx

    save /home/virtual_mail/$local_part/.xxx (note the dot preceding the foldername, folders are created automatically if not available)

    drop email and leave filterscript

    finish

BR

further information for writing filters can be found in the [http://www.exim.org/exim-html-current/doc/html/filter.html exim filter specs]

IT: MailConfigFilters (last edited 2009-07-15 14:34:35 by localhost)