Quick question. If the name of the queue is more than one word (in other
words containing white space) should I use quotes? Or will it be fine on its
own?
–AlexFrom: Odhiambo Washington [mailto:wash@wananchi.com]
Sent: Tue 8/17/2004 4:13 AM
To: Brelsfoard, Alex
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Getting email to create a ticket
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
MAILDIR=${HOME}
LOGFILE=${MAILDIR}/procmail.log
LOG=“— Logging ${LOGFILE} for ${LOGNAME}, "
VERBOSE=yes
RT_MAILGATE=”/usr/local/bin/rt-mailgate"
RT_URL=“http://utility4.wpi.edu:8080/”
LOGABSTRACT=all
|/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:
- How the email is parsed into a ticket?
That requires that you read RT documentation. Noone will explain that
here again, I am sure
- 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:
SHELL=/bin/sh
MAILDIR=${HOME}
LOGFILE=${MAILDIR}/procmail.log
LOG=“— Logging ${LOGFILE} for ${LOGNAME}, "
VERBOSE=yes
LOGABSTRACT=all
RT_MAILGATE=”/usr/local/bin/rt-mailgate"
RT_URL=“http://utility4.wpi.edu:8080/”
:0
- ! ^FROM_DAEMON
- ! ^FROM_MAILER
|$RT_MAILGATE --queue QUEUE_NAME --action correspond --url $RT_URL
Note:
-
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.
-
If you have several queues, then all this becomes a whole new ball
game.
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
cheers
- wash
Odhiambo Washington . WANANCHI ONLINE LTD (Nairobi, KE)
|
. 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