[rt-users] Procmail and RT

Jorey Bump list+rt at joreybump.com
Mon Dec 22 10:14:53 EST 2003


Tim Wilson wrote:
> If I want to inspect incoming messages to RT and send them to different
> queues based on the the contents of the email headers, where do my procmail
> recipes need to go? Which .procmailrc gets read?

I send all RT mail to a single user, and use the .procmailrc in that
user's home directory. In my case, I sort on the To: address, but you
can sort on anything that procmail can understand (watch the wrap - the
mailgate statement should be on one line):

# Place spam filters first (if you don't handle mail abuse complaints)
:0 HB
* .*As seen on (NBC|CBS|CNN|Oprah|T.V.|TV)|government grants
/dev/null

# Sort into queue according to recipient address
:0
* ^TO.*support at example.com
|/opt/rt3/bin/rt-mailgate --queue "Acme Support" --action correspond
--url http://support.example.com/

:0
* ^TO.*sales at example.com
|/opt/rt3/bin/rt-mailgate --queue "Acme Sales" --action correspond --url
http://support.example.com/

# all remaining mail goes to Acme Info queue
:0
*
|/opt/rt3/bin/rt-mailgate --queue "Acme Info" --action correspond --url
http://support.example.com/






More information about the rt-users mailing list