<p></p>
<p>On Sat, Mar 20, 2010 at 5:59 AM, Brumm, Torsten / Kuehne + Nagel / Ham MI-ID <<a href="mailto:torsten.brumm@kuehne-nagel.com" target="_blank">torsten.brumm@kuehne-nagel.com</a>> wrote:</p>
<blockquote><p><font color="#000080">Check out procmail, this is what you are looking for!</font></p>
<p><font color="#000080">Torsten</font><br>
</p>
</blockquote>
<p></p>
<p>Tortsen, <br></p><p>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).</p><p>/etc/procmailrc<br></p><p># Set Variables<br>
SHELL=/bin/sh<br>LOGFILE=/var/log/procmail.log<br>LOG="--- Logging ${LOGFILE} for ${LOGNAME}---\n "<br>VERBOSE=yes<br>RT_MAILGATE="/opt/rt3/bin/rt-mailgate"<br>RT_URI="<a href="http://192.168.0.29/ticket">http://192.168.0.29/ticket</a>"<br>
<br>LOGABSTRACT=no<br><br># ABC<br>:0<br>* ^From: .*@<a href="http://abc.com">abc.com</a><br>|/usr/bin/perl $RT_MAILGATE --queue "abc's Office" --action correspond --url $RT_URI<br><br># JKL<br>:0<br>* ^From: .@<a href="http://jkl.org">jkl.org</a><br>
|/usr/bin/perl $RT_MAILGATE --queue "JKL" --action correspond --url $RT_URI<br><br># XYZ<br>:0<br>* ^From: .*@XYZ.org<br>|/usr/bin/perl $RT_MAILGATE --queue "XYZ" --action correspond --url $RT_URI<br>
<br>
# All others<br>:0<br>* !^From: .*@<a href="http://abc.com">abc.com</a>|.*@<a href="http://jkl.org">jkl.org</a>|.*@<a href="http://xyz.org">xyz.org</a><br>|/usr/bin/perl $RT_MAILGATE --queue "External Users" --action correspond --url $RT_URI<br>
<br></p>
<div style="display: inline;"></div>
<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>