Create tickets via email

hello list,

I have built my company’s RT server to the point where users can authenticate via LDAP as well as a postfix mail server on the RT host that you can use to send email to accounts intended for use with RT. This postfix server also has pop3 and IMAP functionality.

However, I tried following the ‘getmail’ (not the fetchmail) portion of this tutorial:

http://requesttracker.wikia.com/wiki/Fetchmail

I was able to have the email sent to RT downloaded via pop. It seems to go ok…

[rt@host .getmail]$ getmail --rcfile getmailrc
getmail version 4.23.0
Copyright (C) 1998-2009 Charles Cazabon. Licensed under the GNU GPL version 2.
SimplePOP3Retriever:rt@mm3.mlbam.com@rt.mm3.mlbam.com:110:
msg 1/3 (1521 bytes) from Tim.Dunphy@example.com delivered to MDA_external command rt-mailgate ()
msg 2/3 (1552 bytes) from Tim.Dunphy@exmaple.com delivered to MDA_external command rt-mailgate ()
msg 3/3 (1560 bytes) from Tim.Dunphy@example.com delivered to MDA_external command rt-mailgate ()
3 messages (4633 bytes) retrieved, 0 skipped
Summary:
Retrieved 3 messages (4633 bytes) from SimplePOP3Retriever:rt@mm3.mlbam.com@rt.mm3.mlbam.com:110

The getmailrc file looks like this:

[rt@monitor03 .getmail]$ cat getmailrc
[retriever]
type = SimplePOP3Retriever
server = rt.foo.example.com
port = 110
username = rt@foo.exmaple.com
password = secret

[destination]
type = MDA_external
path = /usr/local/rt4/bin/rt-mailgate
user = rt
group = rt
arguments = (“–url”, “http://rt.foo.example.com/helpdesk”, “–queue”, “ops”, “–action”, “correspond”,)

[options]
read_all = false
delete_after = 8
verbose = 2

I have created resource configs for the actions comment, correspond and reply

[rt@monitor03 .getmail]$ ls
oldmail-rt.mm3.mlbam.com-110-rt@mm3.mlbam.com rtcomment rtcorrespond rtreply

I’ve created a queue and dashboard called simply ‘ops’. However when I send email to rt@foo.example.com and do I search for tickets none turn up and I get this reply from the RT server.

No permission to create tickets in the queue

It’s a great opportunity to build an RT server for a company as large as this.

Thanks in advance for your help!
Tim

I’ve also tried creating a scrip and gotten this result:

Couldn’t compile CustomPrepareCode codeblock ‘===Create-Ticket: ops Subject: Code review for {$Tickets{‘TOP’}->Subject} Depended-On-By: {$Tickets{‘TOP’}->Id} Queue: ___Approvals Type: approval Content: Someone has created a ticket. you should review and approve it, so they can finish their work ENDOFCONTENT’: syntax error at (eval 412) line 1, near “{ ==”

This was the code that was used:

===Create-Ticket: ops
Depended-On-By: {$Tickets{‘TOP’}->Id}
Queue: ___Approvals
Type: approval
Content: Someone has created a ticket. you should review and approve it, so they can finish their work
ENDOFCONTENT

regards
tim----- Original Message -----
From: “Tim Dunphy” bluethundr@jokefire.com
To: rt-users@lists.bestpractical.com
Sent: Tuesday, November 29, 2011 8:09:30 PM
Subject: [rt-users] create tickets via email

hello list,

I have built my company’s RT server to the point where users can authenticate via LDAP as well as a postfix mail server on the RT host that you can use to send email to accounts intended for use with RT. This postfix server also has pop3 and IMAP functionality.

However, I tried following the ‘getmail’ (not the fetchmail) portion of this tutorial:

http://requesttracker.wikia.com/wiki/Fetchmail

I was able to have the email sent to RT downloaded via pop. It seems to go ok…

[rt@host .getmail]$ getmail --rcfile getmailrc
getmail version 4.23.0
Copyright (C) 1998-2009 Charles Cazabon. Licensed under the GNU GPL version 2.
SimplePOP3Retriever:rt@mm3.mlbam.com@rt.mm3.mlbam.com:110:
msg 1/3 (1521 bytes) from Tim.Dunphy@example.com delivered to MDA_external command rt-mailgate ()
msg 2/3 (1552 bytes) from Tim.Dunphy@exmaple.com delivered to MDA_external command rt-mailgate ()
msg 3/3 (1560 bytes) from Tim.Dunphy@example.com delivered to MDA_external command rt-mailgate ()
3 messages (4633 bytes) retrieved, 0 skipped
Summary:
Retrieved 3 messages (4633 bytes) from SimplePOP3Retriever:rt@mm3.mlbam.com@rt.mm3.mlbam.com:110

The getmailrc file looks like this:

[rt@monitor03 .getmail]$ cat getmailrc
[retriever]
type = SimplePOP3Retriever
server = rt.foo.example.com
port = 110
username = rt@foo.exmaple.com
password = secret

[destination]
type = MDA_external
path = /usr/local/rt4/bin/rt-mailgate
user = rt
group = rt
arguments = (“–url”, “http://rt.foo.example.com/helpdesk”, “–queue”, “ops”, “–action”, “correspond”,)

[options]
read_all = false
delete_after = 8
verbose = 2

I have created resource configs for the actions comment, correspond and reply

[rt@monitor03 .getmail]$ ls
oldmail-rt.mm3.mlbam.com-110-rt@mm3.mlbam.com rtcomment rtcorrespond rtreply

I’ve created a queue and dashboard called simply ‘ops’. However when I send email to rt@foo.example.com and do I search for tickets none turn up and I get this reply from the RT server.

No permission to create tickets in the queue

It’s a great opportunity to build an RT server for a company as large as this.

Thanks in advance for your help!
Tim

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Boston TBA

hello list,

I have built my company’s RT server to the point where users can
authenticate via LDAP as well as a postfix mail server on the RT host
that you can use to send email to accounts intended for use with RT.
This postfix server also has pop3 and IMAP functionality.

However, I tried following the ‘getmail’ (not the fetchmail) portion
of this tutorial:

http://requesttracker.wikia.com/wiki/Fetchmail

If you have postfix installed on the RT server, use the normal aliases
mechanism to pipe mail to rt-mailgate (as described in the README).

It’s overly complex and brittle to use getmail to read from a local
POP/IMAP server on the same machine.

No permission to create tickets in the queue

RT should be spitting out a more verbose message than that, go look for
it. It probably also sends mail to the configured RT administrator
address. You need to properly setup rights to let the sender create
tickets.

Thomas

Couldn’t compile CustomPrepareCode codeblock '===Create-Ticket: …

You put a CreateTickets template in the “Custom prepare” textbox of your
scrip instead of in a new template.

Thomas