1RT-MAILGATE(1) User Contributed Perl Documentation RT-MAILGATE(1)
2
3
4
6 rt-mailgate --help : this text
7
8 Usual invocation (from MTA):
9
10 rt-mailgate --action (correspond⎪comment⎪...) --queue queuename
11 --url http://your.rt.server/
12 [ --debug ]
13 [ --extension (queue⎪action⎪ticket) ]
14 [ --timeout seconds ]
15
16 See "man rt-mailgate" for more.
17
19 "--action"
20 Specifies what happens to email sent to this alias. The avaliable
21 basic actions are: "correspond", "comment".
22
23 If you've set the RT configuration variable $RT::UnsafeEmailCom‐
24 mands, "take" and "resolve" are also available. You can execute two
25 or more actions on a single message using a "-" separated list. RT
26 will execute the actions in the listed order. For example you can
27 use "take-comment", "correspond-resolve" or "take-comment-resolve"
28 as actions.
29
30 Note that "take" and "resolve" actions ignore message text if used
31 alone. Include a "comment" or "correspond" action if you want RT
32 to record the incoming message.
33
34 The default action is "correspond".
35
36 "--queue"
37 This flag determines which queue this alias should create a ticket
38 in if no ticket identifier is found.
39
40 "--url"
41 This flag tells the mail gateway where it can find your RT server.
42 You should probably use the same URL that users use to log into RT.
43
44 "--extension" OPTIONAL
45 Some MTAs will route mail sent to user-foo@host or user+foo@host to
46 user@host and present "foo" in the environment variable $EXTENSION.
47 By specifying the value "queue" for this parameter, the queue this
48 message should be submitted to will be set to the value of $EXTEN‐
49 SION. By specifying "ticket", $EXTENSION will be interpreted as the
50 id of the ticket this message is related to. "action" will allow
51 the user to specify either "comment" or "correspond" in the address
52 extension.
53
54 "--debug" OPTIONAL
55 Print debugging output to standard error
56
57 "--timeout" OPTIONAL
58 Configure the timeout for posting the message to the web server.
59 The default timeout is 3 minutes (180 seconds).
60
62 The RT mail gateway is the primary mechanism for communicating with RT
63 via email. This program simply directs the email to the RT web server,
64 which handles filing correspondence and sending out any required mail.
65 It is designed to be run as part of the mail delivery process, either
66 called directly by the MTA or "procmail", or in a .forward or equiva‐
67 lent.
68
70 Much of the set up of the mail gateway depends on your MTA and mail
71 routing configuration. However, you will need first of all to create an
72 RT user for the mail gateway and assign it a password; this helps to
73 ensure that mail coming into the web server did originate from the
74 gateway.
75
76 Next, you need to route mail to "rt-mailgate" for the queues you're
77 monitoring. For instance, if you're using /etc/aliases and you have a
78 "bugs" queue, you will want something like this:
79
80 bugs: "⎪/opt/rt3/bin/rt-mailgate --queue bugs --action correspond
81 --url http://rt.mycorp.com/"
82
83 bugs-comment: "⎪/opt/rt3/bin/rt-mailgate --queue bugs --action comment
84 --url http://rt.mycorp.com/"
85
86 Note that you don't have to run your RT server on your mail server, as
87 the mail gateway will happily relay to a different machine.
88
90 By default, the mail gateway will accept mail from anyone. However,
91 there are situations in which you will want to authenticate users
92 before allowing them to communicate with the system. You can do this
93 via a plug-in mechanism in the RT configuration.
94
95 You can set the array @RT::MailPlugins to be a list of plugins. The
96 default plugin, if this is not given, is "Auth::MailFrom" - that is,
97 authentication of the person is done based on the "From" header of the
98 email. If you have additional filters or authentication mechanisms, you
99 can list them here and they will be called in order:
100
101 @RT::MailPlugins = (
102 "Filter::SpamAssassin",
103 "Auth::LDAP",
104 # ...
105 );
106
107 See the documentation for any additional plugins you have.
108
109 You may also put Perl subroutines into the @RT::MailPlugins array, if
110 they behave as described below.
111
113 What's actually going on in the above is that @RT::MailPlugins is a
114 list of Perl modules; RT prepends "RT::Interface::Email::" to the name,
115 to form a package name, and then "use"'s this module. The module is
116 expected to provide a "GetCurrentUser" subroutine, which takes a hash
117 of several parameters:
118
119 Message
120 A "MIME::Entity" object representing the email
121
122 CurrentUser
123 An "RT::CurrentUser" object
124
125 AuthStat
126 The authentication level returned from the previous plugin.
127
128 Ticket [OPTIONAL]
129 The ticket under discussion
130
131 Queue [OPTIONAL]
132 If we don't already have a ticket id, we need to know which
133 queue we're talking about
134
135 Action
136 The action being performed. At the moment, it's one of "comment"
137 or "correspond"
138
139 It returns two values, the new "RT::CurrentUser" object, and the new
140 authentication level. The authentication level can be zero, not
141 allowed to communicate with RT at all, (a "permission denied" error
142 is mailed to the correspondent) or one, which is the normal mode of
143 operation. Additionally, if "-1" is returned, then the processing
144 of the plug-ins stops immediately and the message is ignored.
145
146
147
148perl v5.8.8 2008-03-26 RT-MAILGATE(1)