Procmail filtering

I’m trying to use procmail to filter messages coming into RT but I can’t
figure out how to pass a queue name to my procmail recipe if it has
spaces in it.

QUEUE="queue with spaces" and QUEUE=‘queue with spaces’ both cause
failure.

Any suggestions?

My /etc/aliases looks like this:

rt-general: “|/etc/smrsh/procmail -m QUEUE=General
/etc/procmail/rt-deliver.rc”

rt-deliver.rc looks like this:

Trash Outlook autoreplies

:0 w

  • ^subject:.*Out of Office AutoReply
    /dev/null

#Strip Attachments and HTML
:0 fw
|/usr/local/bin/stripmime.pl

#Send it on to the RT queue
:0 w
| /usr/sbin/rt-mailgate --queue $QUEUE --action correspond --url
https://myserver.edu/rt/

Have you tried queue\ with\ spaces?

Keep up with me and what I’m up to: http://theillien.blogspot.com

John Arends wrote:

“$QUEUE” in my .rc file fixed the problem. It’s quite obvious why that
is the solution now, but when banging your head against the wall for an
hour you sometimes don’t see it.

Mathew Snyder wrote:

Hi John!

only a guess, but due to the fact that the mailgateway also use
http internally, I would try to encode it like an http request
so I would try
QUEUE=“queue%20with%20spaces”

good luck

svenOn Mi, 2007-11-14 at 08:58 -0600, John Arends wrote:

“$QUEUE” in my .rc file fixed the problem. It’s quite obvious why that
is the solution now, but when banging your head against the wall for an
hour you sometimes don’t see it.

Mathew Snyder wrote:

Have you tried queue\ with\ spaces?

Keep up with me and what I’m up to: http://theillien.blogspot.com

John Arends wrote:

I’m trying to use procmail to filter messages coming into RT but I can’t
figure out how to pass a queue name to my procmail recipe if it has
spaces in it.

QUEUE="queue with spaces" and QUEUE=‘queue with spaces’ both cause
failure.

Any suggestions?

My /etc/aliases looks like this:

rt-general: “|/etc/smrsh/procmail -m QUEUE=General
/etc/procmail/rt-deliver.rc”

rt-deliver.rc looks like this:

Trash Outlook autoreplies

:0 w

  • ^subject:.*Out of Office AutoReply
    /dev/null

#Strip Attachments and HTML
:0 fw
|/usr/local/bin/stripmime.pl

#Send it on to the RT queue
:0 w
| /usr/sbin/rt-mailgate --queue $QUEUE --action correspond --url
https://myserver.edu/rt/


The rt-users Archives

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

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

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

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


The rt-users Archives

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

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

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

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