Hi there,

please revert the old patch and use this one instead. It contains a more
detailed mailfilter file I wrote.

-- 
Regards,

Wiktor Wodecki

diff -burN otrs-rc1/.mailfilter otrs/.mailfilter
--- otrs-rc1/.mailfilter        Thu Jan  1 01:00:00 1970
+++ otrs/.mailfilter    Fri Jan 17 12:04:26 2003
@@ -0,0 +1,77 @@
+# --
+# .mailfilter - mailfilter of the OTRS user
+# Copyright (C) 2003 Wiktor Wodecki <[EMAIL PROTECTED]>
+# --
+# This software comes with ABSOLUTELY NO WARRANTY. For details, see 
+# the enclosed file COPYING for license information (GPL). If you 
+# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
+# --
+
+#SYS_HOME=/opt/otrs
+SYS_HOME=$HOME
+
+import DEFAULT
+LOCALDEFAULT=$DEFAULT
+DEFAULT=${SYS_HOME}/var/spool/`date +%s`${FROM}${SIZE}
+MONTHFOLDER=`date +%Y-%m`
+YEARFOLDER=`date +%Y`
+
+# --
+# Remove all X-OTRS Header (allow this only for trusted email)
+# e. g. from *@example.com
+# --
+if (/^To:.*@example.com/)
+{
+       xfilter "grep -vi '^X-OTRS-'"
+}
+
+# or just not emails with "X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r" header!
+#if (/^X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r/)
+#{
+#      xfilter "grep -vi '^X-OTRS-'"
+#}
+
+
+# --
+# Examples for queue presorting.
+# --
+if (/^To:.*@example.com/)
+{
+       xfilter "formail -I \"X-OTRS-Queue: example\""
+}
+
+if (/^List-Id:.*OpenAntiVirus/)
+{
+       xfilter "formail -I \"X-OTRS-Queue: OpenAntiVirus\""
+}
+
+# --
+# Example for add free form key and value (max 3). 
+# --
+if (/^To:.*@example.com/)
+{
+       xfilter "formail -I \"X-OTRS-ArticleKey1: Test\""
+       xfilter "formail -I \"X-OTRS-ArticleValue1: True!\""
+}
+
+# --
+# Backup of all incoming emails. 
+# It's always better to have a backup of all incoming emails!
+# --
+cc ${SYS_HOME}/var/INBOX.Backup.${MONTHFOLDER}
+
+# --
+# Pipe all email into the PostMaster process.
+# --
+xfilter "${SYS_HOME}/bin/PostMaster.pl"
+
+# --
+# spool all the rest (which the PostMaster.pl can't process!) 
+# If the database is down or the PostMaster.pl exit was not '0'!
+# --
+to $DEFAULT
+
+# --
+# end of .mailfilter
+# --
+
diff -burN otrs-rc1/.procmailrc otrs/.procmailrc
--- otrs-rc1/.procmailrc        Mon Jan  6 23:09:35 2003
+++ otrs/.procmailrc    Fri Jan 17 11:30:09 2003
@@ -9,7 +9,7 @@
 # did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
 # --
 
-#SYS_HOME=/opt/OpenTRS/
+#SYS_HOME=/opt/otrs/
 SYS_HOME=$HOME
 
 SHELL=/bin/sh

Reply via email to