Appendix E. Configuration File Reference

All of the configuration directives you can use in your etc/RT_SiteConfig.pm file are listed in this appendix.

Remember, never edit RT_Config.pm. Instead, add to RT_SiteConfig.pm and edit there.

$OwnerEmail

OwnerEmail is the address of a human who manages RT. RT sends errors generated by the mail gateway to this address. This address should not be an address that’s managed by your RT instance.

Set($OwnerEmail, 'root');
$LoopsToRTOwner

If $LoopsToRTOwner is defined, RT sends mail that it believes might be a loop to $RT::OwnerEmail.

Set($LoopsToRTOwner, 1);
$StoreLoops

If $StoreLoops is defined, RT records messages that it believes to be part of mail loops. As it does this, it tries to be careful not to send mail to the sender of these messages.

Set($StoreLoops, undef);
$MaxAttachmentSize

$MaxAttachmentSize sets the maximum size (in bytes) of attachments stored in the database.

For MySQL and Oracle, we set this size at 10 megabytes. If you’re running a Postgres version earlier than 7.1, you need to drop this to 8192. (8k)

Set($MaxAttachmentSize, 10000000);
$TruncateLongAttachments

$TruncateLongAttachments: if this is set to a non-undef value, RT truncates attachments longer than MaxAttachmentSize.

Set($TruncateLongAttachments, undef);
$DropLongAttachments

$DropLongAttachments: if this is set to a non-undef value, RT silently drops attachments longer than MaxAttachmentSize.

Set($DropLongAttachments, undef);
$ParseNewMessageForTicketCCs

If $ParseNewMessageForTicketCcs is true, RT attempts to divine ticket Cc watchers from the To and Cc lines of incoming messages. Be forewarned that if you have any addresses that forward mail to RT automatically, and you enable this option without modifying RTAddressRegexp below, you will get yourself into a heap of trouble.

Set($ParseNewMessageForTicketCcs, undef);
$RTAddressRegexp

$RTAddressRegexp makes sure RT doesn’t add itself as a ticket Cc if the setting above is enabled.

Set($RTAddressRegexp, '^rt\@example.com$');
$CanonicalizeEmailAddressMatch and $CanonicalizeEmailAddressReplace

RT provides functionality that allows the system to rewrite incoming email addresses. In its simplest form, you can substitute the value in $CanonicalizeEmailAddressReplace for whatever the value is in $CanonicalizeEmailAddressMatch. These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm. By default, that routine performs a s/ Match/Replace/gi on any address passed to it.

    Set($CanonicalizeEmailAddressMatch, '@subdomain\.example\.com$');
    Set($CanonicalizeEmailAddressReplace, '@example.com');
$CanonicalizeOnCreate

If this is true, the page to create a new user passes the values that you enter in the form through the CanonicalizeUserInfo function in User_Local.pm.

    Set($CanonicalizeOnCreate, 0);
$SenderMustExistInExternalDatabase

If you are using the LookupSenderInExternalDatabase option, and $SenderMustExistInExternalDatabase is true, RT refuses to create non-privileged accounts for unknown users. Instead, RT mails an error message and forwards the message to $RTOwner.

If you are not using $LookupSenderInExternalDatabase, this option has no effect.

If you define an AutoRejectRequest template, RT uses this template for the rejection message.

    Set($SenderMustExistInExternalDatabase, undef);
$CorrespondAddress and $CommentAddress

RT is designed so that any mail that already has a ticket ID associated with it gets to the right place automatically.

$CorrespondAddress and $CommentAddress are the default addresses for From: and Reply-To: headers of correspondence and comment mail tracked by RT, unless overridden by a queue-specific address.

Set($CorrespondAddress, 'correspond@rt.example.com');

Set($CommentAddress, 'comment@rt.example.com');
$MailCommand

$MailCommand defines which method RT uses to try to send mail. We know that sendmailpipe works fairly well. If sendmailpipe doesn’t work well for you, try sendmail.

Note that you should remove the -t from $SendmailArguments if you use sendmail rather than sendmailpipe.

Set($MailCommand, 'sendmailpipe');
$SendmailArguments

$SendmailArguments defines what flags to pass to $Sendmail assuming you picked sendmail or sendmailpipe as the $MailCommand above. If you picked sendmailpipe, you must add a -t flag to $SendmailArguments.

These options are good for most Sendmail wrappers and workalikes:

    Set($SendmailArguments, "-oi -t");

These arguments are good for Sendmail 8 and newer:

    Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m");
$SendmailPath

If you selected this sendmailpipe, you must specify the path to your Sendmail binary in $SendmailPath. If you did not select this sendmailpipe, this has no effect.

    Set($SendmailPath, "/usr/sbin/sendmail");
$UseFriendlyFromLine

By default, RT sets the outgoing mail’s From: header to SenderName via RT. Setting this option to 0 disables it.

    Set($UseFriendlyFromLine, 1);
$FriendlyFromLineFormat

The sprintf() format of the friendly From: header; its arguments are SenderName and SenderEmailAddress.

    Set($FriendlyFromLineFormat, "\"%s via RT\" <%s>");
$UseFriendlyToLine

RT can set an optional friendly To: header when sending messages to Ccs or AdminCcs rather than having a blank To: header.

This feature does not work with Sendmail. If you are using Sendmail, rather than Postfix, qmail, Exim, or some other MTA, you must disable this option.

Set($UseFriendlyToLine, 0);
$FriendlyToLineFormat

sprintf() format of the friendly From: header; its arguments are WatcherType and TicketId.

Set($FriendlyToLineFormat, "\"%s of $RT::rtname Ticket #%s\":;");
$NotifyActor

By default, RT doesn’t notify the person who performs an update, as they already know what they’ve done. If you’d like to change this behavior, set $NotifyActor to 1.

