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.
$rtname
$rtname
is the string that RT looks for in-mail messages to figure out to which ticket a new piece of mail belongs.
Your domain name is recommended, so as not to pollute the namespace. Once you start using a given tag, you should probably never change it—otherwise, mail for existing tickets won’t get put in the right place.
Set($rtname, "example.com");
$EmailSubjectTagRegex
This regexp controls what subject tags RT recognizes as its own. Be very careful with it. Note that it overrides $rtname
.
If you’re not dealing with historical $rtname
values, you’ll likely never have to enable this feature:
Set($EmailSubjectTagRegex, qr/\Q$rtname\E/);
$Organization
You should set this to your organization’s DNS domain, for example, fsck.com or asylum.arkham.ma.us. The linking interface uses it to guarantee that ticket URIs are unique and easy to construct.
Set($Organization, "example.com");
$MinimumPasswordLength
$MinimumPasswordLength
defines the minimum length for user passwords. Setting it to 0 disables this check.
Set($MinimumPasswordLength, "5");
$Timezone
$Timezone
is used to convert times entered by users into GMT and back again. It should be set to standard Unix timezone.
Set($Timezone, 'US/Eastern');
$DatabaseType
Database driver currently used. The value is case sensitive. Valid types are mysql
, Oracle,
and Pg
.
Set($DatabaseType, 'mysql');
$DatabaseHost
The domain name of your database server. If you’re running MySQL and it’s on localhost, leave it blank for enhanced performance.
Set($DatabaseHost, 'localhost');
$DatabasePort
The port on which your database server runs. RT ignores this value unless it’s a positive integer. It’s usually safe to leave this blank.
Set($DatabasePort, 3306);
$DatabaseUser
The name of the database user (inside the database).
Set($DatabaseUser, 'rt_user');
$DatabasePassword
Password the DatabaseUser should use to access the database.
Set($DatabasePassword, 'p@ssw0rd');
$DatabaseName
The name of the RT’s database on your database server.
Set($DatabaseName, 'rt3');
$DatabaseRequiresSSL
If you’re using Postgres and have compiled in SSL support, set DatabaseRequireSSL to 1 to turn on SSL communication.
Set($DatabaseRequireSSL, undef);
$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 $CanonicalizeEmailAddressReplac
eRT 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\":;");
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);
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.
$LogToSyslog
, $LogToScree
, and $LogToFile
These options define minimum log level that each output mechanism logs. From lowest level to highest, the choices are:
debug
|
info
|
notice
|
warning
|
error
|
critical
|
alert
|
emergency
|
For historical reasons, you must use ''
(empty string) instead of 0 or undef
when disabling a logging mechanism.
Set($LogToSyslog , 'debug'); Set($LogToScreen , 'error'); Set($LogToFile , ''); Set($LogDir, '/home/rspier/projects/rt-3.4/var/log'); Set($LogToFileNamed , "rt.log");
@LogToSyslogConf
If you are using Syslog logging, this directive allows you to override any other options RT passes to Log::Dispatch::Syslog
. See the Log::Dispatch::Syslog
documentation for more information about interesting flags, including facility
, logopt
, and ident
.
On systems such as Solaris or UnixWare that don’t provide a UNIX domain socket to syslog, set this ( socket => 'inet' )
.
@LogToSyslogConf = () unless (@LogToSyslogConf);
$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>'});
@LexiconLanguages
@LexiconLanguages
is an array that contains languages supported by RT’s internationalization interface. It defaults to all supplied translations. Setting it to a shorter list, such as qw(en ja)
, makes RT bilingual instead of multilingual, but it saves some memory.
@LexiconLanguages = qw(*) unless (@LexiconLanguages);
@EmailInputEncodings
@EmailInputEncodings
is an array that contains default encodings used to guess which charset an attachment uses if not specified. These encodings must be recognized by Encode::Guess
.
@EmailInputEncodings = qw(utf-8 iso-8859-1 us-ascii) unless (@EmailInputEncodings);
$EmailOutputEncoding
$EmailOutputEncoding
is the character set for outbound email. Its value must be recognized by Encode
.
Set($EmailOutputEncoding , 'utf-8');
$DateDayBeforeMonth
Set $DateDayBeforeMonth
to 1 if your local date convention looks like dd
/mm
/yy
instead of mm
/dd
/yy
.
Set($DateDayBeforeMonth , 1);
$AmbiguousDayInPast
Should “Tuesday” default to meaning “Next Tuesday” or “Last Tuesday”?
Set to 0 for “Next” or 1 for “Last.”
Set($AmbiguousDayInPast , 1);
@ActiveStatus
and @InactiveStatus
You can define new statuses and even reorder existing statuses here. Warning: do not delete any of the default statuses. If you do, RT breaks horribly.
@ActiveStatus = qw(new open stalled) unless @ActiveStatus; @InactiveStatus = qw(resolved rejected deleted) unless @InactiveStatus;
$Devel Mode
RT comes with a development mode setting. As a convenience for developers, this setting turns on all sorts of development options that you most likely don’t want in production.
It turns off Mason’s static_source
directive. By default, you can’t edit RT’s web interface components on the fly and have RT pick up your changes.
Set($DevelMode, '0');