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
- ^From:.noreply@mail.badcompany.com
/dev/null
- ^From:.another@badcompanyname.com
/dev/null
- ^TO.*rt@mydomain.com
|/usr/sbin/rt-mailgate --queue āCustomerSupportā --action correspond
āurl http://my-rt-url.com/
- ^TO.*rt2address@mydomain.com
|/usr/sbin/rt-mailgate --queue āCustomerOtherā --action correspond
āurl http://my-rt-url.com/
end of .procmailrc*******
Let me explain a little.
- I am filtering out the noreply@mail.badcompany.com and
another@badcompanyname.com email addresses before they get to the
mailgate. - 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