[rt-users] Determine Queue based off of email domain
Dustin Berube
dustin.berube at gmail.com
Sun Mar 21 00:28:19 EDT 2010
On Sat, Mar 20, 2010 at 5:59 AM, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID
<torsten.brumm at kuehne-nagel.com> 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: .*@abc.com
|/usr/bin/perl $RT_MAILGATE --queue "abc's Office" --action correspond --url
$RT_URI
# JKL
:0
* ^From: . at jkl.org
|/usr/bin/perl $RT_MAILGATE --queue "JKL" --action correspond --url $RT_URI
# XYZ
:0
* ^From: .*@XYZ.org
|/usr/bin/perl $RT_MAILGATE --queue "XYZ" --action correspond --url $RT_URI
# All others
:0
* !^From: .*@abc.com|.*@jkl.org|.*@xyz.org
|/usr/bin/perl $RT_MAILGATE --queue "External Users" --action correspond
--url $RT_URI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100321/3c9cb856/attachment.htm>
More information about the rt-users
mailing list