498e53c71e16c2c00a94c97035d3df04177ee63b
[freeside.git] / rt / etc / RT_Config.pm.in
1 #
2 # RT was configured with:
3 #
4 #   $ @CONFIGURE_INCANT@
5 #
6
7 package RT;
8
9 #############################  WARNING  #############################
10 #                                                                   #
11 #                     NEVER EDIT RT_Config.pm !                     #
12 #                                                                   #
13 #         Instead, copy any sections you want to change to          #
14 #         RT_SiteConfig.pm and edit them there.  Otherwise,         #
15 #         your changes will be lost when you upgrade RT.            #
16 #                                                                   #
17 #############################  WARNING  #############################
18
19 =head1 NAME
20
21 RT::Config
22
23 =head1 Base configuration
24
25 =over 4
26
27 =item C<$rtname>
28
29 C<$rtname> is the string that RT will look for in mail messages to
30 figure out what ticket a new piece of mail belongs to.
31
32 Your domain name is recommended, so as not to pollute the namespace.
33 Once you start using a given tag, you should probably never change it;
34 otherwise, mail for existing tickets won't get put in the right place.
35
36 =cut
37
38 Set($rtname, "example.com");
39
40 =item C<$Organization>
41
42 You should set this to your organization's DNS domain. For example,
43 I<fsck.com> or I<asylum.arkham.ma.us>. It is used by the linking
44 interface to guarantee that ticket URIs are unique and easy to
45 construct.  Changing it after you have created tickets in the system
46 will B<break> all existing ticket links!
47
48 =cut
49
50 Set($Organization, "example.com");
51
52 =item C<$CorrespondAddress>, C<$CommentAddress>
53
54 RT is designed such that any mail which already has a ticket-id
55 associated with it will get to the right place automatically.
56
57 C<$CorrespondAddress> and C<$CommentAddress> are the default addresses
58 that will be listed in From: and Reply-To: headers of correspondence
59 and comment mail tracked by RT, unless overridden by a queue-specific
60 address.  They should be set to email addresses which have been
61 configured as aliases for F<rt-mailgate>.
62
63 =cut
64
65 Set($CorrespondAddress, '');
66
67 Set($CommentAddress, '');
68
69 =item C<$WebDomain>
70
71 Domain name of the RT server, e.g. 'www.example.com'. It should not
72 contain anything except the server name.
73
74 =cut
75
76 Set($WebDomain, "localhost");
77
78 =item C<$WebPort>
79
80 If we're running as a superuser, run on port 80.  Otherwise, pick a
81 high port for this user.
82
83 443 is default port for https protocol.
84
85 =cut
86
87 Set($WebPort, 80);
88
89 =item C<$WebPath>
90
91 If you're putting the web UI somewhere other than at the root of your
92 server, you should set C<$WebPath> to the path you'll be serving RT
93 at.
94
95 C<$WebPath> requires a leading / but no trailing /, or it can be
96 blank.
97
98 In most cases, you should leave C<$WebPath> set to "" (an empty
99 value).
100
101 =cut
102
103 Set($WebPath, "");
104
105 =item C<$Timezone>
106
107 C<$Timezone> is the default timezone, used to convert times entered by
108 users into GMT, as they are stored in the database, and back again;
109 users can override this.  It should be set to a timezone recognized by
110 your server.
111
112 =cut
113
114 Set($Timezone, "US/Eastern");
115
116 =item C<@Plugins>
117
118 Set C<@Plugins> to a list of external RT plugins that should be
119 enabled (those plugins have to be previously downloaded and
120 installed).
121
122 Example:
123
124 C<Set(@Plugins, (qw(RT::Extension::SLA RT::Authen::ExternalAuth)));>
125
126 =cut
127
128 Set(@Plugins, (qw(RTx::Calendar
129                   RT::Extension::MobileUI))); #RTx::Checklist ));
130
131 =back
132
133
134
135
136 =head1 Database connection
137
138 =over 4
139
140 =item C<$DatabaseType>
141
142 Database driver being used; case matters.  Valid types are "mysql",
143 "Oracle" and "Pg".
144
145 =cut
146
147 Set($DatabaseType, "@DB_TYPE@");
148
149 =item C<$DatabaseHost>, C<$DatabaseRTHost>
150
151 The domain name of your database server.  If you're running MySQL and
152 on localhost, leave it blank for enhanced performance.
153
154 C<DatabaseRTHost> is the fully-qualified hostname of your RT server,
155 for use in granting ACL rights on MySQL.
156
157 =cut
158
159 Set($DatabaseHost,   "@DB_HOST@");
160 Set($DatabaseRTHost, "@DB_RT_HOST@");
161
162 =item C<$DatabasePort>
163
164 The port that your database server is running on.  Ignored unless it's
165 a positive integer. It's usually safe to leave this blank; RT will
166 choose the correct default.
167
168 =cut
169
170 Set($DatabasePort, "@DB_PORT@");
171
172 =item C<$DatabaseUser>
173
174 The name of the user to connect to the database as.
175
176 =cut
177
178 Set($DatabaseUser, "@DB_RT_USER@");
179
180 =item C<$DatabasePassword>
181
182 The password the C<$DatabaseUser> should use to access the database.
183
184 =cut
185
186 Set($DatabasePassword, q{@DB_RT_PASS@});
187
188 =item C<$DatabaseName>
189
190 The name of the RT database on your database server. For Oracle, the
191 SID and database objects are created in C<$DatabaseUser>'s schema.
192
193 =cut
194
195 Set($DatabaseName, q{@DB_DATABASE@});
196
197 =item C<$DatabaseRequireSSL>
198
199 If you're using PostgreSQL and have compiled in SSL support, set
200 C<$DatabaseRequireSSL> to 1 to turn on SSL communication with the
201 database.
202
203 =cut
204
205 Set($DatabaseRequireSSL, undef);
206
207 =back
208
209
210
211
212 =head1 Logging
213
214 The default is to log anything except debugging information to syslog.
215 Check the L<Log::Dispatch> POD for information about how to get things
216 by syslog, mail or anything else, get debugging info in the log, etc.
217
218 It might generally make sense to send error and higher by email to
219 some administrator.  If you do this, be careful that this email isn't
220 sent to this RT instance.  Mail loops will generate a critical log
221 message.
222
223 =over 4
224
225 =item C<$LogToSyslog>, C<$LogToScreen>
226
227 The minimum level error that will be logged to the specific device.
228 From lowest to highest priority, the levels are:
229
230     debug info notice warning error critical alert emergency
231
232 Many syslogds are configured to discard or file debug messages away, so
233 if you're attempting to debug RT you may need to reconfigure your
234 syslogd or use one of the other logging options.
235
236 Logging to your screen affects scripts run from the command line as well
237 as the STDERR sent to your webserver (so these logs will usually show up
238 in your web server's error logs).
239
240 =cut
241
242 Set($LogToSyslog, "info");
243 Set($LogToScreen, "info");
244
245 =item C<$LogToFile>, C<$LogDir>, C<$LogToFileNamed>
246
247 Logging to a standalone file is also possible. The file needs to both
248 exist and be writable by all direct users of the RT API. This generally
249 includes the web server and whoever rt-crontool runs as. Note that
250 rt-mailgate and the RT CLI go through the webserver, so their users do
251 not need to have write permissions to this file. If you expect to have
252 multiple users of the direct API, Best Practical recommends using syslog
253 instead of direct file logging.
254
255 You should set C<$LogToFile> to one of the levels documented above.
256
257 =cut
258
259 Set($LogToFile, undef);
260 Set($LogDir, q{@RT_LOG_PATH@});
261 Set($LogToFileNamed, "rt.log");    #log to rt.log
262
263 =item C<$LogStackTraces>
264
265 If set to a log level then logging will include stack traces for
266 messages with level equal to or greater than specified.
267
268 NOTICE: Stack traces include parameters supplied to functions or
269 methods. It is possible for stack trace logging to reveal sensitive
270 information such as passwords or ticket content in your logs.
271
272 =cut
273
274 Set($LogStackTraces, "");
275
276 =item C<@LogToSyslogConf>
277
278 On Solaris or UnixWare, set to ( socket => 'inet' ).  Options here
279 override any other options RT passes to L<Log::Dispatch::Syslog>.
280 Other interesting flags include facility and logopt.  (See the
281 L<Log::Dispatch::Syslog> documentation for more information.)  (Maybe
282 ident too, if you have multiple RT installations.)
283
284 =cut
285
286 Set(@LogToSyslogConf, ());
287
288 =back
289
290
291
292 =head1 Incoming mail gateway
293
294 =over 4
295
296 =item C<$EmailSubjectTagRegex>
297
298 This regexp controls what subject tags RT recognizes as its own.  If
299 you're not dealing with historical C<$rtname> values, or historical
300 queue-specific subject tags, you'll likely never have to change this
301 configuration.
302
303 Be B<very careful> with it. Note that it overrides C<$rtname> for
304 subject token matching and that you should use only "non-capturing"
305 parenthesis grouping. For example:
306
307 C<Set($EmailSubjectTagRegex, qr/(?:example.com|example.org)/i );>
308
309 and NOT
310
311 C<Set($EmailSubjectTagRegex, qr/(example.com|example.org)/i );>
312
313 The setting below would make RT behave exactly as it does without the
314 setting enabled.
315
316 =cut
317
318 # Set($EmailSubjectTagRegex, qr/\Q$rtname\E/i );
319
320 =item C<$OwnerEmail>
321
322 C<$OwnerEmail> is the address of a human who manages RT. RT will send
323 errors generated by the mail gateway to this address.  This address
324 should I<not> be an address that's managed by your RT instance.
325
326 =cut
327
328 Set($OwnerEmail, 'root');
329
330 =item C<$LoopsToRTOwner>
331
332 If C<$LoopsToRTOwner> is defined, RT will send mail that it believes
333 might be a loop to C<$OwnerEmail>.
334
335 =cut
336
337 Set($LoopsToRTOwner, 1);
338
339 =item C<$StoreLoops>
340
341 If C<$StoreLoops> is defined, RT will record messages that it believes
342 to be part of mail loops.  As it does this, it will try to be careful
343 not to send mail to the sender of these messages.
344
345 =cut
346
347 Set($StoreLoops, undef);
348
349 =item C<$MaxAttachmentSize>
350
351 C<$MaxAttachmentSize> sets the maximum size (in bytes) of attachments
352 stored in the database.  This setting is irrelevant unless one of
353 $TruncateLongAttachments or $DropLongAttachments (below) are set.
354
355 =cut
356
357 Set($MaxAttachmentSize, 10_000_000);
358
359 =item C<$TruncateLongAttachments>
360
361 If this is set to a non-undef value, RT will truncate attachments
362 longer than C<$MaxAttachmentSize>.
363
364 =cut
365
366 Set($TruncateLongAttachments, undef);
367
368 =item C<$DropLongAttachments>
369
370 If this is set to a non-undef value, RT will silently drop attachments
371 longer than C<MaxAttachmentSize>.  C<$TruncateLongAttachments>, above,
372 takes priority over this.
373
374 =cut
375
376 Set($DropLongAttachments, undef);
377
378 =item C<$RTAddressRegexp>
379
380 C<$RTAddressRegexp> is used to make sure RT doesn't add itself as a
381 ticket CC if C<$ParseNewMessageForTicketCcs>, above, is enabled.  It
382 is important that you set this to a regular expression that matches
383 all addresses used by your RT.  This lets RT avoid sending mail to
384 itself.  It will also hide RT addresses from the list of "One-time Cc"
385 and Bcc lists on ticket reply.
386
387 If you have a number of addresses configured in your RT database
388 already, you can generate a naive first pass regexp by using:
389
390     perl etc/upgrade/generate-rtaddressregexp
391
392 If left blank, RT will compare each address to your configured
393 C<$CorrespondAddress> and C<$CommentAddress> before searching for a
394 Queue configured with a matching "Reply Address" or "Comment Address"
395 on the Queue Admin page.
396
397 =cut
398
399 Set($RTAddressRegexp, undef);
400
401 =item C<$IgnoreCcRegexp>
402
403 C<$IgnoreCcRegexp> is a regexp to exclude addresses from automatic addition 
404 to the Cc list.  Use this for addresses that are I<not> received by RT but
405 are sometimes added to Cc lists by mistake.  Unlike C<$RTAddressRegexp>, 
406 these addresses can still receive email from RT otherwise.
407
408 =cut
409
410 Set($IgnoreCcRegexp, undef);
411
412 =item C<$CanonicalizeEmailAddressMatch>, C<$CanonicalizeEmailAddressReplace>
413
414 RT provides functionality which allows the system to rewrite incoming
415 email addresses.  In its simplest form, you can substitute the value
416 in C<CanonicalizeEmailAddressReplace> for the value in
417 C<CanonicalizeEmailAddressMatch> (These values are passed to the
418 C<CanonicalizeEmailAddress> subroutine in F<RT/User.pm>)
419
420 By default, that routine performs a C<s/$Match/$Replace/gi> on any
421 address passed to it.
422
423 =cut
424
425 # Set($CanonicalizeEmailAddressMatch, '@subdomain\.example\.com$');
426 # Set($CanonicalizeEmailAddressReplace, '@example.com');
427
428 =item C<$CanonicalizeOnCreate>
429
430 Set this to 1 and the create new user page will use the values that
431 you enter in the form but use the function CanonicalizeUserInfo in
432 F<RT/User_Local.pm>
433
434 =cut
435
436 Set($CanonicalizeOnCreate, 0);
437
438 =item C<$ValidateUserEmailAddresses>
439
440 If C<$ValidateUserEmailAddresses> is 1, RT will refuse to create
441 users with an invalid email address (as specified in RFC 2822) or with
442 an email address made of multiple email addresses.
443
444 =cut
445
446 Set($ValidateUserEmailAddresses, undef);
447
448 =item C<$NonCustomerEmailRegexp>
449
450 Normally, when a ticket is linked to a customer, any requestors on that
451 ticket that didn't previously have customer memberships are linked to 
452 the customer also.  C<$NonCustomerEmailRegexp> is a regexp for email 
453 addresses that should I<not> automatically be linked to a customer in 
454 this way.
455
456 =cut
457
458 Set($NonCustomerEmailRegexp, undef);
459
460 =item C<@MailPlugins>
461
462 C<@MailPlugins> is a list of authentication plugins for
463 L<RT::Interface::Email> to use; see L<rt-mailgate>
464
465 =cut
466
467 =item C<$UnsafeEmailCommands>
468
469 C<$UnsafeEmailCommands>, if set to 1, enables 'take' and 'resolve'
470 as possible actions via the mail gateway.  As its name implies, this
471 is very unsafe, as it allows email with a forged sender to possibly
472 resolve arbitrary tickets!
473
474 =cut
475
476 =item C<$ExtractSubjectTagMatch>, C<$ExtractSubjectTagNoMatch>
477
478 The default "extract remote tracking tags" scrip settings; these
479 detect when your RT is talking to another RT, and adjust the subject
480 accordingly.
481
482 =cut
483
484 Set($ExtractSubjectTagMatch, qr/\[[^\]]+? #\d+\]/);
485 Set($ExtractSubjectTagNoMatch, ( ${RT::EmailSubjectTagRegex}
486        ? qr/\[(?:${RT::EmailSubjectTagRegex}) #\d+\]/
487        : qr/\[\Q$RT::rtname\E #\d+\]/));
488
489 =item C<$CheckMoreMSMailHeaders>
490
491 Some email clients create a plain text version of HTML-formatted
492 email to help other clients that read only plain text.
493 Unfortunately, the plain text parts sometimes end up with
494 doubled newlines and these can then end up in RT. This
495 is most often seen in MS Outlook.
496
497 Enable this option to have RT check for additional mail headers
498 and attempt to identify email from MS Outlook. When detected,
499 RT will then clean up double newlines. Note that it may
500 clean up intentional double newlines as well.
501
502 =cut
503
504 Set( $CheckMoreMSMailHeaders, 0);
505
506 =back
507
508
509
510 =head1 Outgoing mail
511
512 =over 4
513
514 =item C<$MailCommand>
515
516 C<$MailCommand> defines which method RT will use to try to send mail.
517 We know that 'sendmailpipe' works fairly well.  If 'sendmailpipe'
518 doesn't work well for you, try 'sendmail'.  Other options are 'smtp'
519 or 'qmail'.
520
521 Note that you should remove the '-t' from C<$SendmailArguments> if you
522 use 'sendmail' rather than 'sendmailpipe'
523
524 For testing purposes, or to simply disable sending mail out into the
525 world, you can set C<$MailCommand> to 'testfile' which writes all mail
526 to a temporary file.  RT will log the location of the temporary file
527 so you can extract mail from it afterward.
528
529 On shutdown, RT will clean up the temporary file created when using
530 the 'testfile' option. If testing while the RT server is still running,
531 you can find the files in the location noted in the log file. If you run
532 a tool like C<rt-crontool> however, or if you look after stopping the server,
533 the files will have been deleted when the process completed. If you need to
534 keep the files for development or debugging, you can manually set
535 C<< UNLINK => 0 >> where the testfile config is processed in
536 F<lib/RT/Interface/Email.pm>.
537
538 =cut
539
540 #Set($MailCommand, "sendmailpipe");
541 Set($MailCommand, "sendmail");
542
543 =item C<$SetOutgoingMailFrom>
544
545 C<$SetOutgoingMailFrom> tells RT to set the sender envelope to the
546 Correspond mail address of the ticket's queue.
547
548 Warning: If you use this setting, bounced mails will appear to be
549 incoming mail to the system, thus creating new tickets.
550
551 If the value contains an C<@>, it is assumed to be an email address and used as
552 a global envelope sender.  Expected usage in this case is to simply set the
553 same envelope sender on all mail from RT, without defining
554 C<$OverrideOutgoingMailFrom>.  If you do define C<$OverrideOutgoingMailFrom>,
555 anything specified there overrides the global value (including Default).
556
557 This option only works if C<$MailCommand> is set to 'sendmailpipe'.
558
559 =cut
560
561 Set($SetOutgoingMailFrom, 0);
562
563 =item C<$OverrideOutgoingMailFrom>
564
565 C<$OverrideOutgoingMailFrom> is used for overwriting the Correspond
566 address of the queue as it is handed to sendmail -f. This helps force
567 the From_ header away from www-data or other email addresses that show
568 up in the "Sent by" line in Outlook.
569
570 The option is a hash reference of queue name to email address.  If
571 there is no ticket involved, then the value of the C<Default> key will
572 be used.
573
574 This option only works if C<$SetOutgoingMailFrom> is enabled and
575 C<$MailCommand> is set to 'sendmailpipe'.
576
577 =cut
578
579 Set($OverrideOutgoingMailFrom, {
580 #    'Default' => 'admin@rt.example.com',
581 #    'General' => 'general@rt.example.com',
582 });
583
584 =item C<$DefaultMailPrecedence>
585
586 C<$DefaultMailPrecedence> is used to control the default Precedence
587 level of outgoing mail where none is specified.  By default it is
588 C<bulk>, but if you only send mail to your staff, you may wish to
589 change it.
590
591 Note that you can set the precedence of individual templates by
592 including an explicit Precedence header.
593
594 If you set this value to C<undef> then we do not set a default
595 Precedence header to outgoing mail. However, if there already is a
596 Precedence header, it will be preserved.
597
598 =cut
599
600 Set($DefaultMailPrecedence, "bulk");
601
602 =item C<$DefaultErrorMailPrecedence>
603
604 C<$DefaultErrorMailPrecedence> is used to control the default
605 Precedence level of outgoing mail that indicates some kind of error
606 condition. By default it is C<bulk>, but if you only send mail to your
607 staff, you may wish to change it.
608
609 If you set this value to C<undef> then we do not add a Precedence
610 header to error mail.
611
612 =cut
613
614 Set($DefaultErrorMailPrecedence, "bulk");
615
616 =item C<$UseOriginatorHeader>
617
618 C<$UseOriginatorHeader> is used to control the insertion of an
619 RT-Originator Header in every outgoing mail, containing the mail
620 address of the transaction creator.
621
622 =cut
623
624 Set($UseOriginatorHeader, 1);
625
626 =item C<$UseFriendlyFromLine>
627
628 By default, RT sets the outgoing mail's "From:" header to "SenderName
629 via RT".  Setting C<$UseFriendlyFromLine> to 0 disables it.
630
631 =cut
632
633 Set($UseFriendlyFromLine, 1);
634
635 =item C<$FriendlyFromLineFormat>
636
637 C<sprintf()> format of the friendly 'From:' header; its arguments are
638 SenderName and SenderEmailAddress.
639
640 =cut
641
642 Set($FriendlyFromLineFormat, "\"%s via RT\" <%s>");
643
644 =item C<$UseFriendlyToLine>
645
646 RT can optionally set a "Friendly" 'To:' header when sending messages
647 to Ccs or AdminCcs (rather than having a blank 'To:' header.
648
649 This feature DOES NOT WORK WITH SENDMAIL[tm] BRAND SENDMAIL.  If you
650 are using sendmail, rather than postfix, qmail, exim or some other
651 MTA, you _must_ disable this option.
652
653 =cut
654
655 Set($UseFriendlyToLine, 0);
656
657 =item C<$FriendlyToLineFormat>
658
659 C<sprintf()> format of the friendly 'To:' header; its arguments are
660 WatcherType and TicketId.
661
662 =cut
663
664 Set($FriendlyToLineFormat, "\"%s of ". RT->Config->Get('rtname') ." Ticket #%s\":;");
665
666 =item C<$NotifyActor>
667
668 By default, RT doesn't notify the person who performs an update, as
669 they already know what they've done. If you'd like to change this
670 behavior, Set C<$NotifyActor> to 1
671
672 =cut
673
674 Set($NotifyActor, 0);
675
676 =item C<$RecordOutgoingEmail>
677
678 By default, RT records each message it sends out to its own internal
679 database.  To change this behavior, set C<$RecordOutgoingEmail> to 0
680
681 If this is disabled, users' digest mail delivery preferences
682 (i.e. EmailFrequency) will also be ignored.
683
684 =cut
685
686 Set($RecordOutgoingEmail, 1);
687
688 =item C<$VERPPrefix>, C<$VERPDomain>
689
690 Setting these options enables VERP support
691 L<http://cr.yp.to/proto/verp.txt>.
692
693 Uncomment the following two directives to generate envelope senders
694 of the form C<${VERPPrefix}${originaladdress}@${VERPDomain}>
695 (i.e. rt-jesse=fsck.com@rt.example.com ).
696
697 This currently only works with sendmail and sendmailpipe.
698
699 =cut
700
701 # Set($VERPPrefix, "rt-");
702 # Set($VERPDomain, $RT::Organization);
703
704
705 =item C<$ForwardFromUser>
706
707 By default, RT forwards a message using queue's address and adds RT's
708 tag into subject of the outgoing message, so recipients' replies go
709 into RT as correspondents.
710
711 To change this behavior, set C<$ForwardFromUser> to 1 and RT
712 will use the address of the current user and remove RT's subject tag.
713
714 =cut
715
716 Set($ForwardFromUser, 0);
717
718 =back
719
720 =head2 Email dashboards
721
722 =over 4
723
724 =item C<$DashboardAddress>
725
726 The email address from which RT will send dashboards. If none is set,
727 then C<$OwnerEmail> will be used.
728
729 =cut
730
731 Set($DashboardAddress, '');
732
733 =item C<$DashboardSubject>
734
735 Lets you set the subject of dashboards. Arguments are the frequency (Daily,
736 Weekly, Monthly) of the dashboard and the dashboard's name.
737
738 =cut
739
740 Set($DashboardSubject, "%s Dashboard: %s");
741
742 =item C<@EmailDashboardRemove>
743
744 A list of regular expressions that will be used to remove content from
745 mailed dashboards.
746
747 =cut
748
749 Set(@EmailDashboardRemove, ());
750
751 =back
752
753
754
755 =head2 Sendmail configuration
756
757 These options only take effect if C<$MailCommand> is 'sendmail' or
758 'sendmailpipe'
759
760 =over 4
761
762 =item C<$SendmailArguments>
763
764 C<$SendmailArguments> defines what flags to pass to C<$SendmailPath>
765 If you picked 'sendmailpipe', you MUST add a -t flag to
766 C<$SendmailArguments> These options are good for most sendmail
767 wrappers and work-a-likes.
768
769 These arguments are good for sendmail brand sendmail 8 and newer:
770 C<Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m");>
771
772 =cut
773
774 #Set($SendmailArguments, "-oi -t");
775 Set($SendmailArguments, "-oi");
776
777
778 =item C<$SendmailBounceArguments>
779
780 C<$SendmailBounceArguments> defines what flags to pass to C<$Sendmail>
781 assuming RT needs to send an error (i.e. bounce).
782
783 =cut
784
785 Set($SendmailBounceArguments, '-f "<>"');
786
787 =item C<$SendmailPath>
788
789 If you selected 'sendmailpipe' above, you MUST specify the path to
790 your sendmail binary in C<$SendmailPath>.
791
792 =cut
793
794 Set($SendmailPath, "/usr/sbin/sendmail");
795
796
797 =back
798
799 =head2 SMTP configuration
800
801 These options only take effect if C<$MailCommand> is 'smtp'
802
803 =over 4
804
805 =item C<$SMTPServer>
806
807 C<$SMTPServer> should be set to the hostname of the SMTP server to use
808
809 =cut
810
811 Set($SMTPServer, undef);
812
813 =item C<$SMTPFrom>
814
815 C<$SMTPFrom> should be set to the 'From' address to use, if not the
816 email's 'From'
817
818 =cut
819
820 Set($SMTPFrom, undef);
821
822 =item C<$SMTPDebug>
823
824 C<$SMTPDebug> should be set to 1 to debug SMTP mail sending
825
826 =cut
827
828 Set($SMTPDebug, 0);
829
830 =back
831
832 =head2 Other mailers
833
834 =over 4
835
836 =item C<@MailParams>
837
838 C<@MailParams> defines a list of options passed to $MailCommand if it
839 is not 'sendmailpipe', 'sendmail', or 'smtp'
840
841 =cut
842
843 Set(@MailParams, ());
844
845 =back
846
847
848 =head1 Web interface
849
850 =over 4
851
852 =item C<$WebDefaultStylesheet>
853
854 This determines the default stylesheet the RT web interface will use.
855 RT ships with several themes by default:
856
857   web2            The default layout for RT 3.8
858   aileron         The default layout for RT 4.0
859   ballard         Theme which doesn't rely on JavaScript for menuing
860
861 This bundled distibution of RT also includes:
862   freeside3       Integration with Freeside (enabled by default)
863   freeside2.1     Previous Freeside theme
864
865 This value actually specifies a directory in F<share/html/NoAuth/css/>
866 from which RT will try to load the file main.css (which should @import
867 any other files the stylesheet needs).  This allows you to easily and
868 cleanly create your own stylesheets to apply to RT.  This option can
869 be overridden by users in their preferences.
870
871 =cut
872
873 Set($WebDefaultStylesheet, "freeside3");
874
875 =item C<$DefaultQueue>
876
877 Use this to select the default queue name that will be used for
878 creating new tickets. You may use either the queue's name or its
879 ID. This only affects the queue selection boxes on the web interface.
880
881 =cut
882
883 # Set($DefaultQueue, "General");
884
885 =item C<$RememberDefaultQueue>
886
887 When a queue is selected in the new ticket dropdown, make it the new
888 default for the new ticket dropdown.
889
890 =cut
891
892 # Set($RememberDefaultQueue, 1);
893
894 =item C<$EnableReminders>
895
896 Hide all links and portlets related to Reminders by setting this to 0
897
898 =cut
899
900 Set($EnableReminders, 1);
901
902 =item C<@CustomFieldValuesSources>
903
904 Set C<@CustomFieldValuesSources> to a list of class names which extend
905 L<RT::CustomFieldValues::External>.  This can be used to pull lists of
906 custom field values from external sources at runtime.
907
908 =cut
909
910 Set(@CustomFieldValuesSources, ('RT::CustomFieldValues::Queues'));
911
912 =item C<$CanonicalizeRedirectURLs>
913
914 Set C<$CanonicalizeRedirectURLs> to 1 to use C<$WebURL> when
915 redirecting rather than the one we get from C<%ENV>.
916
917 Apache's UseCanonicalName directive changes the hostname that RT
918 finds in C<%ENV>.  You can read more about what turning it On or Off
919 means in the documentation for your version of Apache.
920
921 If you use RT behind a reverse proxy, you almost certainly want to
922 enable this option.
923
924 =cut
925
926 Set($CanonicalizeRedirectURLs, 0);
927
928 =item C<@JSFiles>
929
930 A list of JavaScript files to be included in head.  Removing any of
931 the default entries is not suggested.
932
933 If you're a plugin author, refer to RT->AddJavaScript.
934
935 =cut
936
937 Set(@JSFiles, qw/
938     jquery-1.4.2.min.js
939     jquery_noconflict.js
940     jquery-ui-1.8.4.custom.min.js
941     jquery-ui-timepicker-addon.js
942     jquery-ui-patch-datepicker.js
943     jquery.cookie.js
944     titlebox-state.js
945     util.js
946     userautocomplete.js
947     jquery.event.hover-1.0.js
948     superfish.js
949     supersubs.js
950     jquery.supposition.js
951     history-folding.js
952     late.js
953 /);
954
955 =item C<$JSMinPath>
956
957 Path to the jsmin binary; if specified, it will be used to minify
958 C<JSFiles>.  The default, and the fallback if the binary cannot be
959 found, is to simply concatenate the files.
960
961 jsmin can be installed by running 'make jsmin' from the RT install
962 directory, or from http://www.crockford.com/javascript/jsmin.html
963
964 =cut
965
966 # Set($JSMinPath, "/path/to/jsmin");
967
968 =item C<@CSSFiles>
969
970 A list of additional CSS files to be included in head.
971
972 If you're a plugin author, refer to RT->AddStyleSheets.
973
974 =cut
975
976 Set(@CSSFiles, qw//);
977
978 =item C<$UsernameFormat>
979
980 This determines how user info is displayed. 'concise' will show one of
981 either NickName, RealName, Name or EmailAddress, depending on what
982 exists and whether the user is privileged or not. 'verbose' will show
983 RealName and EmailAddress.
984
985 =cut
986
987 Set($UsernameFormat, "verbose");
988
989 =item C<$WebBaseURL>, C<$WebURL>
990
991 Usually you don't want to set these options. The only obvious reason
992 is if RT is accessible via https protocol on a non standard port, e.g.
993 'https://rt.example.com:9999'. In all other cases these options are
994 computed using C<$WebDomain>, C<$WebPort> and C<$WebPath>.
995
996 C<$WebBaseURL> is the scheme, server and port
997 (e.g. 'http://rt.example.com') for constructing URLs to the web
998 UI. C<$WebBaseURL> doesn't need a trailing /.
999
1000 C<$WebURL> is the C<$WebBaseURL>, C<$WebPath> and trailing /, for
1001 example: 'http://www.example.com/rt/'.
1002
1003 =cut
1004
1005 my $port = RT->Config->Get('WebPort');
1006 Set($WebBaseURL,
1007     ($port == 443? 'https': 'http') .'://'
1008     . RT->Config->Get('WebDomain')
1009     . ($port != 80 && $port != 443? ":$port" : '')
1010 );
1011
1012 Set($WebURL, RT->Config->Get('WebBaseURL') . RT->Config->Get('WebPath') . "/");
1013
1014 =item C<$WebImagesURL>
1015
1016 C<$WebImagesURL> points to the base URL where RT can find its images.
1017 Define the directory name to be used for images in RT web documents.
1018
1019 =cut
1020
1021 Set($WebImagesURL, RT->Config->Get('WebPath') . "/NoAuth/images/");
1022
1023 =item C<$LogoURL>
1024
1025 C<$LogoURL> points to the URL of the RT logo displayed in the web UI.
1026 This can also be configured via the web UI.
1027
1028 =cut
1029
1030 Set($LogoURL, RT->Config->Get('WebImagesURL') . "bpslogo.png");
1031
1032 =item C<$LogoLinkURL>
1033
1034 C<$LogoLinkURL> is the URL that the RT logo hyperlinks to.
1035
1036 =cut
1037
1038 Set($LogoLinkURL, "http://bestpractical.com");
1039
1040 =item C<$LogoAltText>
1041
1042 C<$LogoAltText> is a string of text for the alt-text of the logo. It
1043 will be passed through C<loc> for localization.
1044
1045 =cut
1046
1047 Set($LogoAltText, "Best Practical Solutions, LLC corporate logo");
1048
1049 =item C<$LogoImageHeight>
1050
1051 C<$LogoImageHeight> is the value of the C<height> attribute of the logo
1052 C<img> tag.
1053
1054 =cut
1055
1056 Set($LogoImageHeight, 38);
1057
1058 =item C<$LogoImageWidth>
1059
1060 C<$LogoImageWidth> is the value of the C<width> attribute of the logo
1061 C<img> tag.
1062
1063 =cut
1064
1065 Set($LogoImageWidth, 181);
1066
1067 =item C<$WebNoAuthRegex>
1068
1069 What portion of RT's URL space should not require authentication.  The
1070 default is almost certainly correct, and should only be changed if you
1071 are extending RT.
1072
1073 =cut
1074
1075 Set($WebNoAuthRegex, qr{^ /rt (?:/+NoAuth/ | /+REST/\d+\.\d+/NoAuth/) }x );
1076
1077 =item C<$SelfServiceRegex>
1078
1079 What portion of RT's URLspace should be accessible to Unprivileged
1080 users This does not override the redirect from F</Ticket/Display.html>
1081 to F</SelfService/Display.html> when Unprivileged users attempt to
1082 access ticked displays.
1083
1084 =cut
1085
1086 Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
1087
1088 =item C<$WebFlushDbCacheEveryRequest>
1089
1090 By default, RT clears its database cache after every page view.  This
1091 ensures that you've always got the most current information when
1092 working in a multi-process (mod_perl or FastCGI) Environment.  Setting
1093 C<$WebFlushDbCacheEveryRequest> to 0 will turn this off, which will
1094 speed RT up a bit, at the expense of a tiny bit of data accuracy.
1095
1096 =cut
1097
1098 Set($WebFlushDbCacheEveryRequest, 1);
1099
1100 =item C<%ChartFont>
1101
1102 The L<GD> module (which RT uses for graphs) ships with a built-in font
1103 that doesn't have full Unicode support. You can use a given TrueType
1104 font for a specific language by setting %ChartFont to (language =E<gt>
1105 the absolute path of a font) pairs. Your GD library must have support
1106 for TrueType fonts to use this option. If there is no entry for a
1107 language in the hash then font with 'others' key is used.
1108
1109 RT comes with two TrueType fonts covering most available languages.
1110
1111 =cut
1112
1113 Set(
1114     %ChartFont,
1115     'zh-cn'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
1116     'zh-tw'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
1117     'ja'     => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
1118     'others' => "$RT::BasePath/share/fonts/DroidSans.ttf",
1119 );
1120
1121 =item C<$ChartsTimezonesInDB>
1122
1123 RT stores dates using the UTC timezone in the DB, so charts grouped by
1124 dates and time are not representative. Set C<$ChartsTimezonesInDB> to 1
1125 to enable timezone conversions using your DB's capabilities. You may
1126 need to do some work on the DB side to use this feature, read more in
1127 F<docs/customizing/timezones_in_charts.pod>.
1128
1129 At this time, this feature only applies to MySQL and PostgreSQL.
1130
1131 =cut
1132
1133 Set($ChartsTimezonesInDB, 0);
1134
1135 =back
1136
1137
1138
1139 =head2 Home page
1140
1141 =over 4
1142
1143 =item C<$DefaultSummaryRows>
1144
1145 C<$DefaultSummaryRows> is default number of rows displayed in for
1146 search results on the front page.
1147
1148 =cut
1149
1150 Set($DefaultSummaryRows, 10);
1151
1152 =item C<$HomePageRefreshInterval>
1153
1154 C<$HomePageRefreshInterval> is default number of seconds to refresh
1155 the RT home page. Choose from [0, 120, 300, 600, 1200, 3600, 7200].
1156
1157 =cut
1158
1159 Set($HomePageRefreshInterval, 0);
1160
1161 =item C<$HomepageComponents>
1162
1163 C<$HomepageComponents> is an arrayref of allowed components on a
1164 user's customized homepage ("RT at a glance").
1165
1166 =cut
1167
1168 Set(
1169     $HomepageComponents,
1170     [
1171         qw(QuickCreate Quicksearch MyCalendar MyAdminQueues MySupportQueues MyReminders RefreshHomepage Dashboards SavedSearches ) # loc_qw
1172     ]
1173 );
1174
1175 =back
1176
1177
1178
1179
1180 =head2 Ticket search
1181
1182 =over 4
1183
1184 =item C<$UseSQLForACLChecks>
1185
1186 Historically, ACLs were checked on display, which could lead to empty
1187 search pages and wrong ticket counts.  Set C<$UseSQLForACLChecks> to 1
1188 to limit search results in SQL instead, which eliminates these
1189 problems.
1190
1191 This option is still relatively new; it may result in performance
1192 problems in some cases, or significant speedups in others.
1193
1194 =cut
1195
1196 Set($UseSQLForACLChecks, undef);
1197
1198 =item C<$TicketsItemMapSize>
1199
1200 On the display page of a ticket from search results, RT provides links
1201 to the first, next, previous and last ticket from the results.  In
1202 order to build these links, RT needs to fetch the full result set from
1203 the database, which can be resource-intensive.
1204
1205 Set C<$TicketsItemMapSize> to number of tickets you want RT to examine
1206 to build these links. If the full result set is larger than this
1207 number, RT will omit the "last" link in the menu.  Set this to zero to
1208 always examine all results.
1209
1210 =cut
1211
1212 Set($TicketsItemMapSize, 1000);
1213
1214 =item C<$SearchResultsRefreshInterval>
1215
1216 C<$SearchResultsRefreshInterval> is default number of seconds to
1217 refresh search results in RT. Choose from [0, 120, 300, 600, 1200,
1218 3600, 7200].
1219
1220 =cut
1221
1222 Set($SearchResultsRefreshInterval, 0);
1223
1224 =item C<$DefaultSearchResultFormat>
1225
1226 C<$DefaultSearchResultFormat> is the default format for RT search
1227 results
1228
1229 =cut
1230
1231 Set ($DefaultSearchResultFormat, qq{
1232    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
1233    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
1234    Customer,
1235    Status,
1236    QueueName,
1237    OwnerName,
1238    Priority,
1239    '__NEWLINE__',
1240    '__NBSP__',
1241    '<small>__Requestors__</small>',
1242    '<small>__CustomerTags__</small>',
1243    '<small>__CreatedRelative__</small>',
1244    '<small>__ToldRelative__</small>',
1245    '<small>__LastUpdatedRelative__</small>',
1246    '<small>__TimeLeft__</small>'});
1247
1248 =item C<$DefaultSelfServiceSearchResultFormat>
1249
1250 C<$DefaultSelfServiceSearchResultFormat> is the default format of
1251 searches displayed in the SelfService interface.
1252
1253 =cut
1254
1255 Set($DefaultSelfServiceSearchResultFormat, qq{
1256    '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
1257    '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
1258    Status,
1259    Requestors,
1260    OwnerName});
1261
1262 =item C<%FullTextSearch>
1263
1264 Full text search (FTS) without database indexing is a very slow
1265 operation, and is thus disabled by default.
1266
1267 Before setting C<Indexed> to 1, read F<docs/full_text_indexing.pod> for
1268 the full details of FTS on your particular database.
1269
1270 It is possible to enable FTS without database indexing support, simply
1271 by setting the C<Enable> key to 1, while leaving C<Indexed> set to 0.
1272 This is not generally suggested, as unindexed full-text searching can
1273 cause severe performance problems.
1274
1275 =cut
1276
1277 Set(%FullTextSearch,
1278     Enable  => 0,
1279     Indexed => 0,
1280 );
1281
1282 =item C<$DontSearchFileAttachments>
1283
1284 If C<$DontSearchFileAttachments> is set to 1, then uploaded files
1285 (attachments with file names) are not searched during content
1286 search.
1287
1288 Note that if you use indexed FTS then named attachments are still
1289 indexed by default regardless of this option.
1290
1291 =cut
1292
1293 Set($DontSearchFileAttachments, undef);
1294
1295 =item C<$OnlySearchActiveTicketsInSimpleSearch>
1296
1297 When query in simple search doesn't have status info, use this to only
1298 search active ones.
1299
1300 =cut
1301
1302 Set($OnlySearchActiveTicketsInSimpleSearch, 1);
1303
1304 =item C<$SearchResultsAutoRedirect>
1305
1306 When only one ticket is found in search, use this to redirect to the
1307 ticket display page automatically.
1308
1309 =cut
1310
1311 Set($SearchResultsAutoRedirect, 0);
1312
1313 =back
1314
1315
1316
1317 =head2 Ticket display
1318
1319 =over 4
1320
1321 =item C<$ShowMoreAboutPrivilegedUsers>
1322
1323 This determines if the 'More about requestor' box on
1324 Ticket/Display.html is shown for Privileged Users.
1325
1326 =cut
1327
1328 Set($ShowMoreAboutPrivilegedUsers, 0);
1329
1330 =item C<$MoreAboutRequestorTicketList>
1331
1332 This can be set to Active, Inactive, All or None.  It controls what
1333 ticket list will be displayed in the 'More about requestor' box on
1334 Ticket/Display.html.  This option can be controlled by users also.
1335
1336 =cut
1337
1338 Set($MoreAboutRequestorTicketList, "Active");
1339
1340 =item C<$MoreAboutRequestorExtraInfo>
1341
1342 By default, the 'More about requestor' box on Ticket/Display.html
1343 shows the Requestor's name and ticket list.  If you would like to see
1344 extra information about the user, this expects a Format string of user
1345 attributes.  Please note that not all the attributes are supported in
1346 this display because we're not building a table.
1347
1348 Example:
1349 C<Set($MoreAboutRequestorExtraInfo,"Organization, Address1")>
1350
1351 =cut
1352
1353 Set($MoreAboutRequestorExtraInfo, "");
1354
1355 =item C<$MoreAboutRequestorGroupsLimit>
1356
1357 By default, the 'More about requestor' box on Ticket/Display.html
1358 shows all the groups of the Requestor.  Use this to limit the number
1359 of groups; a value of undef removes the group display entirely.
1360
1361 =cut
1362
1363 Set($MoreAboutRequestorGroupsLimit, 0);
1364
1365 =item C<$UseSideBySideLayout>
1366
1367 Should the ticket create and update forms use a more space efficient
1368 two column layout.  This layout may not work in narrow browsers if you
1369 set a MessageBoxWidth (below).
1370
1371 =cut
1372
1373 Set($UseSideBySideLayout, 1);
1374
1375 =item C<$EditCustomFieldsSingleColumn>
1376
1377 When displaying a list of Ticket Custom Fields for editing, RT
1378 defaults to a 2 column list.  If you set this to 1, it will instead
1379 display the Custom Fields in a single column.
1380
1381 =cut
1382
1383 Set($EditCustomFieldsSingleColumn, 0);
1384
1385 =item C<$ShowUnreadMessageNotifications>
1386
1387 If set to 1, RT will prompt users when there are new,
1388 unread messages on tickets they are viewing.
1389
1390 =cut
1391
1392 Set($ShowUnreadMessageNotifications, 0);
1393
1394 =item C<$AutocompleteOwners>
1395
1396 If set to 1, the owner drop-downs for ticket update/modify and the query
1397 builder are replaced by text fields that autocomplete.  This can
1398 alleviate the sometimes huge owner list for installations where many
1399 users have the OwnTicket right.
1400
1401 =cut
1402
1403 Set($AutocompleteOwners, 0);
1404
1405 =item C<$AutocompleteOwnersForSearch>
1406
1407 If set to 1, the owner drop-downs for the query builder are always
1408 replaced by text field that autocomplete and C<$AutocompleteOwners>
1409 is ignored. Helpful when owners list is huge in the query builder.
1410
1411 =cut
1412
1413 Set($AutocompleteOwnersForSearch, 0);
1414
1415 =item C<$UserAutocompleteFields>
1416
1417 Specifies which fields of L<RT::User> to match against and how to
1418 match each field when autocompleting users.  Valid match methods are
1419 LIKE, STARTSWITH, ENDSWITH, =, and !=.
1420
1421 =cut
1422
1423 Set($UserAutocompleteFields, {
1424     EmailAddress => 'STARTSWITH',
1425     Name         => 'STARTSWITH',
1426     RealName     => 'LIKE',
1427 });
1428
1429 =item C<$AllowUserAutocompleteForUnprivileged>
1430
1431 Should unprivileged users be allowed to autocomplete users.  Setting
1432 this option to 1 means unprivileged users will be able to search all
1433 your users.
1434
1435 =cut
1436
1437 Set($AllowUserAutocompleteForUnprivileged, 0);
1438
1439 =item C<$DisplayTicketAfterQuickCreate>
1440
1441 Enable this to redirect to the created ticket display page
1442 automatically when using QuickCreate.
1443
1444 =cut
1445
1446 Set($DisplayTicketAfterQuickCreate, 0);
1447
1448 =item C<$WikiImplicitLinks>
1449
1450 Support implicit links in WikiText custom fields?  Setting this to 1
1451 causes InterCapped or ALLCAPS words in WikiText fields to automatically
1452 become links to searches for those words.  If used on Articles, it links
1453 to the Article with that name.
1454
1455 =cut
1456
1457 Set($WikiImplicitLinks, 0);
1458
1459 =item C<$PreviewScripMessages>
1460
1461 Set C<$PreviewScripMessages> to 1 if the scrips preview on the ticket
1462 reply page should include the content of the messages to be sent.
1463
1464 =cut
1465
1466 Set($PreviewScripMessages, 0);
1467
1468 =item C<$SimplifiedRecipients>
1469
1470 If C<$SimplifiedRecipients> is set, a simple list of who will receive
1471 B<any> kind of mail will be shown on the ticket reply page, instead of a
1472 detailed breakdown by scrip.
1473
1474 =cut
1475
1476 Set($SimplifiedRecipients, 0);
1477
1478 =item C<$HideResolveActionsWithDependencies>
1479
1480 If set to 1, this option will skip ticket menu actions which can't be
1481 completed successfully because of outstanding active Depends On tickets.
1482
1483 By default, all ticket actions are displayed in the menu even if some of
1484 them can't be successful until all Depends On links are resolved or
1485 transitioned to another inactive status.
1486
1487 =cut
1488
1489 Set($HideResolveActionsWithDependencies, 0);
1490
1491 =back
1492
1493
1494
1495 =head2 Articles
1496
1497 =over 4
1498
1499 =item C<$ArticleOnTicketCreate>
1500
1501 Set this to 1 to display the Articles interface on the Ticket Create
1502 page in addition to the Reply/Comment page.
1503
1504 =cut
1505
1506 Set($ArticleOnTicketCreate, 0);
1507
1508 =item C<$HideArticleSearchOnReplyCreate>
1509
1510 Set this to 1 to hide the search and include boxes from the Article
1511 UI.  This assumes you have enabled Article Hotlist feature, otherwise
1512 you will have no access to Articles.
1513
1514 =cut
1515
1516 Set($HideArticleSearchOnReplyCreate, 0);
1517
1518 =back
1519
1520
1521
1522 =head2 Message box properties
1523
1524 =over 4
1525
1526 =item C<$MessageBoxWidth>, C<$MessageBoxHeight>
1527
1528 For message boxes, set the entry box width, height and what type of
1529 wrapping to use.  These options can be overridden by users in their
1530 preferences.
1531
1532 When the width is set to undef, no column count is specified and the
1533 message box will take up 100% of the available width.  Combining this
1534 with HARD messagebox wrapping (below) is not recommended, as it will
1535 lead to inconsistent width in transactions between browsers.
1536
1537 These settings only apply to the non-RichText message box.  See below
1538 for Rich Text settings.
1539
1540 =cut
1541
1542 Set($MessageBoxWidth, undef);
1543 Set($MessageBoxHeight, 15);
1544
1545 =item C<$MessageBoxWrap>
1546
1547 Wrapping is disabled when using MessageBoxRichText because of a bad
1548 interaction between IE and wrapping with the Rich Text Editor.
1549
1550 =cut
1551
1552 Set($MessageBoxWrap, "SOFT");
1553
1554 =item C<$MessageBoxRichText>
1555
1556 Should "rich text" editing be enabled? This option lets your users
1557 send HTML email messages from the web interface.
1558
1559 =cut
1560
1561 Set($MessageBoxRichText, 1);
1562
1563 =item C<$MessageBoxRichTextHeight>
1564
1565 Height of rich text JavaScript enabled editing boxes (in pixels)
1566
1567 =cut
1568
1569 Set($MessageBoxRichTextHeight, 200);
1570
1571 =item C<$MessageBoxIncludeSignature>
1572
1573 Should your users' signatures (from their Preferences page) be
1574 included in Comments and Replies.
1575
1576 =cut
1577
1578 Set($MessageBoxIncludeSignature, 1);
1579
1580 =item C<$MessageBoxIncludeSignatureOnComment>
1581
1582 Should your users' signatures (from their Preferences page) be
1583 included in Comments. Setting this to false overrides
1584 C<$MessageBoxIncludeSignature>.
1585
1586 =cut
1587
1588 Set($MessageBoxIncludeSignatureOnComment, 1);
1589
1590 =back
1591
1592
1593 =head2 Transaction display
1594
1595 =over 4
1596
1597 =item C<$OldestTransactionsFirst>
1598
1599 By default, RT shows newest transactions at the bottom of the ticket
1600 history page, if you want see them at the top set this to 0.  This
1601 option can be overridden by users in their preferences.
1602
1603 =cut
1604
1605 Set($OldestTransactionsFirst, 1);
1606
1607 =item C<$DeferTransactionLoading>
1608
1609 When set, defers loading ticket history until the user clicks a link.
1610 This should end up serving pages to users quicker, since generating
1611 all the HTML for transaction history can be slow for long tickets.
1612
1613 =cut
1614
1615 # Set($DeferTransactionLoading, 1);
1616
1617 =item C<$ShowBccHeader>
1618
1619 By default, RT hides from the web UI information about blind copies
1620 user sent on reply or comment.
1621
1622 =cut
1623
1624 Set($ShowBccHeader, 0);
1625
1626 =item C<$TrustHTMLAttachments>
1627
1628 If C<TrustHTMLAttachments> is not defined, we will display them as
1629 text. This prevents malicious HTML and JavaScript from being sent in a
1630 request (although there is probably more to it than that)
1631
1632 =cut
1633
1634 Set($TrustHTMLAttachments, undef);
1635
1636 =item C<$AlwaysDownloadAttachments>
1637
1638 Always download attachments, regardless of content type. If set, this
1639 overrides C<TrustHTMLAttachments>.
1640
1641 =cut
1642
1643 Set($AlwaysDownloadAttachments, undef);
1644
1645 =item C<$AttachmentUnits>
1646
1647 Controls the units (kilobytes or bytes) that attachment sizes use for
1648 display. The default is to display kilobytes if the attachment is
1649 larger than 1024 bytes, bytes otherwise. If you set
1650 C<$AttachmentUnits> to C<'k'> then attachment sizes will always be
1651 displayed in kilobytes. If set to C<'b'>, then sizes will be bytes.
1652
1653 =cut
1654
1655 Set($AttachmentUnits, undef);
1656
1657 =item C<$PreferRichText>
1658
1659 If C<$PreferRichText> is set to 1, RT will show HTML/Rich text messages
1660 in preference to their plain-text alternatives. RT "scrubs" the HTML to
1661 show only a minimal subset of HTML to avoid possible contamination by
1662 cross-site-scripting attacks.
1663
1664 =cut
1665
1666 Set($PreferRichText, undef);
1667
1668 =item C<$MaxInlineBody>
1669
1670 C<$MaxInlineBody> is the maximum attachment size that we want to see
1671 inline when viewing a transaction.  RT will inline any text if the
1672 value is undefined or 0.  This option can be overridden by users in
1673 their preferences.
1674
1675 =cut
1676
1677 Set($MaxInlineBody, 12000);
1678
1679 =item C<$ShowTransactionImages>
1680
1681 By default, RT shows images attached to incoming (and outgoing) ticket
1682 updates inline. Set this variable to 0 if you'd like to disable that
1683 behavior.
1684
1685 =cut
1686
1687 Set($ShowTransactionImages, 1);
1688
1689 =item C<$PlainTextPre>
1690
1691 Normally plaintext attachments are displayed as HTML with line breaks
1692 preserved.  This causes space- and tab-based formatting not to be
1693 displayed correctly.  By setting $PlainTextPre messages will be
1694 displayed using <pre>.
1695
1696 =cut
1697
1698 Set($PlainTextPre, 0);
1699
1700
1701 =item C<$PlainTextMono>
1702
1703 Set C<$PlainTextMono> to 1 to use monospaced font and preserve
1704 formatting; unlike C<$PlainTextPre>, the text will wrap to fit width
1705 of the browser window; this option overrides C<$PlainTextPre>.
1706
1707 =cut
1708
1709 Set($PlainTextMono, 0);
1710
1711 =item C<$SuppressInlineTextFiles>
1712
1713 If C<$SuppressInlineTextFiles> is set to 1, then uploaded text files
1714 (text-type attachments with file names) are prevented from being
1715 displayed in-line when viewing a ticket's history.
1716
1717 =cut
1718
1719 Set($SuppressInlineTextFiles, undef);
1720
1721
1722 =item C<@Active_MakeClicky>
1723
1724 MakeClicky detects various formats of data in headers and email
1725 messages, and extends them with supporting links.  By default, RT
1726 provides two formats:
1727
1728 * 'httpurl': detects http:// and https:// URLs and adds '[Open URL]'
1729   link after the URL.
1730
1731 * 'httpurl_overwrite': also detects URLs as 'httpurl' format, but
1732   replaces the URL with a link.
1733
1734 See F<share/html/Elements/MakeClicky> for documentation on how to add
1735 your own styles of link detection.
1736
1737 =cut
1738
1739 Set(@Active_MakeClicky, qw());
1740
1741 =back
1742
1743
1744
1745 =head1 Application logic
1746
1747 =over 4
1748
1749 =item C<$ParseNewMessageForTicketCcs>
1750
1751 If C<$ParseNewMessageForTicketCcs> is set to 1, RT will attempt to
1752 divine Ticket 'Cc' watchers from the To and Cc lines of incoming
1753 messages that create new Tickets. This option does not apply to replies
1754 or comments on existing Tickets. Be forewarned that if you have I<any>
1755 addresses which forward mail to RT automatically and you enable this
1756 option without modifying C<$RTAddressRegexp> below, you will get
1757 yourself into a heap of trouble.
1758
1759 =cut
1760
1761 Set($ParseNewMessageForTicketCcs, undef);
1762
1763 =item C<$UseTransactionBatch>
1764
1765 Set C<$UseTransactionBatch> to 1 to execute transactions in batches,
1766 such that a resolve and comment (for example) would happen
1767 simultaneously, instead of as two transactions, unaware of each
1768 others' existence.
1769
1770 =cut
1771
1772 Set($UseTransactionBatch, 1);
1773
1774 =item C<$StrictLinkACL>
1775
1776 When this feature is enabled a user needs I<ModifyTicket> rights on
1777 both tickets to link them together; otherwise, I<ModifyTicket> rights
1778 on either of them is sufficient.
1779
1780 =cut
1781
1782 Set($StrictLinkACL, 1);
1783
1784 =item C<$RedistributeAutoGeneratedMessages>
1785
1786 Should RT redistribute correspondence that it identifies as machine
1787 generated?  A 1 will do so; setting this to 0 will cause no
1788 such messages to be redistributed.  You can also use 'privileged' (the
1789 default), which will redistribute only to privileged users. This helps
1790 to protect against malformed bounces and loops caused by auto-created
1791 requestors with bogus addresses.
1792
1793 =cut
1794
1795 Set($RedistributeAutoGeneratedMessages, "privileged");
1796
1797 =item C<$ApprovalRejectionNotes>
1798
1799 Should rejection notes from approvals be sent to the requestors?
1800
1801 =cut
1802
1803 Set($ApprovalRejectionNotes, 1);
1804
1805 =item C<$ForceApprovalsView>
1806
1807 Should approval tickets only be viewed and modified through the standard
1808 approval interface?  Changing this setting to 1 will redirect any attempt to
1809 use the normal ticket display and modify page for approval tickets.
1810
1811 For example, with this option set to 1 and an approval ticket #123:
1812
1813     /Ticket/Display.html?id=123
1814
1815 is redirected to
1816
1817     /Approval/Display.html?id=123
1818
1819 =back
1820
1821 =cut
1822
1823 Set($ForceApprovalsView, 0);
1824
1825 =head1 Extra security
1826
1827 This is a list of extra security measures to enable that help keep your RT
1828 safe.  If you don't know what these mean, you should almost certainly leave the
1829 defaults alone.
1830
1831 =over 4
1832
1833 =item C<$DisallowExecuteCode>
1834
1835 If set to a true value, the C<ExecuteCode> right will be removed from
1836 all users, B<including> the superuser.  This is intended for when RT is
1837 installed into a shared environment where even the superuser should not
1838 be allowed to run arbitrary Perl code on the server via scrips.
1839
1840 =cut
1841
1842 Set($DisallowExecuteCode, 0);
1843
1844 =item C<$Framebusting>
1845
1846 If set to a false value, framekiller javascript will be disabled and the
1847 X-Frame-Options: DENY header will be suppressed from all responses.
1848 This disables RT's clickjacking protection.
1849
1850 =cut
1851
1852 Set($Framebusting, 1);
1853
1854 =item C<$RestrictReferrer>
1855
1856 If set to a false value, the HTTP C<Referer> (sic) header will not be
1857 checked to ensure that requests come from RT's own domain.  As RT allows
1858 for GET requests to alter state, disabling this opens RT up to
1859 cross-site request forgery (CSRF) attacks.
1860
1861 =cut
1862
1863 Set($RestrictReferrer, 1);
1864
1865 =item C<$RestrictLoginReferrer>
1866
1867 If set to a false value, RT will allow the user to log in from any link
1868 or request, merely by passing in C<user> and C<pass> parameters; setting
1869 it to a true value forces all logins to come from the login box, so the
1870 user is aware that they are being logged in.  The default is off, for
1871 backwards compatability.
1872
1873 =cut
1874
1875 Set($RestrictLoginReferrer, 0);
1876
1877 =item C<@ReferrerWhitelist>
1878
1879 This is a list of hostname:port combinations that RT will treat as being
1880 part of RT's domain. This is particularly useful if you access RT as
1881 multiple hostnames or have an external auth system that needs to
1882 redirect back to RT once authentication is complete.
1883
1884  Set(@ReferrerWhitelist, qw(www.example.com:443  www3.example.com:80));
1885
1886 If the "RT has detected a possible cross-site request forgery" error is triggered
1887 by a host:port sent by your browser that you believe should be valid, you can copy
1888 the host:port from the error message into this list.
1889
1890 Simple wildcards, similar to SSL certificates, are allowed.  For example:
1891
1892     *.example.com:80    # matches foo.example.com
1893                         # but not example.com
1894                         #      or foo.bar.example.com
1895
1896     www*.example.com:80 # matches www3.example.com
1897                         #     and www-test.example.com
1898                         #     and www.example.com
1899
1900 =cut
1901
1902 Set(@ReferrerWhitelist, qw());
1903
1904 =back
1905
1906
1907
1908 =head1 Authorization and user configuration
1909
1910 =over 4
1911
1912 =item C<$WebExternalAuth>
1913
1914 If C<$WebExternalAuth> is defined, RT will defer to the environment's
1915 REMOTE_USER variable.
1916
1917 =cut
1918
1919 Set($WebExternalAuth, undef);
1920
1921 =item C<$WebExternalAuthContinuous>
1922
1923 If C<$WebExternalAuthContinuous> is defined, RT will check for the
1924 REMOTE_USER on each access.  If you would prefer this to only happen
1925 once (at initial login) set this to a false value.  The default
1926 setting will help ensure that if your external authentication system
1927 deauthenticates a user, RT notices as soon as possible.
1928
1929 =cut
1930
1931 Set($WebExternalAuthContinuous, 1);
1932
1933 =item C<$WebFallbackToInternalAuth>
1934
1935 If C<$WebFallbackToInternalAuth> is defined, the user is allowed a
1936 chance of fallback to the login screen, even if REMOTE_USER failed.
1937
1938 =cut
1939
1940 Set($WebFallbackToInternalAuth, undef);
1941
1942 =item C<$WebExternalGecos>
1943
1944 C<$WebExternalGecos> means to match 'gecos' field as the user
1945 identity); useful with mod_auth_pwcheck and IIS Integrated Windows
1946 logon.
1947
1948 =cut
1949
1950 Set($WebExternalGecos, undef);
1951
1952 =item C<$WebExternalAuto>
1953
1954 C<$WebExternalAuto> will create users under the same name as
1955 REMOTE_USER upon login, if it's missing in the Users table.
1956
1957 =cut
1958
1959 Set($WebExternalAuto, undef);
1960
1961 =item C<$AutoCreate>
1962
1963 If C<$WebExternalAuto> is set to 1, C<$AutoCreate> will be passed to
1964 User's Create method.  Use it to set defaults, such as creating
1965 Unprivileged users with C<{ Privileged => 0 }> This must be a hashref.
1966
1967 =cut
1968
1969 Set($AutoCreate, undef);
1970
1971 =item C<$WebSessionClass>
1972
1973 C<$WebSessionClass> is the class you wish to use for managing sessions.
1974 It defaults to use your SQL database, except on Oracle, where it
1975 defaults to files on disk.
1976
1977 =cut
1978
1979 # Set($WebSessionClass, "Apache::Session::File");
1980
1981 =item C<$AutoLogoff>
1982
1983 By default, RT's user sessions persist until a user closes his or her
1984 browser. With the C<$AutoLogoff> option you can setup session lifetime
1985 in minutes. A user will be logged out if he or she doesn't send any
1986 requests to RT for the defined time.
1987
1988 =cut
1989
1990 Set($AutoLogoff, 0);
1991
1992 =item C<$LogoutRefresh>
1993
1994 The number of seconds to wait after logout before sending the user to
1995 the login page. By default, 1 second, though you may want to increase
1996 this if you display additional information on the logout page.
1997
1998 =cut
1999
2000 Set($LogoutRefresh, 1);
2001
2002 =item C<$WebSecureCookies>
2003
2004 By default, RT's session cookie isn't marked as "secure". Some web
2005 browsers will treat secure cookies more carefully than non-secure
2006 ones, being careful not to write them to disk, only sending them over
2007 an SSL secured connection, and so on. To enable this behavior, set
2008 C<$WebSecureCookies> to 1.  NOTE: You probably don't want to turn this
2009 on I<unless> users are only connecting via SSL encrypted HTTPS
2010 connections.
2011
2012 =cut
2013
2014 Set($WebSecureCookies, 0);
2015
2016 =item C<$WebHttpOnlyCookies>
2017
2018 Default RT's session cookie to not being directly accessible to
2019 javascript.  The content is still sent during regular and AJAX requests,
2020 and other cookies are unaffected, but the session-id is less
2021 programmatically accessible to javascript.  Turning this off should only
2022 be necessary in situations with odd client-side authentication
2023 requirements.
2024
2025 =cut
2026
2027 Set($WebHttpOnlyCookies, 1);
2028
2029 =item C<$MinimumPasswordLength>
2030
2031 C<$MinimumPasswordLength> defines the minimum length for user
2032 passwords. Setting it to 0 disables this check.
2033
2034 =cut
2035
2036 Set($MinimumPasswordLength, 5);
2037
2038 =back
2039
2040
2041 =head1 Internationalization
2042
2043 =over 4
2044
2045 =item C<@LexiconLanguages>
2046
2047 An array that contains languages supported by RT's
2048 internationalization interface.  Defaults to all *.po lexicons;
2049 setting it to C<qw(en ja)> will make RT bilingual instead of
2050 multilingual, but will save some memory.
2051
2052 =cut
2053
2054 Set(@LexiconLanguages, qw(*));
2055
2056 =item C<@EmailInputEncodings>
2057
2058 An array that contains default encodings used to guess which charset
2059 an attachment uses, if it does not specify one explicitly.  All
2060 options must be recognized by L<Encode::Guess>.  The first element may
2061 also be '*', which enables encoding detection using
2062 L<Encode::Detect::Detector>, if installed.
2063
2064 =cut
2065
2066 Set(@EmailInputEncodings, qw(utf-8 iso-8859-1 us-ascii));
2067
2068 =item C<$EmailOutputEncoding>
2069
2070 The charset for localized email.  Must be recognized by Encode.
2071
2072 =cut
2073
2074 Set($EmailOutputEncoding, "utf-8");
2075
2076 =back
2077
2078
2079
2080
2081
2082
2083
2084 =head1 Date and time handling
2085
2086 =over 4
2087
2088 =item C<$DateTimeFormat>
2089
2090 You can choose date and time format.  See the "Output formatters"
2091 section in perldoc F<lib/RT/Date.pm> for more options.  This option
2092 can be overridden by users in their preferences.
2093
2094 Some examples:
2095
2096 C<Set($DateTimeFormat, "LocalizedDateTime");>
2097 C<Set($DateTimeFormat, { Format => "ISO", Seconds => 0 });>
2098 C<Set($DateTimeFormat, "RFC2822");>
2099 C<Set($DateTimeFormat, { Format => "RFC2822", Seconds => 0, DayOfWeek => 0 });>
2100
2101 =cut
2102
2103 Set($DateTimeFormat, "DefaultFormat");
2104
2105 # Next two options are for Time::ParseDate
2106
2107 =item C<$DateDayBeforeMonth>
2108
2109 Set this to 1 if your local date convention looks like "dd/mm/yy"
2110 instead of "mm/dd/yy". Used only for parsing, not for displaying
2111 dates.
2112
2113 =cut
2114
2115 Set($DateDayBeforeMonth, 1);
2116
2117 =item C<$AmbiguousDayInPast>, C<$AmbiguousDayInFuture>
2118
2119 Should an unspecified day or year in a date refer to a future or a
2120 past value? For example, should a date of "Tuesday" default to mean
2121 the date for next Tuesday or last Tuesday? Should the date "March 1"
2122 default to the date for next March or last March?
2123
2124 Set C<$AmbiguousDayInPast> for the last date, or
2125 C<$AmbiguousDayInFuture> for the next date; the default is usually
2126 correct.  If both are set, C<$AmbiguousDayInPast> takes precedence.
2127
2128 =cut
2129
2130 Set($AmbiguousDayInPast, 0);
2131 Set($AmbiguousDayInFuture, 0);
2132
2133 =item C<$DefaultTimeUnitsToHours>
2134
2135 Use this to set the default units for time entry to hours instead of
2136 minutes.  Note that this only effects entry, not display.
2137
2138 =cut
2139
2140 Set($DefaultTimeUnitsToHours, 0);
2141
2142 =item C<$SimpleSearchIncludeResolved>
2143
2144 By default, the simple ticket search in the top bar excludes "resolved" tickets
2145 unless a status argument is specified.  Set this to a true value to include 
2146 them.
2147
2148 =cut
2149
2150 Set($SimpleSearchIncludeResolved, 0);
2151
2152 =back
2153
2154
2155
2156
2157 =head1 GnuPG integration
2158
2159 A full description of the (somewhat extensive) GnuPG integration can
2160 be found by running the command `perldoc L<RT::Crypt::GnuPG>` (or
2161 `perldoc lib/RT/Crypt/GnuPG.pm` from your RT install directory).
2162
2163 =over 4
2164
2165 =item C<%GnuPG>
2166
2167 Set C<OutgoingMessagesFormat> to 'inline' to use inline encryption and
2168 signatures instead of 'RFC' (GPG/MIME: RFC3156 and RFC1847) format.
2169
2170 If you want to allow people to encrypt attachments inside the DB then
2171 set C<AllowEncryptDataInDB> to 1.
2172
2173 Set C<RejectOnMissingPrivateKey> to false if you don't want to reject
2174 emails encrypted for key RT doesn't have and can not decrypt.
2175
2176 Set C<RejectOnBadData> to false if you don't want to reject letters
2177 with incorrect GnuPG data.
2178
2179 =cut
2180
2181 Set(%GnuPG,
2182     Enable => @RT_GPG@,
2183     OutgoingMessagesFormat => "RFC", # Inline
2184     AllowEncryptDataInDB   => 0,
2185
2186     RejectOnMissingPrivateKey => 1,
2187     RejectOnBadData           => 1,
2188 );
2189
2190 =item C<%GnuPGOptions>
2191
2192 Options to pass to the GnuPG program.
2193
2194 If you override this in your RT_SiteConfig, you should be sure to
2195 include a homedir setting.
2196
2197 Note that options with '-' character MUST be quoted.
2198
2199 =cut
2200
2201 Set(%GnuPGOptions,
2202     homedir => q{@RT_VAR_PATH@/data/gpg},
2203
2204 # URL of a keyserver
2205 #    keyserver => 'hkp://subkeys.pgp.net',
2206
2207 # enables the automatic retrieving of keys when encrypting
2208 #    'auto-key-locate' => 'keyserver',
2209
2210 # enables the automatic retrieving of keys when verifying signatures
2211 #    'keyserver-options' => 'auto-key-retrieve',
2212 );
2213
2214 =back
2215
2216
2217
2218 =head1 Lifecycles
2219
2220 =head2 Lifecycle definitions
2221
2222 Each lifecycle is a list of possible statuses split into three logic
2223 sets: B<initial>, B<active> and B<inactive>. Each status in a
2224 lifecycle must be unique. (Statuses may not be repeated across sets.)
2225 Each set may have any number of statuses.
2226
2227 For example:
2228
2229     default => {
2230         initial  => ['new'],
2231         active   => ['open', 'stalled'],
2232         inactive => ['resolved', 'rejected', 'deleted'],
2233         ...
2234     },
2235
2236 Status names can be from 1 to 64 ASCII characters.  Statuses are
2237 localized using RT's standard internationalization and localization
2238 system.
2239
2240 =over 4
2241
2242 =item initial
2243
2244 You can define multiple B<initial> statuses for tickets in a given
2245 lifecycle.
2246
2247 RT will automatically set its B<Started> date when you change a
2248 ticket's status from an B<initial> state to an B<active> or
2249 B<inactive> status.
2250
2251 =item active
2252
2253 B<Active> tickets are "currently in play" - they're things that are
2254 being worked on and not yet complete.
2255
2256 =item inactive
2257
2258 B<Inactive> tickets are typically in their "final resting state".
2259
2260 While you're free to implement a workflow that ignores that
2261 description, typically once a ticket enters an inactive state, it will
2262 never again enter an active state.
2263
2264 RT will automatically set the B<Resolved> date when a ticket's status
2265 is changed from an B<Initial> or B<Active> status to an B<Inactive>
2266 status.
2267
2268 B<deleted> is still a special status and protected by the
2269 B<DeleteTicket> right, unless you re-defined rights (read below). If
2270 you don't want to allow ticket deletion at any time simply don't
2271 include it in your lifecycle.
2272
2273 =back
2274
2275 Statuses in each set are ordered and listed in the UI in the defined
2276 order.
2277
2278 Changes between statuses are constrained by transition rules, as
2279 described below.
2280
2281 =head2 Default values
2282
2283 In some cases a default value is used to display in UI or in API when
2284 value is not provided. You can configure defaults using the following
2285 syntax:
2286
2287     default => {
2288         ...
2289         defaults => {
2290             on_create => 'new',
2291             on_resolve => 'resolved',
2292             ...
2293         },
2294     },
2295
2296 The following defaults are used.
2297
2298 =over 4
2299
2300 =item on_create
2301
2302 If you (or your code) doesn't specify a status when creating a ticket,
2303 RT will use the this status. See also L</Statuses available during
2304 ticket creation>.
2305
2306 =item on_merge
2307
2308 When tickets are merged, the status of the ticket that was merged
2309 away is forced to this value.  It should be one of inactive statuses;
2310 'resolved' or its equivalent is most probably the best candidate.
2311
2312 =item approved
2313
2314 When an approval is accepted, the status of depending tickets will
2315 be changed to this value.
2316
2317 =item denied
2318
2319 When an approval is denied, the status of depending tickets will
2320 be changed to this value.
2321
2322 =item reminder_on_open
2323
2324 When a reminder is opened, the status will be changed to this value.
2325
2326 =item reminder_on_resolve
2327
2328 When a reminder is resolved, the status will be changed to this value.
2329
2330 =back
2331
2332 =head2 Transitions between statuses and UI actions
2333
2334 A B<Transition> is a change of status from A to B. You should define
2335 all possible transitions in each lifecycle using the following format:
2336
2337     default => {
2338         ...
2339         transitions => {
2340             ''       => [qw(new open resolved)],
2341             new      => [qw(open resolved rejected deleted)],
2342             open     => [qw(stalled resolved rejected deleted)],
2343             stalled  => [qw(open)],
2344             resolved => [qw(open)],
2345             rejected => [qw(open)],
2346             deleted  => [qw(open)],
2347         },
2348         ...
2349     },
2350
2351 =head3 Statuses available during ticket creation
2352
2353 By default users can create tickets with a status of new,
2354 open, or resolved, but cannot create tickets with a status of
2355 rejected, stalled, or deleted. If you want to change the statuses
2356 available during creation, update the transition from '' (empty
2357 string), like in the example above.
2358
2359 =head3 Protecting status changes with rights
2360
2361 A transition or group of transitions can be protected by a specific
2362 right.  Additionally, you can name new right names, which will be added
2363 to the system to control that transition.  For example, if you wished to
2364 create a lesser right than ModifyTicket for rejecting tickets, you could
2365 write:
2366
2367     default => {
2368         ...
2369         rights => {
2370             '* -> deleted'  => 'DeleteTicket',
2371             '* -> rejected' => 'RejectTicket',
2372             '* -> *'        => 'ModifyTicket',
2373         },
2374         ...
2375     },
2376
2377 This would create a new C<RejectTicket> right in the system which you
2378 could assign to whatever groups you choose.
2379
2380 On the left hand side you can have the following variants:
2381
2382     '<from> -> <to>'
2383     '* -> <to>'
2384     '<from> -> *'
2385     '* -> *'
2386
2387 Valid transitions are listed in order of priority. If a user attempts
2388 to change a ticket's status from B<new> to B<open> then the lifecycle
2389 is checked for presence of an exact match, then for 'any to B<open>',
2390 'B<new> to any' and finally 'any to any'.
2391
2392 If you don't define any rights, or there is no match for a transition,
2393 RT will use the B<DeleteTicket> or B<ModifyTicket> as appropriate.
2394
2395 =head3 Labeling and defining actions
2396
2397 For each transition you can define an action that will be shown in the
2398 UI; each action annotated with a label and an update type.
2399
2400 Each action may provide a default update type, which can be
2401 B<Comment>, B<Respond>, or absent. For example, you may want your
2402 staff to write a reply to the end user when they change status from
2403 B<new> to B<open>, and thus set the update to B<Respond>.  Neither
2404 B<Comment> nor B<Respond> are mandatory, and user may leave the
2405 message empty, regardless of the update type.
2406
2407 This configuration can be used to accomplish what
2408 $ResolveDefaultUpdateType was used for in RT 3.8.
2409
2410 Use the following format to define labels and actions of transitions:
2411
2412     default => {
2413         ...
2414         actions => [
2415             'new -> open'     => { label => 'Open it', update => 'Respond' },
2416             'new -> resolved' => { label => 'Resolve', update => 'Comment' },
2417             'new -> rejected' => { label => 'Reject',  update => 'Respond' },
2418             'new -> deleted'  => { label => 'Delete' },
2419
2420             'open -> stalled'  => { label => 'Stall',   update => 'Comment' },
2421             'open -> resolved' => { label => 'Resolve', update => 'Comment' },
2422             'open -> rejected' => { label => 'Reject',  update => 'Respond' },
2423
2424             'stalled -> open'  => { label => 'Open it' },
2425             'resolved -> open' => { label => 'Re-open', update => 'Comment' },
2426             'rejected -> open' => { label => 'Re-open', update => 'Comment' },
2427             'deleted -> open'  => { label => 'Undelete' },
2428         ],
2429         ...
2430     },
2431
2432 In addition, you may define multiple actions for the same transition.
2433 Alternately, you may use '* -> x' to match more than one transition.
2434 For example:
2435
2436     default => {
2437         ...
2438         actions => [
2439             ...
2440             'new -> rejected' => { label => 'Reject', update => 'Respond' },
2441             'new -> rejected' => { label => 'Quick Reject' },
2442             ...
2443             '* -> deleted' => { label => 'Delete' },
2444             ...
2445         ],
2446         ...
2447     },
2448
2449 =head2 Moving tickets between queues with different lifecycles
2450
2451 Unless there is an explicit mapping between statuses in two different
2452 lifecycles, you can not move tickets between queues with these
2453 lifecycles.  This is true even if the different lifecycles use the exact
2454 same set of statuses.  Such a mapping is defined as follows:
2455
2456     __maps__ => {
2457         'from lifecycle -> to lifecycle' => {
2458             'status in left lifecycle' => 'status in right lifecycle',
2459             ...
2460         },
2461         ...
2462     },
2463
2464 =cut
2465
2466 Set(%Lifecycles,
2467     default => {
2468         initial         => [ 'new' ],
2469         active          => [ 'open', 'stalled' ],
2470         inactive        => [ 'resolved', 'rejected', 'deleted' ],
2471
2472         defaults => {
2473             on_create => 'new',
2474             on_merge  => 'resolved',
2475             approved  => 'open',
2476             denied    => 'rejected',
2477             reminder_on_open     => 'open',
2478             reminder_on_resolve  => 'resolved',
2479         },
2480
2481         transitions => {
2482             ''       => [qw(new open resolved)],
2483
2484             # from   => [ to list ],
2485             new      => [qw(open stalled resolved rejected deleted)],
2486             open     => [qw(new stalled resolved rejected deleted)],
2487             stalled  => [qw(new open rejected resolved deleted)],
2488             resolved => [qw(new open stalled rejected deleted)],
2489             rejected => [qw(new open stalled resolved deleted)],
2490             deleted  => [qw(new open stalled rejected resolved)],
2491         },
2492         rights => {
2493             '* -> deleted'  => 'DeleteTicket',
2494             '* -> *'        => 'ModifyTicket',
2495         },
2496         actions => [
2497             'new -> open'      => {
2498                 label  => 'Open It', # loc
2499                 update => 'Respond',
2500             },
2501             'new -> resolved'  => {
2502                 label  => 'Resolve', # loc
2503                 update => 'Comment',
2504             },
2505             'new -> rejected'  => {
2506                 label  => 'Reject', # loc
2507                 update => 'Respond',
2508             },
2509             'new -> deleted'   => {
2510                 label  => 'Delete', # loc
2511             },
2512
2513             'open -> stalled'  => {
2514                 label  => 'Stall', # loc
2515                 update => 'Comment',
2516             },
2517             'open -> resolved' => {
2518                 label  => 'Resolve', # loc
2519                 update => 'Comment',
2520             },
2521             'open -> rejected' => {
2522                 label  => 'Reject', # loc
2523                 update => 'Respond',
2524             },
2525
2526             'stalled -> open'  => {
2527                 label  => 'Open It', # loc
2528             },
2529             'resolved -> open' => {
2530                 label  => 'Re-open', # loc
2531                 update => 'Comment',
2532             },
2533             'rejected -> open' => {
2534                 label  => 'Re-open', # loc
2535                 update => 'Comment',
2536             },
2537             'deleted -> open'  => {
2538                 label  => 'Undelete', # loc
2539             },
2540         ],
2541     },
2542 # don't change lifecyle of the approvals, they are not capable to deal with
2543 # custom statuses
2544     approvals => {
2545         initial         => [ 'new' ],
2546         active          => [ 'open', 'stalled' ],
2547         inactive        => [ 'resolved', 'rejected', 'deleted' ],
2548
2549         defaults => {
2550             on_create => 'new',
2551             on_merge => 'resolved',
2552             reminder_on_open     => 'open',
2553             reminder_on_resolve  => 'resolved',
2554         },
2555
2556         transitions => {
2557             ''       => [qw(new open resolved)],
2558
2559             # from   => [ to list ],
2560             new      => [qw(open stalled resolved rejected deleted)],
2561             open     => [qw(new stalled resolved rejected deleted)],
2562             stalled  => [qw(new open rejected resolved deleted)],
2563             resolved => [qw(new open stalled rejected deleted)],
2564             rejected => [qw(new open stalled resolved deleted)],
2565             deleted  => [qw(new open stalled rejected resolved)],
2566         },
2567         rights => {
2568             '* -> deleted'  => 'DeleteTicket',
2569             '* -> rejected' => 'ModifyTicket',
2570             '* -> *'        => 'ModifyTicket',
2571         },
2572         actions => [
2573             'new -> open'      => {
2574                 label  => 'Open It', # loc
2575                 update => 'Respond',
2576             },
2577             'new -> resolved'  => {
2578                 label  => 'Resolve', # loc
2579                 update => 'Comment',
2580             },
2581             'new -> rejected'  => {
2582                 label  => 'Reject', # loc
2583                 update => 'Respond',
2584             },
2585             'new -> deleted'   => {
2586                 label  => 'Delete', # loc
2587             },
2588
2589             'open -> stalled'  => {
2590                 label  => 'Stall', # loc
2591                 update => 'Comment',
2592             },
2593             'open -> resolved' => {
2594                 label  => 'Resolve', # loc
2595                 update => 'Comment',
2596             },
2597             'open -> rejected' => {
2598                 label  => 'Reject', # loc
2599                 update => 'Respond',
2600             },
2601
2602             'stalled -> open'  => {
2603                 label  => 'Open It', # loc
2604             },
2605             'resolved -> open' => {
2606                 label  => 'Re-open', # loc
2607                 update => 'Comment',
2608             },
2609             'rejected -> open' => {
2610                 label  => 'Re-open', # loc
2611                 update => 'Comment',
2612             },
2613             'deleted -> open'  => {
2614                 label  => 'Undelete', # loc
2615             },
2616         ],
2617     },
2618 );
2619
2620
2621
2622
2623
2624 =head1 Administrative interface
2625
2626 =over 4
2627
2628 =item C<$ShowRTPortal>
2629
2630 RT can show administrators a feed of recent RT releases and other
2631 related announcements and information from Best Practical on the top
2632 level Configuration page.  This feature helps you stay up to date on
2633 RT security announcements and version updates.
2634
2635 RT provides this feature using an "iframe" on C</Admin/index.html>
2636 which asks the administrator's browser to show an inline page from
2637 Best Practical's website.
2638
2639 If you'd rather not make this feature available to your
2640 administrators, set C<$ShowRTPortal> to a false value.
2641
2642 =cut
2643
2644 Set($ShowRTPortal, 1);
2645
2646 =item C<%AdminSearchResultFormat>
2647
2648 In the admin interface, format strings similar to tickets result
2649 formats are used. Use C<%AdminSearchResultFormat> to define the format
2650 strings used in the admin interface on a per-RT-class basis.
2651
2652 =cut
2653
2654 Set(%AdminSearchResultFormat,
2655     Queues =>
2656         q{'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__id__</a>/TITLE:#'}
2657         .q{,'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
2658         .q{,__Description__,__Address__,__Priority__,__DefaultDueIn__,__Disabled__,__Lifecycle__},
2659
2660     Groups =>
2661         q{'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__id__</a>/TITLE:#'}
2662         .q{,'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
2663         .q{,'__Description__'},
2664
2665     Users =>
2666         q{'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__id__</a>/TITLE:#'}
2667         .q{,'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
2668         .q{,__RealName__, __EmailAddress__},
2669
2670     CustomFields =>
2671         q{'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__id__</a>/TITLE:#'}
2672         .q{,'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
2673         .q{,__AppliedTo__, __FriendlyType__, __FriendlyPattern__},
2674
2675     Scrips =>
2676         q{'<a href="__WebPath__/Admin/Queues/Scrip.html?id=__id__&Queue=__QueueId__">__id__</a>/TITLE:#'}
2677         .q{,'<a href="__WebPath__/Admin/Queues/Scrip.html?id=__id__&Queue=__QueueId__">__Description__</a>/TITLE:Description'}
2678         .q{,__Stage__, __Condition__, __Action__, __Template__},
2679
2680     GlobalScrips =>
2681         q{'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__">__id__</a>/TITLE:#'}
2682         .q{,'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__">__Description__</a>/TITLE:Description'}
2683         .q{,__Stage__, __Condition__, __Action__, __Template__},
2684
2685     Templates =>
2686         q{'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__id__</a>/TITLE:#'}
2687         .q{,'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__Name__</a>/TITLE:Name'}
2688         .q{,'__Description__'},
2689     Classes =>
2690         q{ '<a href="__WebPath__/Admin/Articles/Classes/Modify.html?id=__id__">__id__</a>/TITLE:#'}
2691         .q{,'<a href="__WebPath__/Admin/Articles/Classes/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
2692         .q{,__Description__},
2693 );
2694
2695 =back
2696
2697
2698
2699
2700 =head1 Development options
2701
2702 =over 4
2703
2704 =item C<$DevelMode>
2705
2706 RT comes with a "Development mode" setting.  This setting, as a
2707 convenience for developers, turns on several of development options
2708 that you most likely don't want in production:
2709
2710 =over 4
2711
2712 =item *
2713
2714 Disables CSS and JS minification and concatenation.  Both CSS and JS
2715 will be instead be served as a number of individual smaller files,
2716 unchanged from how they are stored on disk.
2717
2718 =item *
2719
2720 Uses L<Module::Refresh> to reload changed Perl modules on each
2721 request.
2722
2723 =item *
2724
2725 Turns off Mason's C<static_source> directive; this causes Mason to
2726 reload template files which have been modified on disk.
2727
2728 =item *
2729
2730 Turns on Mason's HTML C<error_format>; this renders compilation errors
2731 to the browser, along with a full stack trace.  It is possible for
2732 stack traces to reveal sensitive information such as passwords or
2733 ticket content.
2734
2735 =item *
2736
2737 Turns off caching of callbacks; this enables additional callbacks to
2738 be added while the server is running.
2739
2740 =back
2741
2742 =cut
2743
2744 Set($DevelMode, "@RT_DEVEL_MODE@");
2745
2746
2747 =item C<$RecordBaseClass>
2748
2749 What abstract base class should RT use for its records. You should
2750 probably never change this.
2751
2752 Valid values are C<DBIx::SearchBuilder::Record> or
2753 C<DBIx::SearchBuilder::Record::Cachable>
2754
2755 =cut
2756
2757 Set($RecordBaseClass, "DBIx::SearchBuilder::Record::Cachable");
2758
2759
2760 =item C<@MasonParameters>
2761
2762 C<@MasonParameters> is the list of parameters for the constructor of
2763 HTML::Mason's Apache or CGI Handler.  This is normally only useful for
2764 debugging, e.g. profiling individual components with:
2765
2766     use MasonX::Profiler; # available on CPAN
2767     Set(@MasonParameters, (preamble => 'my $p = MasonX::Profiler->new($m, $r);'));
2768
2769 =cut
2770
2771 Set(@MasonParameters, ());
2772
2773 =item C<$StatementLog>
2774
2775 RT has rudimentary SQL statement logging support; simply set
2776 C<$StatementLog> to be the level that you wish SQL statements to be
2777 logged at.
2778
2779 Enabling this option will also expose the SQL Queries page in the
2780 Configuration -> Tools menu for SuperUsers.
2781
2782 =cut
2783
2784 Set($StatementLog, undef);
2785
2786 =back
2787
2788
2789
2790
2791 =head1 Deprecated options
2792
2793 =over 4
2794
2795 =item C<$LinkTransactionsRun1Scrip>
2796
2797 RT-3.4 backward compatibility setting. Add/Delete Link used to record
2798 one transaction and run one scrip. Set this value to 1 if you want
2799 only one of the link transactions to have scrips run.
2800
2801 =cut
2802
2803 Set($LinkTransactionsRun1Scrip, 0);
2804
2805 =item C<$ResolveDefaultUpdateType>
2806
2807 This option has been deprecated.  You can configure this site-wide
2808 with L</Lifecycles> (see L</Labeling and defining actions>).
2809
2810 =back
2811
2812 =cut
2813
2814 1;