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