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

Helmuth Ramirez HelmuthRamirez at compupay.com
Wed Nov 7 08:46:12 EST 2007

We use spaces in our queue names, here is an excerpt from our aliases

rttechnicalservices: "|/opt/rt3/bin/rt-mailgate --queue 'technical
services' --action correspond --url http://MyUrlHere.com"
rttechnicalservices-comment: "|/opt/rt3/bin/rt-mailgate --queue
'technical services' --action comment --url http://MyUrlHere.com"

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Stefan
Oeser - emendis GmbH
Sent: Wednesday, November 07, 2007 7:52 AM
To: rt-users at lists.bestpractical.com
Subject: [rt-users] handle tickets via Mail,but Problems with space in


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

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

# 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
-- 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
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
-- 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


If you sign up for a new RT support contract before December 31, we'll
up to 20 percent off the price. This sale won't last long, so get in
touch today. 
    Email us at sales at bestpractical.com or call us at +1 617 812 0745.

Community help: http://wiki.bestpractical.com
Commercial support: sales at bestpractical.com

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

More information about the rt-users mailing list