[rt-users] Getting email to create a ticket

Odhiambo Washington wash at wananchi.com
Tue Aug 17 04:13:43 EDT 2004

* Brelsfoard, Alex <alexb at WPI.EDU> [20040817 01:07]: wrote:
> Hello all,
> OK, here's the basics of what I am trying to do: when you send e message to
> the account 'rtgate' it will automatically create an rt ticket.
> Current our servers are running RH9, with RT 3.0.8.
> I have spoken with our sysadmins and the way they want me to do this is to
> have all mail going to rtgate be forwarded to a procmail command sending the
> message to rt-mailgate.  So here's what I've got so far.  The .forward file
> contains:
> "|exec /usr/local/bin/procmail"
> The .procmailrc file contains:
> "
> SHELL=/bin/sh
> LOGFILE=${MAILDIR}/procmail.log
> LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
> RT_MAILGATE="/usr/local/bin/rt-mailgate"
> RT_URL="http://utility4.wpi.edu:8080/"
> |/usr/bin/perl $RT_MAILGATE --queue 5 --action correspond --url $RT_URL
> "
> Right now when I email rtgate nothing happens.  Part of the problem is that I
> do not fully understand 2 major portions of these actions:
> 1) How the email is parsed into a ticket?

That requires that you read RT documentation. Noone will explain that
here again, I am sure ;)

> 2) how to name the queue I want it to be sent to.  Is it the id#? The full
> name of the queue?  Or am I way off base here?

The simple queue name.

So your .procmailrc is the one with mistake. You must tell procmail
about where the rule begins. Something like this will do:

LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

|$RT_MAILGATE --queue QUEUE_NAME --action correspond --url $RT_URL


1. I believe $RT_MAILGATE is mode 755 and your system knows the
   location of the perl binary so there is really no need of invoking
   perl explicitly.

2. If you have several queues, then all this becomes a whole new ball

If you search RT archives for "procmail", you will find several
examples. Plus, you should read the RT Wiki - there are guidelines on
how to use RT with procmail.

here is the one referenced from the Wiki: http://www.geert.triple-it.nl/rt_procmail.html

       - wash 
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
<wash at wananchi dot com>              . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
"Oh My God! They killed init! You Bastards!"  
						 --from a /. post

More information about the rt-users mailing list