/usr/share/doc/rt4-doc-html/rt-mailgate.html is in rt4-doc-html 4.0.19-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | <ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#OPTIONS">OPTIONS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#SETUP">SETUP</a></li>
<li><a href="#CUSTOMIZATION">CUSTOMIZATION</a></li>
<li><a href="#WRITING-PLUGINS">WRITING PLUGINS</a></li>
<li><a href="#ENVIRONMENT">ENVIRONMENT</a></li>
</ul>
<h1 id="NAME"><a href="#___top">NAME</a></h1>
<p>rt-mailgate - Mail interface to RT.</p>
<h1 id="SYNOPSIS"><a href="#___top">SYNOPSIS</a></h1>
<pre><code> rt-mailgate --help : this text</code></pre>
<p>Usual invocation (from MTA):</p>
<pre><code> rt-mailgate --action (correspond|comment|...) --queue queuename
--url http://your.rt.server/
[ --debug ]
[ --extension (queue|action|ticket) ]
[ --timeout seconds ]</code></pre>
<h1 id="OPTIONS"><a href="#___top">OPTIONS</a></h1>
<dl>
<dt id="action"><code>--action</code></dt>
<dd>
<p>Specifies what happens to email sent to this alias. The avaliable basic actions are: <code>correspond</code>, <code>comment</code>.</p>
<p>If you've set the RT configuration variable <b><code>UnsafeEmailCommands</code></b>, <code>take</code> and <code>resolve</code> are also available. You can execute two or more actions on a single message using a <code>-</code> separated list. RT will execute the actions in the listed order. For example you can use <code>take-comment</code>, <code>correspond-resolve</code> or <code>take-comment-resolve</code> as actions.</p>
<p>Note that <code>take</code> and <code>resolve</code> actions ignore message text if used alone. Include a <code>comment</code> or <code>correspond</code> action if you want RT to record the incoming message.</p>
<p>The default action is <code>correspond</code>.</p>
</dd>
<dt id="queue"><code>--queue</code></dt>
<dd>
<p>This flag determines which queue this alias should create a ticket in if no ticket identifier is found.</p>
</dd>
<dt id="url"><code>--url</code></dt>
<dd>
<p>This flag tells the mail gateway where it can find your RT server. You should probably use the same URL that users use to log into RT.</p>
<p>If your RT server uses SSL, you will need to install additional Perl libraries. RT will detect and install these dependencies if you pass the <code>--enable-ssl-mailgate</code> flag to configure as documented in RT's README.</p>
<p>If you have a self-signed SSL certificate, you may also need to pass <code>--ca-file</code> or <code>--no-verify-ssl</code>, below.</p>
</dd>
<dt id="ca-file-path"><code>--ca-file</code> <i>path</i></dt>
<dd>
<p>Specifies the path to the public SSL certificate for the certificate authority that should be used to verify the website's SSL certificate. If your webserver uses a self-signed certificate, you should preferentially use this option over <code>--no-verify-ssl</code>, as it will ensure that the self-signed certificate that the mailgate is seeing the <i>right</i> self-signed certificate.</p>
</dd>
<dt id="no-verify-ssl"><code>--no-verify-ssl</code></dt>
<dd>
<p>This flag tells the mail gateway to trust all SSL certificates, regardless of if their hostname matches the certificate, and regardless of CA. This is required if you have a self-signed certificate, or some other certificate which is not traceable back to an certificate your system ultimitely trusts.</p>
<p>Verifying SSL certificates requires <a href="http://metacpan.org/module/LWP::UserAgent">LWP::UserAgent</a> version 6.0 or higher; explicitly passing <code>--verify-ssl</code> on prior versions will error.</p>
</dd>
<dt id="extension-OPTIONAL"><code>--extension</code> OPTIONAL</dt>
<dd>
<p>Some MTAs will route mail sent to user-foo@host or user+foo@host to user@host and present "foo" in the environment variable $EXTENSION. By specifying the value "queue" for this parameter, the queue this message should be submitted to will be set to the value of $EXTENSION. By specifying "ticket", $EXTENSION will be interpreted as the id of the ticket this message is related to. "action" will allow the user to specify either "comment" or "correspond" in the address extension.</p>
</dd>
<dt id="debug-OPTIONAL"><code>--debug</code> OPTIONAL</dt>
<dd>
<p>Print debugging output to standard error</p>
</dd>
<dt id="timeout-OPTIONAL"><code>--timeout</code> OPTIONAL</dt>
<dd>
<p>Configure the timeout for posting the message to the web server. The default timeout is 3 minutes (180 seconds).</p>
</dd>
</dl>
<h1 id="DESCRIPTION"><a href="#___top">DESCRIPTION</a></h1>
<p>The RT mail gateway is the primary mechanism for communicating with RT via email. This program simply directs the email to the RT web server, which handles filing correspondence and sending out any required mail. It is designed to be run as part of the mail delivery process, either called directly by the MTA or <code>procmail</code>, or in a <i>.forward</i> or equivalent.</p>
<h1 id="SETUP"><a href="#___top">SETUP</a></h1>
<p>Much of the set up of the mail gateway depends on your MTA and mail routing configuration. However, you will need first of all to create an RT user for the mail gateway and assign it a password; this helps to ensure that mail coming into the web server did originate from the gateway.</p>
<p>Next, you need to route mail to <code>rt-mailgate</code> for the queues you're monitoring. For instance, if you're using <i>/etc/aliases</i> and you have a "bugs" queue, you will want something like this:</p>
<pre><code> bugs: "|/opt/rt4/bin/rt-mailgate --queue bugs --action correspond
--url http://rt.mycorp.com/"
bugs-comment: "|/opt/rt4/bin/rt-mailgate --queue bugs --action comment
--url http://rt.mycorp.com/"</code></pre>
<p>Note that you don't have to run your RT server on your mail server, as the mail gateway will happily relay to a different machine.</p>
<h1 id="CUSTOMIZATION"><a href="#___top">CUSTOMIZATION</a></h1>
<p>By default, the mail gateway will accept mail from anyone. However, there are situations in which you will want to authenticate users before allowing them to communicate with the system. You can do this via a plug-in mechanism in the RT configuration.</p>
<p>You can set the array <code>@MailPlugins</code> to be a list of plugins. The default plugin, if this is not given, is <code>Auth::MailFrom</code> - that is, authentication of the person is done based on the <code>From</code> header of the email. If you have additional filters or authentication mechanisms, you can list them here and they will be called in order:</p>
<pre><code> Set( @MailPlugins =>
"Filter::SpamAssassin",
"Auth::LDAP",
# ...
);</code></pre>
<p>See the documentation for any additional plugins you have.</p>
<p>You may also put Perl subroutines into the <code>@MailPlugins</code> array, if they behave as described below.</p>
<h1 id="WRITING-PLUGINS"><a href="#___top">WRITING PLUGINS</a></h1>
<p>What's actually going on in the above is that <code>@MailPlugins</code> is a list of Perl modules; RT prepends <code>RT::Interface::Email::</code> to the name, to form a package name, and then <code>use</code>'s this module. The module is expected to provide a <code>GetCurrentUser</code> subroutine, which takes a hash of several parameters:</p>
<dl>
<dt id="Message">Message</dt>
<dd>
<p>A <code>MIME::Entity</code> object representing the email</p>
</dd>
<dt id="CurrentUser">CurrentUser</dt>
<dd>
<p>An <code>RT::CurrentUser</code> object</p>
</dd>
<dt id="AuthStat">AuthStat</dt>
<dd>
<p>The authentication level returned from the previous plugin.</p>
</dd>
<dt id="Ticket-OPTIONAL">Ticket [OPTIONAL]</dt>
<dd>
<p>The ticket under discussion</p>
</dd>
<dt id="Queue-OPTIONAL">Queue [OPTIONAL]</dt>
<dd>
<p>If we don't already have a ticket id, we need to know which queue we're talking about</p>
</dd>
<dt id="Action">Action</dt>
<dd>
<p>The action being performed. At the moment, it's one of "comment" or "correspond"</p>
</dd>
</dl>
<p>It returns two values, the new <code>RT::CurrentUser</code> object, and the new authentication level. The authentication level can be zero, not allowed to communicate with RT at all, (a "permission denied" error is mailed to the correspondent) or one, which is the normal mode of operation. Additionally, if <code>-1</code> is returned, then the processing of the plug-ins stops immediately and the message is ignored.</p>
<h1 id="ENVIRONMENT"><a href="#___top">ENVIRONMENT</a></h1>
<dl>
<dt id="EXTENSION">EXTENSION</dt>
<dd>
<p>Some MTAs will route mail sent to user-foo@host or user+foo@host to user@host and present "foo" in the environment variable <code>EXTENSION</code>. Mailgate adds value of this variable to message in the <code>X-RT-Mail-Extension</code> field of the message header.</p>
<p>See also <code>--extension</code> option. Note that value of the environment variable is always added to the message header when it's not empty even if <code>--extension</code> option is not provided.</p>
</dd>
</dl>
<a href="./">← Back to index</a>
|