
Set($rtname , "ALERGS");
Set($Organization , "rt.al.rs.gov.br");
Set($Timezone , 'America/Sao_Paulo');

Set($DatabaseType , 'mysql');
Set($DatabaseHost   , 'localhost');
Set($DatabaseRTHost , 'localhost');
Set($DatabasePort , '3306');
Set($DatabaseUser , 'rtuser');
Set($DatabasePassword , '************');
Set($DatabaseName , 'rt3');

Set($WebDefaultStylesheet, 'web2');
Set($WebPath, "");
Set($WebDomain, 'rt.alergs.br' );
Set($WebPort, 80);					# + ($< * 7274) % 32766 + ($< && 1024));
Set($WebBaseURL, 'http://' . RT->Config->Get('WebDomain') . ':' . RT->Config->Get('WebPort'));
Set($WebURL, RT->Config->Get('WebBaseURL') . RT->Config->Get('WebPath') . "/");

Set($RTAddressRegexp , 'dsi.$\@al.rs.gov.br');
Set($CorrespondAddress , 'dsi.rede@al.rs.gov.br');
Set($CommentAddress , 'dsi.redeadm@al.rs.gov.br');

#Set(@EmailInputEncodings, qw(utf-8 iso-8859-1 us-ascii));
#Set($EmailOutputEncoding, 'utf-8');

#Set($UseFriendlyFromLine, 1);
#Set($FriendlyFromLineFormat, "\"%s via RT\" <%s>");

Set($AutoLogoff, 30);					# minutos

#Set($DateTimeFormat, 'DefaultFormat');
Set($DateDayBeforeMonth , 1);

Set($EnableReminders,1);


Set($LogToSyslog , '');
Set($LogDir, '/opt/rt3/var/log');
Set($LogToFileNamed , "rt.log");
# Set($LogToFile      , 'warning');
Set($LogToFile      , 'debug');

# problema de lentidao com ticket merge
# adding
# @LogToSyslogConf = ( socket => 'native' ) unless (@LogToSyslogConf);
# to RT_SiteConfig.pm sped up the merged ticket display from 260 seconds
# to about 6 seconds for us. 





Set( @Plugins, (qw(RT::Authen::ExternalAuth RT::FM)));
# /opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm



Set($ExternalAuthPriority,  ['My_LDAP']);
Set($ExternalInfoPriority,  ['My_LDAP']);
Set($ExternalServiceUsesSSLorTLS,    0);
Set($AutoCreateNonExternalUsers,    0);
Set($ExternalSettings,      {
        'My_LDAP'       =>  {
                'type'                      =>  'ldap',
                'auth'                      =>  1,
                'info'                      =>  1,
                'server'                    =>  'ds1.alergs.br',
#                'user'                      =>  'cn=adrt,ou=Contas de Servicos,ou=DSI - Sistemas e Informatica,ou=Corporativo,dc=alergs,dc=br',
                'user'                      =>  'cn=adrt,ou=Corporativo,dc=alergs,dc=br',
                'pass'                      =>  '************',
                'base'                      =>  'dc=alergs,dc=br',
                'filter'                    => '(objectClass=*)',
                'd_filter'                  => '(userAccountControl:1.2.840.113556.1.4.803:=2)',
#                'd_filter'                  =>  '((&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2)(!name=_*)))',
                'tls'                       =>  0,
                'net_ldap_args'             => [    version =>  3   ],
                'group'                     =>  'CN=Usuarios do DSI,OU=DSI - Sistemas e Informatica,OU=Corporativo,DC=alergs,DC=br',
                'group_attr'                =>  'member',
                'attr_match_list'           => [  'Name',
                                                  'EmailAddress'
                                               ],

###### ATENCAO para a virgula no final da linha ########

                'attr_map'                  =>  {   'Name' => 'sAMAccountName',
                                                    'EmailAddress' => 'mail',
                                                    'RealName' => 'cn'
                                                 }
                               }
               }
);

1;
