Update (still not working): I believe main error to be this, although the mailgate file is there and contains the default content.
Can't open perl script "/opt/rt3/bin/rt-mailgate ": No such file or directory procmail: Error while writing to "/usr/bin/perl" procmail: Program failure (2) of "/usr/bin/perl" procmail: Assigning "LASTFOLDER=/usr/bin/perl /opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.mydomain.com/ Thanks for your suggestion Stucki. Here's what the file currently looks like, not seeing any funny characters or spaces from cmd line (all the # are from me testing different portions, will clean up once I get it working). > more /home/rt/.procmailrc :::::::::::::: /home/rt/.procmailrc :::::::::::::: #Preliminaries SHELL=/bin/sh #Use the Bourne shell (check your path!) #MAILDIR=${HOME} #First check what your mail directory is! MAILDIR="/var/mail/rt/" #LOGFILE=${MAILDIR}/procmail.log LOGFILE="/home/rt/procmail_log.log" LOG="--- Logging ${LOGFILE} for ${LOGNAME}, " VERBOSE=yes MAILDOMAIN="rt.mydomain.com" RT_MAILGATE="/opt/rt3/bin/rt-mailgate" #RT_MAILGATE="/usr/local/bin/rt-mailgate" RT_URL="http://rt.mydomain.com/" LOGABSTRACT=all #QUEUE=`echo $TO| $HOME/get_queue.pl` #ACTION=`echo $TO| $HOME/get_action.pl` #:0 #{ # the following line extracts the recipient from Received-headers. # Simply using the To: does not work, as tickets are often created # by sending a CC/BCC to RT #TO=`formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>* *;.*$/\1/'` TO=`formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>* *;.*$/\1/'` QUEUE=`echo $TO| $HOME/get_queue.pl` ACTION=`echo $TO| $HOME/get_action.pl` :0 h b w |/usr/bin/perl $RT_MAILGATE --queue $QUEUE --action $ACTION --url $RT_URL #} I made some other changes since my original e-mail and here is an output of the logs: --- Logging /home/rt/proc.log for rt, procmail: [18543] Thu Aug 26 11:08:41 2010 procmail: Assigning "MAILDOMAIN=rt.mydomain.com " procmail: Assigning "RT_MAILGATE=/opt/rt3/bin/rt-mailgate " procmail: Assigning "RT_URL=http://rt.mydomain.com/ " procmail: Assigning "LOGABSTRACT=all " procmail: Executing "formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>* *;.*$/\1/'" procmail: Assigning "TO= " procmail: Executing "echo $TO| $HOME/get_queue.pl" procmail: Assigning "QUEUE=general " procmail: Executing "echo $TO| $HOME/get_action.pl" procmail: Assigning "ACTION=correspond " procmail: Skipped " " procmail: Executing "/usr/bin/perl,/opt/rt3/bin/rt-mailgate ,--queue,general ,--action,correspond ,--url,http://rt.mydomain.com/ " Can't open perl script "/opt/rt3/bin/rt-mailgate ": No such file or directory procmail: Error while writing to "/usr/bin/perl" procmail: Program failure (2) of "/usr/bin/perl" procmail: Assigning "LASTFOLDER=/usr/bin/perl /opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.mydomain.com/ " procmail: Locking "/var/mail/rt.lock" procmail: Assigning "LASTFOLDER=/var/mail/rt" procmail: Opening "/var/mail/rt" procmail: Acquiring kernel-lock procmail: Unlocking "/var/mail/rt.lock" procmail: Notified comsat: "r...@85426:/var/mail/rt" >From [email protected] Thu Aug 26 11:08:41 2010 Subject: Testing to internal Folder: /var/mail/rt 6147 Syslog: Aug 26 11:08:41 RT postfix/smtpd[18537]: connect from [local Exchange server] Aug 26 11:08:41 RT postfix/smtpd[18537]: 599F948096: client=[local Exchange server] Aug 26 11:08:41 RT postfix/cleanup[18540]: 599F948096: message-id=<4c137e3ba6db4a4291596a118437d8e5b3f...@exchange_server.mydomain.com> Aug 26 11:08:41 RT postfix/qmgr[5063]: 599F948096: from=<[email protected]>, size=6163, nrcpt=1 (queue active) Aug 26 11:08:41 RT postfix/smtpd[18537]: disconnect from [local Exchange server] Aug 26 11:08:41 RT postfix/local[18542]: 599F948096: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.29, delays=0.1/0.03/0/0.16, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail) Aug 26 11:08:41 RT postfix/cleanup[18540]: 984B748098: message-id=<[email protected]> Aug 26 11:08:41 RT postfix/bounce[18541]: 599F948096: sender delivery status notification: 984B748098 Aug 26 11:08:41 RT postfix/qmgr[5063]: 599F948096: removed Aug 26 11:08:41 RT postfix/qmgr[5063]: 984B748098: from=<>, size=2642, nrcpt=1 (queue active) Aug 26 11:08:50 RT postfix/smtp[18558]: 984B748098: to=<[email protected]>, relay=10.0.0.44[10.0.0.44]:25, delay=8.9, delays=0.02/0.04/0.02/8.8, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> Queued mail for delivery) Aug 26 11:08:50 RT postfix/qmgr[5063]: 984B748098: removed Kind regards, Nicôle -----Original Message----- From: Chr. von Stuckrad [mailto:[email protected]] Sent: Thursday, August 26, 2010 5:12 AM To: Nicôle Layne Subject: Re: [rt-users] Sorting e-mail into queues automatically usingprocmail Hi! Seeing the strange "somethimg<NEWLINE>" pattern in the log lines and seeing the definitley broken single '{' for 'LASTFOLDER' reminds me of the time, when one of our Users edited his .procmailrc with an WINDOWS-Editor inserting '<CarriageReturn><Newline>' where procmail only understands '<newline>' for the line-endings. Lots of strange things then happened, because listings do not show the difference, but the 'character' was used for Filenames and such... So you may look into your procmailrc with a tool showing 'really everything' (UNIX: e.g.'xxd') to check this. Or load the file into an editor which can explicitely write it with 'only newline' == UNIX-line-end. May be this helps ... ? Stucki On Tue, 24 Aug 2010, Nicôle Layne wrote: > --- Logging /home/rt/procmail_log.log ... ... ... > procmail: Assigning "LASTFOLDER={ > > " > > procmail: Opening "{ > > " RT Training in Washington DC, USA on Oct 25 & 26 2010 Last one this year -- Learn how to get the most out of RT!
