[rt-users] handle tickets via Mail, but Problems with space in queue-name

Stefan Oeser - emendis GmbH Stefan.Oeser at emendis.de
Wed Nov 7 07:52:05 EST 2007


Hello,

  I've got a problem with handling tickets in queues containing spaces.

Description:
The mails are being fetched via fetchmail and delivered to rt-mailgate via procmail.
All things work fine, but I still couldn't deliver Mails to Queuenames containing spaces.
I have already searched for a solution in the web, but the most mentioned hint, to put
the queue-name between single quotes behind the --queue option of rt-mailgate, doesn't
work. For better understanding, my code in the .procmailrc

-- SNIP: .procmailrc --
# ... setting some variables

:0
{
# getting action from Recipient
TO=`formail -c -xReceived: |grep $MAILDOMAIN |sed -e 's/.*for *<*\(.*\)>* *;.*$/\1/'`
ACTION=`echo $TO| $HOME/get_action.pl`
QUEUE=`formail -c -xSubject: | awk -F[ '{ print $2 }' | awk -F] '{ print $1 }'`

# ... change something within the mailheader
:0 h b w
|/usr/bin/perl $RT_MAILGATE --queue "${QUEUE}" --action $ACTION --url ${RT_URL}
}
-- SNAP --

The procmail.log returns:
-- SNIP: procmail.log --
...
procmail: Assigning "QUEUE=Queue with Spaces"
...
procmail: Executing "/usr/bin/perl,/usr/local/rt3/bin/rt-mailgate,--queue,Queue with Spaces,--action,correspond,--url,http://rt.domain.com/"
procmail: Assigning "LASTFOLDER=/usr/bin/perl /usr/local/rt3/bin/rt-mailgate --queue Queue with Spaces --action correspond --url http://rt.domain.com/"
procmail: Notified comsat: "rt_dispatcher@:/usr/bin/perl /usr/local/rt3/bin/rt-mailgate --queue Queue with Spaces --action correspond --url http://rt.domain.com/"
>From Stefan.Oeser at emendis.de Wed Nov  7 13:17:00 2007
  Folder: /usr/bin/perl /usr/local/rt3/bin/rt-mailgate --queue Queue     1606
-- SNAP --

Additional Information:
I'm trying to use only two mailadresses: rt at rt.domain.com and rt-comment at rt.domain.com,
the Mailsubject must be written like '[Queuename #TicketID] TicketSubject' to answer a ticket
and like '[Queuename] TicketSubject' to create a Ticket. I use procmail to deliver the mails into
rt-mailgate and rewrite the Mailsubject.

I would be very grateful for some help :)
Best regards,
Stefan Oeser



More information about the rt-users mailing list