Set($NotifyActor, 0);
$RecordOutgoingEmail

By default, RT records each message it sends out to its own internal database. To change this behavior, set $RecordOutgoingEmail to 0.

Set($RecordOutgoingEmail, 1);

The default configuration logs anything except debugging information to syslog. See the Log::Dispatch documentation for more information about alternate delivery mechanisms.

It may make sense to send error and higher by email to some administrator. If you do this, be careful that this email isn’t sent to back to the current RT instance.

$WebPath

This defines the directory name to be used for images in RT web documents.

If you’ve configured your webserver to have the path to RT somewhere other than at the root of your server, $WebPath requires a leading / (slash) but no trailing /.

    Set($WebPath, "");
$WebBaseURL

This is the scheme, server, and port for constructing URLs to RT. $WebBaseURL doesn’t need a trailing /.

Set($WebBaseURL, "http://RT::WebBaseURL.not.configured:80");
$WebImagesURL

$WebImagesURL points to the base URL where RT can find its images.

Set($WebImagesURL, $WebPath . "/NoAuth/images/");
$LogoURL

$LogoURL points to the URL of the RT logo displayed in the web interface.

Set($LogoURL, $WebImagesURL . "bplogo.gif");
$WebNoAuthRegex

$WebNoAuthRegex matches the portion of RT’s URL space that should not require authentication.

Set($WebNoAuthRegex, qr!^(?:/+NoAuth/|
                           /+REST/\d+\.\d+/NoAuth/)!x );
$MessageBoxWidth

For message boxes, set the entry box width and what type of wrapping to use. Defaults to 72.

Set($MessageBoxWidth, 72);
$MessageBoxWrap

Choose between HARD wrapping and SOFT wrapping. The default is HARD.

Set($MessageBoxWrap, "HARD");
$TrustHTMLAttachments

If $TrustHTMLAttachments is not defined, RT displays attachments as text. This prevents malicious HTML and Javascript from being sent in a request (although there is more to it than that).

Set($TrustHTMLAttachments, undef);
$RedistributeAutoGeneratedMessages

A true value (the default) tells RT to redistribute correspondence that it identifies as machine generated. Setting this to 0 tells RT not to redistribute such messages. You also can set it to privileged, which redistributes only to privileged users. This is useful if you get malformed bounces caused by autocreated requestors with bogus addresses.

Set($RedistributeAutoGeneratedMessages, 1);
$PreferRichText

If $PreferRichText is set to a true value, RT shows HTML/rich text messages in preference to their plain text alternatives. RT scrubs the HTML to show only a minimal subset of HTML to avoid possible contamination by cross-site scripting attacks.

Set($PreferRichText, undef);
$WebExternalAuth

If $WebExternalAuth is defined, RT defers to the environment’s REMOTE_USER variable.

Set($WebExternalAuth, undef);
$WebFallbackToInternalAuth

If $WebFallbackToInternalAuth is undefined, the user is allowed a chance of fallback to the login screen, even if REMOTE_USER failed.

Set($WebFallbackToInternalAuth, undef);
$WebExternalGecos

$WebExternalGecos means to match the gecos field as the user identity; useful with mod_auth_pwcheck and IIS Integrated Windows logon.

Set($WebExternalGecos, undef);
$WebExternalAuto

$WebExternalAuto creates users under the same name as REMOTE_USER upon login, if it’s missing in the Users table.

Set($WebExternalAuto, undef);
$WebSessionClass

$WebSessionClass is the class you wish to use for managing sessions. It defaults to use your SQL database, but if you are using MySQL 3.x and plan to use non-ASCII queue names, add the following line to RT_SiteConfig.pm to prevent session corruption.

Set($WebSessionClass, 'Apache::Session::File');
$WebFlushDbCacheEveryRequest

By default, RT clears its database cache after every page view. This ensures that you’ve always got the most current information when working in a multi-process environment (mod_perl or FastCGI). Setting $WebFlushDbCacheEveryRequest to 0 turns this off, which speeds RT up a bit, at the expense of some data accuracy.

Set($WebFlushDbCacheEveryRequest, '1');
$MaxInlineBody

$MaxInlineBody is the maximum attachment size that RT uses to display inline when viewing a transaction. 13456 is a semi-random but sane default.

Set($MaxInlineBody, 13456);
$MyTicketsLength

$MyTicketsLength is the length of the owned tickets table on the front page. For some people, the default of 10 isn’t big enough to get a feel for how much work needs to be done before you get some time off.

Set($MyTicketsLength, 10);
$MyRequestsLength

$MyRequestsLength is the length of the requested tickets table on the front page.

Set($MyRequestsLength, 10);
@MasonParameters

@MasonParameters is a list of parameters for the constructor of HTML::Mason’s Apache or CGI Handler. This is normally only useful for debugging, for example, profiling individual components with:

use MasonX::Profiler; # available on CPAN
@MasonParameters = (preamble => 'my $p = MasonX::Profiler->new($m, $r);');
 
@MasonParameters = () unless (@MasonParameters);
$DefaultSearchResultFormat

$DefaultSearchResultFormat is the default format for RT search results:

Set ($DefaultSearchResultFormat, qq{
  '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=_ _id_ _">_ _id_ _</a></B>/TITLE:#',
  '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=_ _id_ _">_ _Subject_ _</a></B>/TITLE:Subject',
  Status,
  QueueName,
  OwnerName,
  Priority,
  '_ _NEWLINE_ _',
  '',
  '<small>_ _Requestors_ _</small>',
  '<small>_ _CreatedRelative_ _</small>',
  '<small>_ _ToldRelative_ _</small>',
  '<small>_ _LastUpdatedRelative_ _</small>',
  '<small>_ _TimeLeft_ _</small>'});