Any Ideas? I can't seem to get this working ... it makes spool tickets and then I have to run the spool process. This isn't good because I can't check if the process spool is already running and it doubles, triples up tickets.
I'm on CentOS 7.4.1708
mariadb (not relevant)
factory (slightly modified) .procmailrc with logging enabled.
Code: Select all
# --
# Copyright (C) 2001-2017 xxx, http://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/otrs/
SYS_HOME=$HOME
UMASK=003
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-OTRS Header (allow this only for trusted email)
# e. g. from *@example.com
:0 fhw :
* !^From.*@example.com
| grep -vi '^X-OTRS-'
# or just no emails with "X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r" header!
#:0 fhw :
#* !^X-OTRS-Ident: ahfiw2Fw32r230dddl2foeo3r
#| grep -vi '^X-OTRS-'
# Examples for queue presorting.
:0 fhw :
* TO:.*@example.com
| formail -I "X-OTRS-Queue: example"
:0 fhw :
* ^List-Id:.*OpenAntiVirus
| formail -I "X-OTRS-Queue: OpenAntiVirus"
# Example for add free form key and value (max 3).
:0 fhw :
* TO:.*@example.com
| formail -I "X-OTRS-ArticleKey1: Test" | formail -I "X-OTRS-ArticleValue1: True!"
# Example for assigning the "email domain as customer ID" automaticaly.
#:0hc
#CUSTOMERID=|formail -X "From:"|perl -e '$i=<STDIN>; $i=~s/^From: //;$i=~s/\(.*?\)//;$i=~s/<(.*?)>/$1/;$i=~s/ //g;$i=~s/.*@(.*)/$1/;print $i'
#
#:0 fhw :
#| formail -I "X-OTRS-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/otrs.Console.pl Maint::PostMaster::Read
# spool all the rest (which the otrs.PostMaster.pl can't process!)
# If the database is down or the otrs.PostMaster.pl exit was not '0'!
:0 :
$SYS_HOME/var/spool/.
# end of .procmailrc
Code: Select all
-rw-r----- 1 otrs otrs 1859 Jan 11 08:01 .procmailrc
Code: Select all
Thu Jan 11 08:02:08 2018 error OTRS-otrs.Console.pl-Maint::PostMaster::Read-10 mkdir /opt/otrs/var/tmp/CacheFileStorable/Valid/2: Permission denied at /opt/otrs/Kernel/System/Cache/FileStorable.pm line 87.
Code: Select all
drwxrws--- 3 apache apache 4096 Jan 4 07:44 2
Code: Select all
procmail: [12028] Thu Jan 11 08:10:38 2018
procmail: Match on ! "^From.*@example.com"
procmail: Couldn't determine implicit lockfile from "grep"
procmail: Locking ".lock"
procmail: Executing "grep,-vi,^X-OTRS-"
procmail: Unlocking ".lock"
procmail: No match on "TO:.*@example.com"
procmail: No match on "^List-Id:.*OpenAntiVirus"
procmail: No match on "TO:.*@example.com"
procmail: Locking "/opt/otrs/var/INBOX.Backup.2018-01.lock"
procmail: Assigning "LASTFOLDER=/opt/otrs/var/INBOX.Backup.2018-01"
procmail: Opening "/opt/otrs/var/INBOX.Backup.2018-01"
procmail: Acquiring kernel-lock
procmail: Unlocking "/opt/otrs/var/INBOX.Backup.2018-01.lock"
procmail: Couldn't determine implicit lockfile from "/opt/otrs/bin/otrs.Console.pl"
procmail: Locking ".lock"
procmail: Executing "/opt/otrs/bin/otrs.Console.pl,Maint::PostMaster::Read"
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::Read-10 Perl: 5.16.3 OS: linux Time: Thu Jan 11 08:10:39 2018
Message: mkdir /opt/otrs/var/tmp/CacheFileStorable/Valid/2: Permission denied at /opt/otrs/Kernel/System/Cache/FileStorable.pm line 87.
Traceback (12035):
Module: Kernel::System::Console::Command::Maint::PostMaster::Read::Run Line: 138
Module: (eval) Line: 460
Module: Kernel::System::Console::BaseCommand::Execute Line: 454
Module: Kernel::System::Console::InterfaceConsole::Run Line: 86
Module: /opt/otrs/bin/otrs.Console.pl Line: 38
procmail: [12028] Thu Jan 11 08:10:39 2018
procmail: Non-zero exitcode (75) from "/opt/otrs/bin/otrs.Console.pl"
procmail: Assigning "LASTFOLDER=/opt/otrs/bin/otrs.Console.pl Maint::PostMaster::Read"
procmail: Unlocking ".lock"
procmail: Locking "/opt/otrs/var/spool/..lock"
procmail: Assigning "LASTFOLDER=/opt/otrs/var/spool/8"
procmail: Opening "/opt/otrs/var/spool/8"
procmail: Acquiring kernel-lock
procmail: Unlocking "/opt/otrs/var/spool/..lock"
procmail: Notified comsat: "otrs@0:/opt/otrs/var/spool/8"
From name.redacted@domainredacted.com Thu Jan 11 08:10:38 2018
Subject: RE: Subject Redacted
Folder: /opt/otrs/var/spool/8 26873
Code: Select all
| $SYS_HOME/bin/otrs.Console.pl Maint::PostMaster::Read