Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2007-05-24 09:10:35
Size: 731
Editor: RainerSigl
Comment:
Revision 11 as of 2007-05-31 09:24:18
Size: 3484
Editor: RainerSigl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
* putting mails from certain senders or with special subjects in a special folder
* storing or throwing away tagged Spam messages depending on the score
 * putting mails from certain senders or with special subjects in different folders as inbox
 * storing or dropping tagged Spam messages depending on the score
Line 7: Line 7:
==== Calling the Editor for Filters ==== == Calling the Filter Editor ==
Line 9: Line 9:
* [https://mpemail.mpe.mpg.de/tpl/?tpl=editfilter] Login in [https://mpemail.mpe.mpg.de/tpl MPE mailer user interface] and choose menue 'Edit Filter'
Line 12: Line 12:
* Mailfolders are generated automatically
* After finish editing a filter a syntax check is performed. If any errors a error message will be displayed and the old filter is not overwritten. The editor keeps your edited product.
 * Mailfolders are generated automatically
 * After finish editing a filter a syntax check is performed. If any errors a error message will be displayed and the old filter is not overwritten. The editor keeps your edited product.
Line 15: Line 15:
== the standard filter == == 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 filter[[BR]]
#[[BR]]
## drop all mails with spam-level >=8[[BR]]
#if $h_x-spam-level: begins "********" then[[BR]]
#seen finish[[BR]]
#endif[[BR]]
#[[BR]]
## move all mails with spam-level >=4 to .Spam[[BR]]
if $h_x-spam-level: begins "****" then [[BR]]
save /home/virtual_mail/$local_part/.Spam/[[BR]]
endif[[BR]]
#[[BR]]
## drop all mails from virusalert@rzg.mpg.de[[BR]]
#if $h_from: contains "virusalert@rzg.mpg.de" then[[BR]]
#seen finish[[BR]]
#endif[[BR]]

Please notice that each filter has to start with a '#Exim filter' line. Another mode can be '#Sieve Filter'. But information about this exceeds the scale of this page.

 1 the first commented block allows to drop Spams with a certain level

 2 the second active block stores all spams from 4 * and more in special Folder 'Spam'

 3 the third commented block allows to drop Mails with a certain from-Address

If you would like to preselect a certain from-address before the spam-filter drops the email write at the beginning, before the spam-checks in your filter:[[BR]]
if $header_from: contains "myimportantfromaddress" then[[BR]]
save /home/virtual_mail/$local_part/[[BR]]
finish[[BR]]
endif[[BR]]

these statements mean that mails from "myimportantfromaddress" are stored in the standard inbox and any further filter processing is stopped with the 'finish' like a break in "C".





further information for writing filters can be found in [http://www.exim.org/exim-html-current/doc/html/filter.html exim filter specs]
Line 18: Line 60:
 * $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.
Line 19: Line 66:
[[BR]]
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:

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

Calling the Filter Editor

Login in [https://mpemail.mpe.mpg.de/tpl MPE mailer user interface] and choose menue 'Edit Filter'

Remark:

  • Mailfolders are generated automatically
  • After finish editing a filter a syntax check is performed. If any errors a error message will be displayed and the old filter is not overwritten. The editor keeps your edited product.

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 $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 notice that each filter has to start with a '#Exim filter' line. Another mode can be '#Sieve Filter'. But information about this exceeds the scale of this page.

  • 1 the first commented block allows to drop Spams with a certain level 2 the second active block stores all spams from 4 * and more in special Folder 'Spam' 3 the third commented block allows to drop Mails with a certain from-Address

If you would like to preselect a certain from-address before the spam-filter drops the email write at the beginning, before the spam-checks in your filter:BR if $header_from: contains "myimportantfromaddress" thenBR save /home/virtual_mail/$local_part/BR finishBR endifBR

these statements mean that mails from "myimportantfromaddress" are stored in the standard inbox and any further filter processing is stopped with the 'finish' like a break in "C".

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

commands and 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.

BR 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.

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