[rt-users] Procmail working, but not putting tickets in queues

Nicôle Layne-Balram nlayne at telebarbados.com
Mon Jan 7 10:02:32 EST 2013


I currently have user rt catching all mail for the domain and procmail running on all incoming mail.

I recently had to change the domain name, and I can see from the logs that procmail is functioning as expected, and calculating the correct queues, but it looks like the task is being overwritten before it has a chance to perform that last task, see logs:

procmail: Assigning "LASTFOLDER=/usr/bin/perl /opt/rt4/bin/rt-mailgate --queue installation --action correspond --url http://rt.telebarbados.com/"

but then I get this after:

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: "rt at 750719692:/var/mail/rt"
>From nlayne at telebarbados.com  Mon Jan  7 00:09:45 2013
 Subject: Test to upgraded RT
  Folder: /var/mail/rt                                                     9459

I think that the second procmail: Assigning "LASTFOLDER=/var/mail/rt" is overwriting the first procmail: Assigning "LASTFOLDER=/usr/bin/perl /opt/rt4/bin/rt-mailgate...

but cannot see why.

Here's my procmail code (which runs through successfully):
#Preliminaries 
    SHELL=/bin/sh               #Use the Bourne shell (check your path!) 
    MAILDIR="/var/mail/rt" 
    LOGFILE="/home/rt/proc.log" 
    LOG="--- Logging ${LOGFILE} for ${LOGNAME}, " 
    VERBOSE=yes 
    MAILDOMAIN="rt.telebarbados.com" 
#Made no changes to the default rt-mailgate file 
    RT_MAILGATE="/opt/rt4/bin/rt-mailgate" 
    RT_URL=" http://rt.telebarbados.com/" 
    LOGABSTRACT=all 
    # 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/'` 
    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

Kind regards,
Nicôle
 





More information about the rt-users mailing list