Hello all,

I thought I would share with others how I setup procmail to filter out
emails on my RT 3.6.5 system. My server is Fedora Core based.
If you do not have either of these two packages installed you can
installed them via yum or yumex.

I configured my .procmailrc file as follows:

***********.procmailrc****************
LOGFILE=/root/procmail.log

:O
* ^From:.*[email protected]*
/dev/null

:O
* ^From:.*[email protected]*
/dev/null

:O
* ^[email protected]
|/usr/sbin/rt-mailgate --queue "CustomerSupport" --action correspond
--url http://my-rt-url.com/

:O
* ^to.*[email protected]
|/usr/sbin/rt-mailgate --queue "CustomerOther" --action correspond
--url http://my-rt-url.com/

*************end of .procmailrc********************

Let me explain a little.
1. I am filtering out the [email protected] and
[email protected] email addresses before they get to the
mailgate.
2. I have two queues setup and I have a specific email address for
each. If you wanted to you can have a single email address for Request
Tracker and use Procmail to filter out and send the message to the
correct queue but that is not what I am doing.

Now to get the emails to my Request Tracker server I am retrieving
them from our Exchange server via fetchmail with the following
command:
*****************
fetchmail -m "/usr/bin/procmail -f %F" --daemon 120
*****************
-m send the email to procmail for processing
-f is to specify a non standard .procmailrc file... I am using the
standard file but for some reason it does not work without the -f for
me..
-F flushes the email on the server once it is procesed.
--daemon 120 run fetchmail every 2 minutes.

If you want some statistics on what procmail has filtered out you can
you mailstat...BE CAREFULL

run
********************************
mailstat -kl /root/procmail.log (if this is what you specified in your
.procmailrc file)
********************************
if you do not put the -k in the logfile will be truncated to 0


I hope this helps some people.

Phil
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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


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

Reply via email to