The reason we’re looking at this option is that mail here at the
university is handled outside our control and our group is unfamiliar
enough with it that we cannot be sure of how things function. So we are
looking at direct access since we’re on the local box anyway.
I have tested the use of the CLI rt and it seems to work very well for
the majority of our needs. However, the documentation on it is sparse
and there are two questions that I’m running into.
- Can you set custom fields through this interface?
I have tried adding the following to the ticket data file:
cf_fieldname: value
I’ve also tried to use the ‘set’ action with the rt command as follows:
cat ticket_data | rt create -t ticket -i set cf_fieldname=value
Neither of those seem to work.
- How can a non-user create a ticket through this interface?
We have it setup so that everyone can create a ticket and it uses the
email address as the username with no passwd.
So I tried
export RTUSER=email@address.com
export RTPASSWD=
export RTSERVER=http://rt.web.server.addr/
Before running rt, but it complained of an incorrect username or
password.
Any suggestions would be helpful.
Thanks,
Ryan Roland
Application Developer
Information Technology
Division of Recreational Sports
Indiana University
812.855.9617
rmroland@indiana.eduFrom: Ramon Kagan [mailto:rkagan@yorku.ca]
Sent: Monday, November 01, 2004 09:10
To: Roland, Ryan M
Cc: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Alternative Ticket Creation
If the form is on the same box as RT, then why would it take so long to
get through mail?? Why don’t you configure the form to go to the
localhost directly? In any case, you can use rt-mailgate at the command
line.
/path-to/rt-mailgate --url http:// --queue
general --action < form_info
Read the test components of the rt-mailgate perl script.
Ramon Kagan
York University, Computing and Network Services
Information Security - Senior Information Security Analyst
(416)736-2100 #20263
rkagan@yorku.ca
I have not failed. I have just I don’t know the secret to
success,
found 10,000 ways that don’t work. but the secret to failure is
trying to please everybody.
- Thomas Edison - Bill Cosby
That’s exactly what we were considering at first. However, since we
are
not in charge of the university wide email system there are basically
two concerns we have with that setup. Firstly, is latency. If
someone
submits a request form, it may be minutes (or in bad times, hours)
before that request email gets through to the RT box. Secondly is
error
checking. It’s much more straightforward and simple to check for a
return value of 1 from a command-line script than to have to catch and
handle an email bounce. Also, since our web form front-end is on the
same box as the RT instance, it’d be simple, immediate and easy to
catch
errors if we could pass the form data to a command line script which
did
the same basic job as rt-mailgate. In fact, we’ve considered using
this, but haven’t figured out the details of directly calling
rt-mailgate yet and wondered if there was something already created
that
wouldn’t expect an email format and would be fine with a simple text
file.
Any thoughts?
Either way, thanks Ken for the confirmation that our first inclination
was at least feasible.
Thanks,
Ryan Roland
Application Developer
Information Technology
Division of Recreational Sports
Indiana University
812.855.9617
rmroland@indiana.edu
-----Original Message-----
From: Ken O’Driscoll [mailto:rt-lists@ieinternet.com]
Sent: Monday, November 01, 2004 04:59
To: Roland, Ryan M
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Alternative Ticket Creation
If we want to create our own front-end form, is there a command line
script (or whatever) we can call and pass the data to create the
ticket?
[ …snip…]
Hi Ryan,
We had the same requirements when we first moved to RT. We found that
the simplest way was to have a standard HTML form which tied into a
little PHP to send an email to the queue address.
We use the PHP mail function like this:
mail($queueaddress, $subject, $message, $from);
Providing that you can get the requestor to enter their email address
in
the form, you can make the email to RT to appear to come from them and
thus they get an RT ticket created message.
In our environment, we have them put in their name also and build the
$from like this:
$from = “From: $email ($name)”;
I hope this make sense, I haven’t had my coffee yet!
–
This email has passed through an IE Internet MailWall gateway
and has been screened for known viruses, potential viruses and
malicious code.
IE Internet.com MailWall (http://ieinternet.com/mailwall/)
–
The rt-users Archives
Be sure to check out the RT wiki at http://wiki.bestpractical.com