1 # $Header: /home/cvs/cvsroot/freeside/rt/etc/Attic/config.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
5 # {{{ Base Configuration
7 # $rtname the string that RT will look for in mail messages to
8 # figure out what ticket a new piece of mail belongs to
10 # Your domain name is recommended, so as not to pollute the namespace.
11 # once you start using a given tag, you should probably never change it.
12 # (otherwise, mail for existing tickets won't get put in the right place
14 $rtname="example.com";
16 # You should set this to your organization's DNS domain. For example,
17 # fsck.com or asylum.arkham.ma.us. It's used by the linking interface to
18 # guarantee that ticket URIs are unique and easy to construct.
20 $Organization = "example.com";
22 # $user_passwd_min defines the minimum length for user passwords. Setting
23 # it to 0 disables this check
24 $MinimumPasswordLength = "5";
26 # $Timezone is used to convert times entered by users into GMT and back again
27 # It should be set to a timezone recognized by your local unix box.
28 $Timezone = 'US/Eastern';
30 # LogDir is where RT writes its logfiles.
31 # This directory should be writable by your rt group
32 $LogDir = "!!RT_LOG_PATH!!";
36 # {{{ Database Configuration
38 # Database driver beeing used - i.e. MySQL.
39 $DatabaseType="!!DB_TYPE!!";
41 # The domain name of your database server
42 # If you're running mysql and it's on localhost,
43 # leave it blank for enhanced performance
44 $DatabaseHost="!!DB_HOST!!";
46 # The port that your database server is running on. Ignored unless it's
47 # a positive integer. It's usually safe to leave this blank
48 $DatabasePort="!!DB_PORT!!";
51 #The name of the database user (inside the database)
52 $DatabaseUser='!!DB_RT_USER!!';
54 # Password the DatabaseUser should use to access the database
55 $DatabasePassword='!!DB_RT_PASS!!';
58 # The name of the RT's database on your database server
59 $DatabaseName='!!DB_DATABASE!!';
61 # If you're using Postgres and have compiled in SSL support,
62 # set DatabaseRequireSSL to 1 to turn on SSL communication
63 $DatabaseRequireSSL=undef;
67 # {{{ Incoming mail gateway configuration
70 # OwnerEmail is the address of a human who manages RT. RT will send
71 # errors generated by the mail gateway to this address. This address
72 # should _not_ be an address that's managed by your RT instance.
76 # If $LoopsToRTOwner is defined, RT will send mail that it believes
77 # might be a loop to $RT::OwnerEmail
81 # If $StoreLoopss is defined, RT will record messages that it believes
82 # to be part of mail loops.
83 # As it does this, it will try to be careful not to send mail to the
84 # sender of these messages
89 # $MaxAttachmentSize sets the maximum size (in bytes) of attachments stored
92 # For mysql and oracle, we set this size at 10 megabytes.
93 # If you're running a postgres version earlier than 7.1, you will need
94 # to drop this to 8192. (8k)
96 $MaxAttachmentSize = 10000000;
98 # $TruncateLongAttachments: if this is set to a non-undef value,
99 # RT will truncate attachments longer than MaxAttachmentLength.
101 $TruncateLongAttachments = undef;
104 # $DropLongAttachments: if this is set to a non-undef value,
105 # RT will silently drop attachments longer than MaxAttachmentLength.
107 $DropLongAttachments = undef;
109 # If $ParseNewMessageForTicketCcs is true, RT will attempt to divine
110 # Ticket 'Cc' watchers from the To and Cc lines of incoming messages
111 # Be forewarned that if you have _any_ addresses which forward mail to
112 # RT automatically and you enable this option without modifying
113 # "IsRTAddress" below, you will get yourself into a heap of trouble.
114 # And well, this is free software, so there isn't a warrantee, but
115 # I disclaim all ability to help you if you do enable this without
116 # modifying IsRTAddress below.
118 $ParseNewMessageForTicketCcs = undef;
120 # IsRTAddress is used to make sure RT doesn't add itself as a ticket CC if
121 # the setting above is enabled.
126 # Example: the following rule would tell RT not to Cc
127 # "tickets@noc.example.com"
128 # return(1) if ($address =~ /^tickets\@noc.example.com$/i);
133 # CanonicalizeAddress converts email addresses into canonical form.
134 # it takes one email address in and returns the proper canonical
135 # form. You can dump whatever your proper local config is in here
137 sub CanonicalizeAddress {
139 # Example: the following rule would treat all email
140 # coming from a subdomain as coming from second level domain
142 #$email =~ s/\@(.*).foo.com/\@foo.com/;
146 # If $LookupSenderInExternalDatabase is defined, RT will attempt to
147 # verify the incoming message sender with a known source, using the
148 # LookupExternalUserInfo routine below
150 $LookupSenderInExternalDatabase = undef;
152 # If $SenderMustExistInExternalDatabase is true, RT will refuse to
153 # create non-privileged accounts for unknown users if you are using
154 # the "LookupSenderInExternalDatabase" option.
155 # Instead, an error message will be mailed and RT will forward the
156 # message to $RTOwner.
158 # If you are not using $LookupSenderInExternalDatabase, this option
161 # If you define an AutoRejectRequest template, RT will use this
162 # template for the rejection message.
164 $SenderMustExistInExternalDatabase = undef;
166 # LookupExternalUserInfo is a site-definable method for synchronizing
167 # incoming users with an external data source.
169 # This routine takes a tuple of EmailAddress and FriendlyName
170 # EmailAddress is the user's email address, ususally taken from
171 # an email message's From: header.
172 # FriendlyName is a freeform string, ususally taken from the "comment"
173 # portion of an email message's From: header.
175 # It returns (FoundInExternalDatabase, ParamHash);
177 # FoundInExternalDatabase must be set to 1 before return if the user was
178 # found in the external database.
180 # ParamHash is a Perl parameter hash which can contain at least the following
181 # fields. These fields are used to populate RT's users database when the user
184 # EmailAddress is the email address that RT should use for this user.
185 # Name is the 'Name' attribute RT should use for this user.
186 # 'Name' is used for things like access control and user lookups.
187 # RealName is what RT should display as the user's name when displaying
190 sub LookupExternalUserInfo {
191 my ($EmailAddress, $RealName) = @_;
193 my $FoundInExternalDatabase = 1;
196 #Name is the RT username you want to use for this user.
197 $params{'Name'} = $EmailAddress;
198 $params{'EmailAddress'} = $EmailAddress;
199 $params{'RealName'} = $RealName;
201 # See RT's contributed code for examples.
202 # http://www.fsck.com/pub/rt/contrib/
203 return ($FoundInExternalDatabase, %params);
208 # {{{ Outgoing mail configuration
210 # RT is designed such that any mail which already has a ticket-id associated
211 # with it will get to the right place automatically.
213 # $CorrespondAddress and $CommentAddress are the default addresses
214 # that will be listed in From: and Reply-To: headers of correspondence
215 # and comment mail tracked by RT, unless overridden by a queue-specific
218 $CorrespondAddress='RT::CorrespondAddress.not.set';
220 $CommentAddress='RT::CommentAddress.not.set';
223 #Sendmail Configuration
225 # $MailCommand defines which method RT will use to try to send mail
226 # We know that 'sendmailpipe' works fairly well.
227 # If 'sendmailpipe' doesn't work well for you, try 'sendmail'
229 # Note that you should remove the '-t' from $SendmailArguments
230 # if you use 'sendmail rather than 'sendmailpipe'
232 $MailCommand = 'sendmailpipe';
234 # $SendmailArguments defines what flags to pass to $Sendmail
235 # assuming you picked 'sendmail' or 'sendmailpipe' as the $MailCommand above.
236 # If you picked 'sendmailpipe', you MUST add a -t flag to $SendmailArguments
238 # These options are good for most sendmail wrappers and workalikes
239 $SendmailArguments="-oi -t";
241 # These arguments are good for sendmail brand sendmail 8 and newer
242 #$SendmailArguments="-oi -t -ODeliveryMode=b -OErrorMode=m";
244 # If you selected 'sendmailpipe' above, you MUST specify the path
245 # to your sendmail binary in $SendmailPath.
246 # !! If you did not # select 'sendmailpipe' above, this has no effect!!
247 $SendmailPath = "/usr/sbin/sendmail";
249 # RT can optionally set a "Friendly" 'To:' header when sending messages to
250 # Ccs or AdminCcs (rather than having a blank 'To:' header.
252 # This feature DOES NOT WORK WITH SENDMAIL[tm] BRAND SENDMAIL
253 # If you are using sendmail, rather than postfix, qmail, exim or some other MTA,
254 # you _must_ disable this option.
256 $UseFriendlyToLine = 0;
263 # Logging. The default is to log anything except debugging
264 # information to a logfile. Check the Log::Dispatch POD for
265 # information about how to get things by syslog, mail or anything
266 # else, get debugging info in the log, etc.
268 # It might generally make
269 # sense to send error and higher by email to some administrator.
270 # If you do this, be careful that this email isn't sent to this RT instance.
273 # the minimum level error that will be logged to the specific device.
274 # levels from lowest to highest:
275 # debug info notice warning error critical alert emergency
278 # Mail loops will generate a critical log message.
280 $LogToScreen = 'error';
281 $LogToFile = 'error';
282 #$LogToFileNamed = "$LogDir/rt.log.".$$.".".$<; #log to rt.log.<pid>.<user>
283 $LogToFileNamed = "$LogDir/rt.log".$<; #log to rt.log.user;
287 # {{{ Web interface configuration
291 # Define the directory name to be used for images in rt web
294 # If you're putting the web ui somewhere other than at the root of
296 # $WebPath requires a leading / but no trailing /
300 # This is the Scheme, server and port for constructing urls to webrt
301 # $WebBaseURL doesn't need a trailing /
303 $WebBaseURL = "http://RT::WebBaseURL.not.configured:80";
305 $WebURL = $WebBaseURL . $WebPath . "/";
309 # $WebImagesURL points to the base URL where RT can find its images.
310 # If you're running the FastCGI version of the RT web interface,
311 # you should make RT's WebRT/html/NoAuth/images directory available on
312 # a static web server and supply that URL as $WebImagesURL.
314 $WebImagesURL = $WebURL."NoAuth/images/";
316 # $RTLogoURL points to the URL of the RT logo displayed in the web UI
318 $LogoURL = $WebImagesURL."rt.jpg";
320 # If $WebExternalAuth is defined, RT will defer to the environment's
321 # REMOTE_USER variable.
323 $WebExternalAuth = undef;
325 # $MasonComponentRoot is where your rt instance keeps its mason html files
326 # (this should be autoconfigured during 'make install' or 'make upgrade')
328 $MasonComponentRoot = "!!MASON_HTML_PATH!!";
330 # $MasonLocalComponentRoot is where your rt instance keeps its site-local
332 # (this should be autoconfigured during 'make install' or 'make upgrade')
334 $MasonLocalComponentRoot = "!!MASON_LOCAL_HTML_PATH!!";
336 # $MasonDataDir Where mason keeps its datafiles
337 # (this should be autoconfigured during 'make install' or 'make upgrade')
339 $MasonDataDir = "!!MASON_DATA_PATH!!";
341 # RT needs to put session data (for preserving state between connections
342 # via the web interface)
343 $MasonSessionDir = "!!MASON_SESSION_PATH!!";
347 #This is from tobias' prototype web search UI. it may stay and it may go.
350 # This is for putting in more user-actions at the Transaction
351 # bar. I will typically add "Enter bug in Bugzilla" here.:
352 ExtraTransactionActions => sub { return ""; },
354 # Here you can modify the list view. Be aware that the web
355 # interface might crash if TicketAttribute is wrongly set.
361 TicketAttribute => 'Id'
364 { Header => 'Subject',
365 TicketAttribute => 'Subject'
367 { Header => 'Requestor(s)',
368 TicketAttribute => 'RequestorsAsString'
370 { Header => 'Status',
371 TicketAttribute => 'Status'
376 TicketAttribute => 'QueueObj->Name'
382 TicketAttribute => 'ToldObj->AgeAsString'
386 TicketAttribute => 'CreatedObj->AgeAsString'
390 TicketAttribute => 'LastUpdatedObj->AgeAsString'
393 # TODO: It would be nice with a link here to the Owner and all
394 # other request owned by this Owner.
396 TicketAttribute => 'OwnerObj->Name'
403 ExtraLinks => '&Action=Take'
411 # {{{ RT Linking Interface
413 # $TicketBaseURI is the Base path of the URI for local tickets
415 # You shouldn't need to touch this. it's used to link tickets both locally
418 $TicketBaseURI = "fsck.com-rt://$Organization/$rtname/ticket/";
420 # A hash table of conversion subs to be used for transforming RT Link
421 # URIs to URLs in the web interface. If you want to use RT towards
422 # locally installed databases, this is the right place to configure it.
426 'http' => sub {return @_;},
427 'https' => sub {return @_;},
428 'ftp' => sub {return @_;},
429 'fsck.com-rt' => sub {warn "stub!";},
430 'mozilla.org-bugzilla' => sub {warn "stub!"},
431 'fsck.com-kb' => sub {warn "stub!"}
435 # A hash table of subs for fetching content from an URI
438 'fsck.com-rt' => sub {warn "stub!";},
439 'mozilla.org-bugzilla' => sub {warn "stub!"},
440 'fsck.com-kb' => sub {warn "stub!"}
445 # {{{ No User servicable parts inside
447 ############################################
448 ############################################
449 ############################################
451 # Don't edit anything below this line unless you really know
455 ############################################
456 ############################################
458 # TODO: get this stuff out of the config file and into RT.pm
460 #Set up us the timezone
461 $ENV{'TZ'} = $Timezone; #TODO: Bogus hack to deal with Date::Manip whining
463 # Configure sendmail if we're using Entity->send('sendmail')
464 if ($MailCommand eq 'sendmail') {
465 $MailParams = $SendmailArguments;