# -- # Copyright (C) 2001-2018 OTRS AG, https://otrs.com/ # -- # This software comes with ABSOLUTELY NO WARRANTY. For details, see # the enclosed file COPYING for license information (AGPL). If you # did not receive this file, see http://www.gnu.org/licenses/agpl.txt. # -- #SYS_HOME=/opt/kix/ SYS_HOME=$HOME SHELL=/bin/sh PATH=/bin:/usr/bin:/usr/local/bin MONTHFOLDER=`date +%Y-%m` YEARFOLDER=`date +%Y` LOGFILE=$SYS_HOME/var/log/procmail-$MONTHFOLDER.log VERBOSE=on # Remove all X-KIX Header (allow this only for trusted email) # e. g. from *@example.com :0 fhw : * !^From.*@example.com | grep -vi '^X-KIX-' # or just no emails with "X-KIX-Ident: ahfiw2Fw32r230dddl2foeo3r" header! #:0 fhw : #* !^X-KIX-Ident: ahfiw2Fw32r230dddl2foeo3r #| grep -vi '^X-KIX-' # Examples for queue presorting. :0 fhw : * TO:.*@example.com | formail -I "X-KIX-Queue: example" :0 fhw : * ^List-Id:.*OpenAntiVirus | formail -I "X-KIX-Queue: OpenAntiVirus" # Example for add free form key and value (max 3). :0 fhw : * TO:.*@example.com | formail -I "X-KIX-ArticleKey1: Test" | formail -I "X-KIX-ArticleValue1: True!" # Example for assigning the "email domain as customer ID" automaticaly. #:0hc #CUSTOMERID=|formail -X "From:"|perl -e '$i=; $i=~s/^From: //;$i=~s/\(.*?\)//;$i=~s/<(.*?)>/$1/;$i=~s/ //g;$i=~s/.*@(.*)/$1/;print $i' # #:0 fhw : #| formail -I "X-KIX-CustomerNo: $CUSTOMERID" # Backup of all incoming emails. # It's always better to have a backup of all incoming emails! #:0 c : #$SYS_HOME/var/INBOX.Backup.$MONTHFOLDER # Pipe all email into the PostMaster process. :0 : | $SYS_HOME/bin/kix.Console.pl Maint::PostMaster::Read # spool all the rest (which the KIX.PostMaster.pl can't process!) # If the database is down or the KIX.PostMaster.pl exit was not '0'! :0 : $SYS_HOME/var/spool/. # end of .procmailrc