1RT-MAILGATE(1)        User Contributed Perl Documentation       RT-MAILGATE(1)
2
3
4

NAME

6       rt-mailgate - Mail interface to RT3.
7

SYNOPSIS

9           rt-mailgate --help : this text
10
11       Usual invocation (from MTA):
12
13           rt-mailgate --action (correspond|comment|...) --queue queuename
14                       --url http://your.rt.server/
15                       [ --debug ]
16                       [ --extension (queue|action|ticket) ]
17                       [ --timeout seconds ]
18

OPTIONS

20       "--action"
21          Specifies what happens to email sent to this alias.  The avaliable
22          basic actions are: "correspond", "comment".
23
24          If you've set the RT configuration variable "UnsafeEmailCommands",
25          "take" and "resolve" are also available.  You can execute two or
26          more actions on a single message using a "-" separated list.  RT
27          will execute the actions in the listed order.  For example you can
28          use "take-comment", "correspond-resolve" or "take-comment-resolve"
29          as actions.
30
31          Note that "take" and "resolve" actions ignore message text if used
32          alone.  Include a  "comment" or "correspond" action if you want RT
33          to record the incoming message.
34
35          The default action is "correspond".
36
37       "--queue"
38          This flag determines which queue this alias should create a ticket
39          in if no ticket identifier is found.
40
41       "--url"
42          This flag tells the mail gateway where it can find your RT server.
43          You should probably use the same URL that users use to log into RT.
44
45       "--extension" OPTIONAL
46          Some MTAs will route mail sent to user-foo@host or user+foo@host to
47          user@host and present "foo" in the environment variable $EXTENSION.
48          By specifying the value "queue" for this parameter, the queue this
49          message should be submitted to will be set to the value of
50          $EXTENSION. By specifying "ticket", $EXTENSION will be interpreted
51          as the id of the ticket this message is related to.  "action" will
52          allow the user to specify either "comment" or "correspond" in the
53          address extension.
54
55       "--debug" OPTIONAL
56          Print debugging output to standard error
57
58       "--timeout" OPTIONAL
59          Configure the timeout for posting the message to the web server.
60          The default timeout is 3 minutes (180 seconds).
61

DESCRIPTION

63       The RT mail gateway is the primary mechanism for communicating with RT
64       via email. This program simply directs the email to the RT web server,
65       which handles filing correspondence and sending out any required mail.
66       It is designed to be run as part of the mail delivery process, either
67       called directly by the MTA or "procmail", or in a .forward or
68       equivalent.
69

SETUP

71       Much of the set up of the mail gateway depends on your MTA and mail
72       routing configuration. However, you will need first of all to create an
73       RT user for the mail gateway and assign it a password; this helps to
74       ensure that mail coming into the web server did originate from the
75       gateway.
76
77       Next, you need to route mail to "rt-mailgate" for the queues you're
78       monitoring. For instance, if you're using /etc/aliases and you have a
79       "bugs" queue, you will want something like this:
80
81           bugs:         "|/opt/rt3/bin/rt-mailgate --queue bugs --action correspond
82                     --url http://rt.mycorp.com/"
83
84           bugs-comment: "|/opt/rt3/bin/rt-mailgate --queue bugs --action comment
85                     --url http://rt.mycorp.com/"
86
87       Note that you don't have to run your RT server on your mail server, as
88       the mail gateway will happily relay to a different machine.
89

CUSTOMIZATION

91       By default, the mail gateway will accept mail from anyone. However,
92       there are situations in which you will want to authenticate users
93       before allowing them to communicate with the system. You can do this
94       via a plug-in mechanism in the RT configuration.
95
96       You can set the array @MailPlugins to be a list of plugins. The default
97       plugin, if this is not given, is "Auth::MailFrom" - that is,
98       authentication of the person is done based on the "From" header of the
99       email. If you have additional filters or authentication mechanisms, you
100       can list them here and they will be called in order:
101
102           Set( @MailPlugins =>
103               "Filter::SpamAssassin",
104               "Auth::LDAP",
105               # ...
106           );
107
108       See the documentation for any additional plugins you have.
109
110       You may also put Perl subroutines into the @MailPlugins array, if they
111       behave as described below.
112

WRITING PLUGINS

114       What's actually going on in the above is that @MailPlugins is a list of
115       Perl modules; RT prepends "RT::Interface::Email::" to the name, to form
116       a package name, and then "use"'s this module. The module is expected to
117       provide a "GetCurrentUser" subroutine, which takes a hash of several
118       parameters:
119
120       Message
121           A "MIME::Entity" object representing the email
122
123       CurrentUser
124           An "RT::CurrentUser" object
125
126       AuthStat
127           The authentication level returned from the previous plugin.
128
129       Ticket [OPTIONAL]
130           The ticket under discussion
131
132       Queue [OPTIONAL]
133           If we don't already have a ticket id, we need to know which queue
134           we're talking about
135
136       Action
137           The action being performed. At the moment, it's one of "comment" or
138           "correspond"
139
140       It returns two values, the new "RT::CurrentUser" object, and the new
141       authentication level. The authentication level can be zero, not allowed
142       to communicate with RT at all, (a "permission denied" error is mailed
143       to the correspondent) or one, which is the normal mode of operation.
144       Additionally, if "-1" is returned, then the processing of the plug-ins
145       stops immediately and the message is ignored.
146

ENVIRONMENT

148       EXTENSION
149           Some MTAs will route mail sent to user-foo@host or user+foo@host to
150           user@host and present "foo" in the environment variable
151           "EXTENSION". Mailgate adds value of this variable to message in the
152           "X-RT-Mail-Extension" field of the message header.
153
154           See also "--extension" option. Note that value of the environment
155           variable is always added to the message header when it's not empty
156           even if "--extension" option is not provided.
157

POD ERRORS

159       Hey! The above document had some coding errors, which are explained
160       below:
161
162       Around line 294:
163           You forgot a '=back' before '=head1'
164
165       Around line 382:
166           =back doesn't take any parameters, but you said =back 4
167
168       Around line 406:
169           =back doesn't take any parameters, but you said =back 4
170
171
172
173perl v5.12.3                      2011-02-17                    RT-MAILGATE(1)
Impressum