On Sat, Mar 20, 2010 at 5:59 AM, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
<[email protected]> wrote:

Check out procmail, this is what you are looking for!

Torsten

 Tortsen,

Thanks for pointing me into the right direction with procmail. Here's the
solution that I came up with (hopefully it will be helpful to someone else).

/etc/procmailrc

# Set Variables
SHELL=/bin/sh
LOGFILE=/var/log/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}---\n "
VERBOSE=yes
RT_MAILGATE="/opt/rt3/bin/rt-mailgate"
RT_URI="http://192.168.0.29/ticket";

LOGABSTRACT=no

# ABC
:0
* ^From: [email protected]
|/usr/bin/perl $RT_MAILGATE --queue "abc's Office" --action correspond --url
$RT_URI

# JKL
:0
* ^From: [email protected]
|/usr/bin/perl $RT_MAILGATE --queue "JKL" --action correspond --url $RT_URI

# XYZ
:0
* ^From: [email protected]
|/usr/bin/perl $RT_MAILGATE --queue "XYZ" --action correspond --url $RT_URI

# All others
:0
* !^From: [email protected]|[email protected]|[email protected]
|/usr/bin/perl $RT_MAILGATE --queue "External Users" --action correspond
--url $RT_URI
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

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

Reply via email to