# Any configuration directives you include  here will override 
# RT's default configuration file, RT_Config.pm
#
# To include a directive here, just copy the equivalent statement
# from RT_Config.pm and change the value. We've included a single
# sample value below.
#
# This file is actually a perl module, so you can include valid
# perl code, as well.
#
# The converse is also true, if this file isn't valid perl, you're
# going to run into trouble. To check your SiteConfig file, use
# this comamnd:
#
#   perl -c /path/to/your/etc/RT_SiteConfig.pm
#
# You must restart your webserver after making changes to this file.

Set( $rtname, 'Linguamatics Dev');

# You must install Plugins on your own, this is only an example
# of the correct syntax to use when activating them.
# There should only be one @Plugins declaration in your config file.
#Set(@Plugins,(qw(RT::Extension::QuickDelete RT::Extension::CommandByMail)));
Set(@Plugins, qw(RT::Authen::ExternalAuth));

Set($rtname, 'Linguamatics');
Set($Organization, 'linguamatics.com');
Set($DatabaseUser, '######################');
Set($DatabasePassword, '######################');
Set($DatabaseName, '######################');
Set($DatabaseHost, "db.linguamatics.com");
Set($DatabaseRTHost, "db.linguamatics.com");

# GRANT ALL PRIVILEGES ON rt_dev.* TO 'rt_devuser'@'owlwoman.linguamatics.com' IDENTIFIED BY 'rt_d3vus3r';

#Set(%FullTextSearch, Enable => 1, Indexed => 0, );
Set( %FullTextSearch,
    Enable     => 1,
    Indexed    => 1,
    Table      => 'AttachmentsIndex',
    MaxMatches => '10000',
);

Set( $CanonicalizeEmailAddressMatch, '@owlwoman\.linguamatics\.com$' );
Set( $CanonicalizeEmailAddressReplace, '@linguamatics.com ');
#Set($RTAddressRegexp,qr{^(?:(?:rt_dev(?:|-comment)|testsupport(?:|-comment))\@(owlwoman\.)?linguamatics\.com)$}i);
Set($RTAddressRegexp,qr{^(?:rt-dev(?:|-comment)\@(?:owlwoman\.)?linguamatics\.com)$}i);
Set($OwnerEmail , 'sysadmin@linguamatics.com');
Set($CorrespondAddress, 'rt-dev@linguamatics.com');
Set($CommentAddress, 'rt-dev-comment@linguamatics.com');
Set($Timezone, 'Europe/London');
Set($UseFriendlyToLine, 1);
Set($FriendlyFromLineFormat, "\"%s\" <%s>");

Set($WebPath, '/local/rt-dev');
Set($WebDomain, 'owlwoman.linguamatics.com');
Set($WebBaseURL, 'https://secure.linguamatics.com');
Set($CanonicalizeRedirectURLs, 1);
Set($ParseNewMessageForTicketCcs, 1);
Set($WebExternalAuth, 1);
Set($WebExternalAuto, 1);
Set($AutoCreate, {Privileged=>1});

Set($ExternalAuthPriority,  ['Lingua_LDAP']);
Set($ExternalInfoPriority,  ['Lingua_LDAP']);
Set($ExternalServiceUsesSSLorTLS, 0);
Set($AutoCreateNonExternalUsers, 1);
Set($ExternalSettings, {
                'Lingua_LDAP' => {
                        'type'          => 'ldap',
                        'server'        => 'ldapserver.linguamatics.com',
                        'base'          => 'ou=users,dc=linguamatics,dc=com',
                        'filter'        => '(|(objectClass=posixAccount)(objectClass=account))',
                        'tls'           => 0,
                        'net_ldap_args' => [ version => 3 ],
                        'attr_match_list' => [ 'EmailAddress' ],
                        'attr_map'      => { 'Name' => 'uid',
                                             'EmailAddress' => 'mail', 
                                             'RealName' => 'cn', 
                                             'ExternalAuthId' => 'uid',
                                             'Gecos' => 'gecos'
                                           }
# 'group'         => 'cn=staff,ou=Groups,dc=linguamatics,dc=com',
# 'group_attr'    => 'memberUid',
# 'ssl_version'   => 3,
# 'd_filter'      => '(employeeType=other)'
                }
        });

=item C<$LogToFile>, C<$LogDir>, C<$LogToFileNamed>
Logging to a standalone file is also possible. The file needs to both
exist and be writable by all direct users of the RT API. 
=cut

Set($LogToFile, debug);
Set($LogDir, q{var/log});
Set($LogToFileNamed, "rt.log");    #log to rt.log


1;

