Advertisement
Guest User

Untitled

a guest
Sep 24th, 2013
1,060
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 76.60 KB | None | 0 0
  1. # Kernel/Config/Defaults.pm - Default Config file for OTRS kernel
  2. # Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
  3. # --
  4. # This software comes with ABSOLUTELY NO WARRANTY. For details, see
  5. # the enclosed file COPYING for license information (AGPL). If you
  6. # did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
  7. # --
  8. #
  9. # Note:
  10. # -->> Don't edit this file! Copy your needed settings into
  11. # Kernel/Config.pm. Kernel/Config.pm will not be updated. <<--
  12. #
  13. # -->> All changes of this file will be lost after an update! <<--
  14. #
  15. # --
  16.  
  17. package Kernel::Config::Defaults;
  18.  
  19. use strict;
  20. use warnings;
  21. use utf8;
  22.  
  23. # Perl 5.8.6 is the required minimum version to use OTRS.
  24. # Do not use require VERSION as it leaks variables.
  25. use 5.008_006;
  26.  
  27. # prepend '../Custom', '../Kernel/cpan-lib' and '../' to the module search path @INC
  28. use File::Basename;
  29. use FindBin qw($Bin);
  30. use lib dirname($Bin);
  31. use lib dirname($Bin) . '/Kernel/cpan-lib';
  32. use lib dirname($Bin) . '/Custom';
  33.  
  34. use File::stat;
  35. use Digest::MD5;
  36.  
  37. sub LoadDefaults {
  38. my $Self = shift;
  39.  
  40. # --------------------------------------------------- #
  41. # system data #
  42. # --------------------------------------------------- #
  43. # SecureMode
  44. # Disables the use of web-installer (installer.pl).
  45. # GenericAgent, PackageManager and SQL Box can only be used if SecureMode is enabled.
  46. $Self->{SecureMode} = 0;
  47.  
  48. # SystemID
  49. # (The identify of the system. Each ticket number and
  50. # each http session id starts with this number)
  51. $Self->{SystemID} = 10;
  52.  
  53. # FQDN
  54. # (Full qualified domain name of your system.)
  55. $Self->{FQDN} = 'yourhost.example.com';
  56.  
  57. # HttpType
  58. # In case you use https instead of plain http specify it here
  59. $Self->{HttpType} = 'http';
  60.  
  61. # ScriptAlias
  62. # Prefix to index.pl used as ScriptAlias in web config
  63. # (Used when emailing links to agents).
  64. $Self->{ScriptAlias} = 'otrs/';
  65.  
  66. # AdminEmail
  67. # (Email of the system admin.)
  68. $Self->{AdminEmail} = 'admin@example.com';
  69.  
  70. # Organization
  71. # (If this is anything other than '', then the email will have an
  72. # Organization X-Header)
  73. # $Self->{Organization} = 'Example Company';
  74. $Self->{Organization} = '';
  75.  
  76. # ProductName
  77. # (Application name displayed in frontend.)
  78. $Self->{ProductName} = 'OTRS';
  79.  
  80. # --------------------------------------------------- #
  81. # database settings #
  82. # --------------------------------------------------- #
  83. # DatabaseHost
  84. # (The database host.)
  85. $Self->{DatabaseHost} = 'localhost';
  86.  
  87. # Database
  88. # (The database name.)
  89. $Self->{Database} = 'otrs';
  90.  
  91. # DatabaseUser
  92. # (The database user.)
  93. $Self->{DatabaseUser} = 'otrs';
  94.  
  95. # DatabasePw
  96. # (The password of database user.)
  97. $Self->{DatabasePw} = 'some-pass';
  98.  
  99. # DatabaseDSN
  100. # (The database DSN for MySQL ==> more: "man DBD::mysql")
  101. $Self->{DatabaseDSN} = "DBI:mysql:database=<OTRS_CONFIG_Database>;host=<OTRS_CONFIG_DatabaseHost>;";
  102.  
  103. # (The database DSN for PostgreSQL ==> more: "man DBD::Pg")
  104. # $Self->{DatabaseDSN} = "DBI:Pg:dbname=<OTRS_CONFIG_Database>;host=<OTRS_CONFIG_DatabaseHost>;";
  105.  
  106. # (The database DSN for DBI:ODBC ==> more: "man DBD::ODBC")
  107. # $Self->{DatabaseDSN} = "DBI:ODBC:$Self->{Database}";
  108. # If you use ODBC, no database auto detection is possible,
  109. # so set the database type here. Possible: mysq,postgresql,mssql,oracle
  110. # $Self->{'Database::Type'} = 'mssql';
  111.  
  112. # (The database DSN for Oracle ==> more: "man DBD::oracle")
  113. # $Self->{DatabaseDSN} = "DBI:Oracle:sid=$Self->{Database};host=$Self->{DatabaseHost};port=1521;";
  114. # $Self->{DatabaseDSN} = "DBI:Oracle:sid=vingador;host=vingador;port=1521;";
  115. # if needed, oracle env settings
  116. # $ENV{ORACLE_HOME} = '/opt/ora9/product/9.2';
  117. # $ENV{ORACLE_HOME} = '/oracle/Ora92';
  118. # $ENV{NLS_DATE_FORMAT} = 'YYYY-MM-DD HH24:MI:SS';
  119. # $ENV{NLS_LANG} = "german_germany.utf8";
  120. # $ENV{NLS_LANG} = "german_germany.we8iso8859p15";
  121. # $ENV{NLS_LANG} = "american_america.we8iso8859p1";
  122.  
  123. # If you want to use an init sql after connect, use this here.
  124. # (e. g. can be used for mysql encoding between client and server)
  125. # $Self->{'Database::Connect'} = 'SET NAMES utf8';
  126.  
  127. # If you want to use the sql slow log feature, enable this here.
  128. # (To log every sql query which takes longer the 4 sec.)
  129. # $Self->{'Database::SlowLog'} = 0;
  130.  
  131. # --------------------------------------------------- #
  132. # default values #
  133. # (default values for GUIs) #
  134. # --------------------------------------------------- #
  135. # default valid
  136. $Self->{DefaultValid} = 'valid';
  137.  
  138. # DEPRECATED. Compatibilty setting for older 3.0 code.
  139. # Internal charset must always be utf-8.
  140. $Self->{DefaultCharset} = 'utf-8';
  141.  
  142. # default language
  143. # (the default frontend language) [default: en]
  144. $Self->{DefaultLanguage} = 'en';
  145.  
  146. # used languages
  147. # (short name = long name and file)
  148. $Self->{DefaultUsedLanguages} = {
  149. ar_SA => 'Arabic (Saudi Arabia)',
  150. bg => 'Bulgarian (&#x0411;&#x044a;&#x043b;&#x0433;&#x0430;&#x0440;&#x0441;&#x043a;&#x0438;)',
  151. ca => 'Catal&agrave;',
  152. cs => 'Czech (&#x010c;esky)',
  153. da => 'Dansk',
  154. de => 'Deutsch',
  155. en => 'English (United States)',
  156. en_CA => 'English (Canada)',
  157. en_GB => 'English (United Kingdom)',
  158. el => 'Greek (&#x0395;&#x03bb;&#x03bb;&#x03b7;&#x03bd;&#x03b9;&#x03ba;&#x03ac;)',
  159. es => 'Espa&ntilde;ol',
  160. es_CO => 'Espa&ntilde;ol (Colombia)',
  161. es_MX => 'Espa&ntilde;ol (M&eacute;xico)',
  162. et => 'Eesti',
  163. fa => 'Persian (&#x0641;&#x0627;&#x0631;&#x0633;&#x0649;)',
  164. fr => 'Fran&ccedil;ais',
  165. fr_CA => 'Fran&ccedil;ais (Canada)',
  166. fi => 'Suomi',
  167. hi => 'Hindi',
  168. hr => 'Hrvatski',
  169. hu => 'Magyar',
  170. it => 'Italiano',
  171. ja => 'Japanese (&#x65e5;&#x672c;&#x8a9e)',
  172. lt => 'Lietuvi&#371; kalba',
  173. lv => 'Latvijas',
  174. ms => 'Malay',
  175. nl => 'Nederlands',
  176. nb_NO => 'Norsk bokm&aring;l',
  177. pt_BR => 'Portugu&ecirc;s Brasileiro',
  178. pt => 'Portugu&ecirc;s',
  179. pl => 'Polski',
  180. ru => 'Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;)',
  181. sl => 'Slovenian (Sloven&#x0161;&#x010d;ina)',
  182. sk_SK => 'Slovak (Sloven&#x010d;ina)',
  183. sr_Cyrl => 'Serbian Latin (Srpski)',
  184. sr_Latn => 'Serbian Cyrillic (&#1089;&#1088;&#1087;&#1089;&#1082;&#1080;)',
  185. sv => 'Svenska',
  186. tr => 'T&uuml;rk&ccedil;e',
  187. uk => 'Ukrainian (&#x0423;&#x043a;&#x0440;&#x0430;&#x0457;&#x043d;&#x0441;&#x044c;&#x043a;&#x0430;)',
  188. vi_VN => 'Vietnam (Vi&#x0246;t Nam)',
  189. zh_CN => 'Chinese (Sim.) (&#x7b80;&#x4f53;&#x4e2d;&#x6587;)',
  190. zh_TW => 'Chinese (Tradi.) (&#x6b63;&#x9ad4;&#x4e2d;&#x6587;)',
  191.  
  192. # th => 'Thai (&#x0e44;&#x0e17;&#x0e22;)',
  193. # ro => 'Rom&acirc;n&auml;',
  194. # hr => 'Croatian',
  195. # jp => 'Japanese (&#x65e5;&#x672c;&#x8a9e;)',
  196. };
  197.  
  198. # default theme
  199. # (the default html theme) [default: Standard]
  200. $Self->{DefaultTheme} = 'Standard';
  201.  
  202. # DefaultTheme::HostBased
  203. # (set theme based on host name)
  204. # $Self->{'DefaultTheme::HostBased'} = {
  205. # 'host1\.example\.com' => 'SomeTheme1',
  206. # 'host2\.example\.com' => 'SomeTheme1',
  207. # };
  208.  
  209. # Frontend::WebPath
  210. # (URL base path of icons, CSS and Java Script.)
  211. $Self->{'Frontend::WebPath'} = '/otrs-web/';
  212.  
  213. # Frontend::JavaScriptPath
  214. # (URL JavaScript path.)
  215. $Self->{'Frontend::JavaScriptPath'} = '<OTRS_CONFIG_Frontend::WebPath>js/';
  216.  
  217. # Frontend::CSSPath
  218. # (URL CSS path.)
  219. $Self->{'Frontend::CSSPath'} = '<OTRS_CONFIG_Frontend::WebPath>css/';
  220.  
  221. # Frontend::ImagePath
  222. # (URL image path of icons for navigation.)
  223. $Self->{'Frontend::ImagePath'} = '<OTRS_CONFIG_Frontend::WebPath>skins/Agent/default/img/';
  224.  
  225. # DefaultViewNewLine
  226. # (insert new line in text messages after max x chars and
  227. # the next word)
  228. $Self->{DefaultViewNewLine} = 90;
  229.  
  230. # DefaultViewLines
  231. # (Max viewable lines in text messages (like ticket lines
  232. # in QueueZoom)
  233. $Self->{DefaultViewLines} = 6000;
  234.  
  235. # ShowAlwaysLongTime
  236. # (show always time in long /days hours minutes/ or short
  237. # /days hours/ format)
  238. $Self->{ShowAlwaysLongTime} = 0;
  239. $Self->{TimeShowAlwaysLong} = 0;
  240.  
  241. # TimeInputFormat
  242. # (default date input format) [Option|Input]
  243. $Self->{TimeInputFormat} = 'Option';
  244.  
  245. # AttachmentDownloadType
  246. # (if the tickets attachments will be opened in browser or just to
  247. # force the download) [attachment|inline]
  248. # $Self->{'AttachmentDownloadType'} = 'inline';
  249. $Self->{AttachmentDownloadType} = 'attachment';
  250.  
  251. # --------------------------------------------------- #
  252. # Check Settings
  253. # --------------------------------------------------- #
  254. # CheckEmailAddresses
  255. # (Check syntax of used email addresses)
  256. $Self->{CheckEmailAddresses} = 1;
  257.  
  258. # CheckMXRecord
  259. # (Check mx recorde of used email addresses)
  260. $Self->{CheckMXRecord} = 1;
  261.  
  262. # CheckEmailValidAddress
  263. # (regexp of valid email addresses)
  264. $Self->{CheckEmailValidAddress} = '^(root@localhost|admin@localhost)$';
  265.  
  266. # CheckEmailInvalidAddress
  267. # (regexp of invalid email addresses)
  268. $Self->{CheckEmailInvalidAddress} = '@(example)\.(..|...)$';
  269.  
  270. # --------------------------------------------------- #
  271. # LogModule #
  272. # --------------------------------------------------- #
  273. # (log backend module)
  274. $Self->{LogModule} = 'Kernel::System::Log::SysLog';
  275.  
  276. # $Self->{'LogModule'} = 'Kernel::System::Log::File';
  277.  
  278. # param for LogModule Kernel::System::Log::SysLog
  279. $Self->{'LogModule::SysLog::Facility'} = 'user';
  280.  
  281. # param for LogModule Kernel::System::Log::SysLog
  282. # (Depends on you sys log system environment. 'unix' is default, on
  283. # solaris you may need to use 'stream'.)
  284. $Self->{'LogModule::SysLog::LogSock'} = 'unix';
  285.  
  286. # param for LogModule Kernel::System::Log::SysLog
  287. # (if syslog can't work with utf-8, force the log
  288. # charset with this option, on other chars will be
  289. # replaces with ?)
  290. $Self->{'LogModule::SysLog::Charset'} = 'iso-8859-15';
  291.  
  292. # $Self->{'LogModule::SysLog::Charset'} = 'utf-8';
  293.  
  294. # param for LogModule Kernel::System::Log::File (required!)
  295. $Self->{'LogModule::LogFile'} = '/tmp/otrs.log';
  296.  
  297. # param if the date (yyyy-mm) should be added as suffix to
  298. # logfile [0|1]
  299. # $Self->{'LogModule::LogFile::Date'} = 0;
  300.  
  301. # system log cache size for admin system log (default 32k)
  302. # $Self->{'LogSystemCacheSize'} = 32 * 1024;
  303.  
  304. # --------------------------------------------------- #
  305. # SendmailModule
  306. # --------------------------------------------------- #
  307. # (Where is sendmail located and some options.
  308. # See 'man sendmail' for details. Or use the SMTP backend.)
  309. $Self->{SendmailModule} = 'Kernel::System::Email::Sendmail';
  310. $Self->{'SendmailModule::CMD'} = '/usr/sbin/sendmail -i -f ';
  311.  
  312. # $Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
  313. # $Self->{'SendmailModule::Host'} = 'mail.example.com';
  314. # $Self->{'SendmailModule::Port'} = '25';
  315. # $Self->{'SendmailModule::AuthUser'} = '';
  316. # $Self->{'SendmailModule::AuthPassword'} = '';
  317.  
  318. # SendmailBcc
  319. # (Send all outgoing email via bcc to...
  320. # Warning: use it only for external archive functions)
  321. $Self->{SendmailBcc} = '';
  322.  
  323. # SendmailNotificationEnvelopeFrom
  324. # Set a email address that is used as envelope from header in outgoing
  325. # notifications
  326. # $Self->{'SendmailNotificationEnvelopeFrom'} = '';
  327.  
  328. # --------------------------------------------------- #
  329. # authentication settings #
  330. # (enable what you need, auth against otrs db, #
  331. # against LDAP directory, agains HTTP basic auth #
  332. # or against Radius server) #
  333. # --------------------------------------------------- #
  334. # This is the auth. module againt the otrs db
  335. $Self->{AuthModule} = 'Kernel::System::Auth::DB';
  336.  
  337. # defines AuthSyncBackend (AuthSyncModule) for AuthModule
  338. # if this key exists and is empty, there won't be a sync.
  339. # example values: AuthSyncBackend, AuthSyncBackend2
  340. # $Self->{'AuthModule::UseSyncBackend'} = '';
  341.  
  342. # password crypt type (sha2|sha1|md5|crypt|plain)
  343. # $Self->{'AuthModule::DB::CryptType'} = 'md5';
  344.  
  345. # This is an example configuration for an LDAP auth. backend.
  346. # (take care that Net::LDAP is installed!)
  347. # $Self->{AuthModule} = 'Kernel::System::Auth::LDAP';
  348. # $Self->{'AuthModule::LDAP::Host'} = 'ldap.example.com';
  349. # $Self->{'AuthModule::LDAP::BaseDN'} = 'dc=example,dc=com';
  350. # $Self->{'AuthModule::LDAP::UID'} = 'uid';
  351.  
  352. # Check if the user is allowed to auth in a posixGroup
  353. # (e. g. user needs to be in a group xyz to use otrs)
  354. # $Self->{'AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
  355. # $Self->{'AuthModule::LDAP::AccessAttr'} = 'memberUid';
  356. # for ldap posixGroups objectclass (just uid)
  357. # $Self->{'AuthModule::LDAP::UserAttr'} = 'UID';
  358. # for non ldap posixGroups objectclass (with full user dn)
  359. # $Self->{'AuthModule::LDAP::UserAttr'} = 'DN';
  360.  
  361. # The following is valid but would only be necessary if the
  362. # anonymous user do NOT have permission to read from the LDAP tree
  363. # $Self->{'AuthModule::LDAP::SearchUserDN'} = '';
  364. # $Self->{'AuthModule::LDAP::SearchUserPw'} = '';
  365.  
  366. # in case you want to add always one filter to each ldap query, use
  367. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  368. # $Self->{'AuthModule::LDAP::AlwaysFilter'} = '';
  369.  
  370. # in case you want to add a suffix to each login name, then
  371. # you can use this option. e. g. user just want to use user but
  372. # in your ldap directory exists user@domain.
  373. # $Self->{'AuthModule::LDAP::UserSuffix'} = '@domain.com';
  374.  
  375. # In case you want to convert all given usernames to lower letters you
  376. # should activate this option. It might be helpfull if databases are
  377. # in use that do not distinguish selects for upper and lower case letters
  378. # (Oracle, postgresql). User might be synched twice, if this option
  379. # is not in use.
  380. # $Self->{'AuthModule::LDAP::UserLowerCase'} = 0;
  381.  
  382. # In case you need to use OTRS in iso-charset, you can define this
  383. # by using this option (converts utf-8 data from LDAP to iso).
  384. # $Self->{'AuthModule::LDAP::Charset'} = 'iso-8859-1';
  385.  
  386. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  387. # $Self->{'AuthModule::LDAP::Params'} = {
  388. # port => 389,
  389. # timeout => 120,
  390. # async => 0,
  391. # version => 3,
  392. # };
  393.  
  394. # Die if backend can't work, e. g. can't connect to server.
  395. # $Self->{'AuthModule::LDAP::Die'} = 1;
  396.  
  397. # This is an example configuration for an apache ($ENV{REMOTE_USER})
  398. # auth. backend. Use it if you want to have a singe login through
  399. # apache http-basic-auth.
  400. # $Self->{AuthModule} = 'Kernel::System::Auth::HTTPBasicAuth';
  401. # In case there is a leading domain in the REMOTE_USER, you can
  402. # replace it by the next config option.
  403. # $Self->{'AuthModule::HTTPBasicAuth::Replace'} = 'example_domain\\';
  404. # In case you need to replace some part of the REMOTE_USER, you can
  405. # use the following RegExp ($1 will be new login).
  406. # $Self->{'AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
  407. # Note:
  408. # If you use this module, you should use as fallback the following
  409. # config settings if user isn't login through apache ($ENV{REMOTE_USER}).
  410. # $Self->{LoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
  411. # $Self->{LogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
  412.  
  413. # This is example configuration to auth. agents against a radius server.
  414. # $Self->{'AuthModule'} = 'Kernel::System::Auth::Radius';
  415. # $Self->{'AuthModule::Radius::Host'} = 'radiushost';
  416. # $Self->{'AuthModule::Radius::Password'} = 'radiussecret';
  417.  
  418. # Die if backend can't work, e. g. can't connect to server.
  419. # $Self->{'AuthModule::Radius::Die'} = 1;
  420.  
  421. # --------------------------------------------------- #
  422. # authentication sync settings #
  423. # (enable agent data sync. after succsessful #
  424. # authentication) #
  425. # --------------------------------------------------- #
  426. # This is an example configuration for an LDAP auth sync. backend.
  427. # (take care that Net::LDAP is installed!)
  428. $Self->{'AuthSyncModule'} = 'Kernel::System::Auth::Sync::LDAP';
  429. $Self->{'AuthSyncModule::LDAP::Host'} = 'cns.domen.lcl';
  430. $Self->{'AuthSyncModule::LDAP::BaseDN'} = 'dc=domen,dc=lcl';
  431. $Self->{'AuthSyncModule::LDAP::UID'} = 'uid';
  432. $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'member';
  433. # The following is valid but would only be necessary if the
  434. # anonymous user do NOT have permission to read from the LDAP tree
  435. $Self->{'AuthSyncModule::LDAP::SearchUserDN'} = 'cn=otrsadmin,ou=OTRS,dc=domen,dc=lcl';
  436. $Self->{'AuthSyncModule::LDAP::SearchUserPw'} = '1qa2ws+!';
  437.  
  438. # in case you want to add always one filter to each ldap query, use
  439. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  440. # $Self->{'AuthSyncModule::LDAP::AlwaysFilter'} = '';
  441.  
  442. # AuthSyncModule::LDAP::UserSyncMap
  443. # (map if agent should create/synced from LDAP to DB after successful login)
  444. $Self->{'AuthSyncModule::LDAP::UserSyncMap'} = {
  445. # # DB -> LDAP
  446. UserFirstname => 'givenName',
  447. UserLastname => 'sn',
  448. UserEmail => 'mail',
  449. };
  450.  
  451. # In case you need to use OTRS in iso-charset, you can define this
  452. # by using this option (converts utf-8 data from LDAP to iso).
  453. # $Self->{'AuthSyncModule::LDAP::Charset'} = 'iso-8859-1';
  454.  
  455. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  456. # $Self->{'AuthSyncModule::LDAP::Params'} = {
  457. # port => 389,
  458. # timeout => 120,
  459. # async => 0,
  460. # version => 3,
  461. # };
  462.  
  463. # Die if backend can't work, e. g. can't connect to server.
  464. # $Self->{'AuthSyncModule::LDAP::Die'} = 1;
  465.  
  466. # Attributes needed for group syncs
  467. # (attribute name for group value key)
  468. # $Self->{'AuthSyncModule::LDAP::AccessAttr'} = 'memberUid';
  469. # (attribute for type of group content UID/DN for full ldap name)
  470. # $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'UID';
  471. # $Self->{'AuthSyncModule::LDAP::UserAttr'} = 'DN';
  472.  
  473. # AuthSyncModule::LDAP::UserSyncInitialGroups
  474. # (sync following group with rw permission after initial create of first agent
  475. # login)
  476. $Self->{'AuthSyncModule::LDAP::UserSyncInitialGroups'} = [
  477. 'users',
  478. ];
  479.  
  480. # AuthSyncModule::LDAP::UserSyncGroupsDefinition
  481. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  482. # groups to otrs groups, define the following.)
  483. # $Self->{'AuthSyncModule::LDAP::UserSyncGroupsDefinition'} = {
  484. # # ldap group
  485. # 'cn=agent,o=otrs' => {
  486. # # otrs group
  487. # 'admin' => {
  488. # # permission
  489. # rw => 1,
  490. # ro => 1,
  491. # },
  492. # 'faq' => {
  493. # rw => 0,
  494. # ro => 1,
  495. # },
  496. # },
  497. # 'cn=agent2,o=otrs' => {
  498. # 'users' => {
  499. # rw => 1,
  500. # ro => 1,
  501. # },
  502. # }
  503. # };
  504.  
  505. # AuthSyncModule::LDAP::UserSyncRolesDefinition
  506. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  507. # groups to otrs roles, define the following.)
  508. # $Self->{'AuthSyncModule::LDAP::UserSyncRolesDefinition'} = {
  509. # # ldap group
  510. # 'cn=agent,o=otrs' => {
  511. # # otrs role
  512. # 'role1' => 1,
  513. # 'role2' => 0,
  514. # },
  515. # 'cn=agent2,o=otrs' => {
  516. # 'role3' => 1,
  517. # }
  518. # };
  519.  
  520. # AuthSyncModule::LDAP::UserSyncAttributeGroupsDefinition
  521. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  522. # attributes to otrs groups, define the following.)
  523. # $Self->{'AuthSyncModule::LDAP::UserSyncAttributeGroupsDefinition'} = {
  524. # # ldap attribute
  525. # 'LDAPAttribute' => {
  526. # # ldap attribute value
  527. # 'LDAPAttributeValue1' => {
  528. # # otrs group
  529. # 'admin' => {
  530. # # permission
  531. # rw => 1,
  532. # ro => 1,
  533. # },
  534. # 'faq' => {
  535. # rw => 0,
  536. # ro => 1,
  537. # },
  538. # },
  539. # },
  540. # 'LDAPAttribute2' => {
  541. # 'LDAPAttributeValue' => {
  542. # 'users' => {
  543. # rw => 1,
  544. # ro => 1,
  545. # },
  546. # },
  547. # }
  548. # };
  549.  
  550. # AuthSyncModule::LDAP::UserSyncAttributeRolesDefinition
  551. # (If "LDAP" was selected for AuthModule and you want to sync LDAP
  552. # attributes to otrs roles, define the following.)
  553. # $Self->{'AuthSyncModule::LDAP::UserSyncAttributeRolesDefinition'} = {
  554. # # ldap attribute
  555. # 'LDAPAttribute' => {
  556. # # ldap attribute value
  557. # 'LDAPAttributeValue1' => {
  558. # # otrs role
  559. # 'role1' => 1,
  560. # 'role2' => 1,
  561. # },
  562. # },
  563. # 'LDAPAttribute2' => {
  564. # 'LDAPAttributeValue1' => {
  565. # 'role3' => 1,
  566. # },
  567. # },
  568. # };
  569.  
  570. # UserTable
  571. $Self->{DatabaseUserTable} = 'users';
  572. $Self->{DatabaseUserTableUserID} = 'id';
  573. $Self->{DatabaseUserTableUserPW} = 'pw';
  574. $Self->{DatabaseUserTableUser} = 'login';
  575.  
  576. # --------------------------------------------------- #
  577. # URL login and logout settings #
  578. # --------------------------------------------------- #
  579.  
  580. # LoginURL
  581. # (If this is anything other than '', then it is assumed to be the
  582. # URL of an alternate login screen which will be used in place of
  583. # the default one.)
  584. # $Self->{LoginURL} = '';
  585. # $Self->{LoginURL} = 'http://host.example.com/cgi-bin/login.pl';
  586.  
  587. # LogoutURL
  588. # (If this is anything other than '', it is assumed to be the URL
  589. # of an alternate logout page which users will be sent to when they
  590. # logout.)
  591. # $Self->{LogoutURL} = '';
  592. # $Self->{LogoutURL} = 'http://host.example.com/cgi-bin/login.pl';
  593.  
  594. # PreApplicationModule
  595. # (Used for every request, if defined, the PreRun() function of
  596. # this module will be used. This interface use useful to check
  597. # some user options or to redirect not accept new application
  598. # news)
  599. # $Self->{PreApplicationModule}->{AgentInfo} = 'Kernel::Modules::AgentInfo';
  600. # Kernel::Modules::AgentInfo check key, if this user preferences key
  601. # is true, then the message is already accepted
  602. # $Self->{InfoKey} = 'wpt22';
  603. # shown InfoFile located under Kernel/Output/HTML/Standard/AgentInfo.dtl
  604. # $Self->{InfoFile} = 'AgentInfo';
  605.  
  606. # --------------------------------------------------- #
  607. # Notification Settings
  608. # --------------------------------------------------- #
  609.  
  610. # agent interface notification module to check the admin user id
  611. # (don't work with user id 1 notification)
  612. $Self->{'Frontend::NotifyModule'}->{'200-UID-Check'} = {
  613. Module => 'Kernel::Output::HTML::NotificationUIDCheck',
  614. };
  615.  
  616. # show online agents
  617. # $Self->{'Frontend::NotifyModule'}->{'3-ShowAgentOnline'} = {
  618. # Module => 'Kernel::Output::HTML::NotificationAgentOnline',
  619. # ShowEmail => 1,
  620. # IdleMinutes => 60,
  621. # };
  622. # show online customers
  623. # $Self->{'Frontend::NotifyModule'}->{'4-ShowCustomerOnline'} = {
  624. # Module => 'Kernel::Output::HTML::NotificationCustomerOnline',
  625. # ShowEmail => 1,
  626. # IdleMinutes => 60,
  627. # };
  628.  
  629. # --------------------------------------------------- #
  630. # #
  631. # Start of config options!!! #
  632. # Session stuff #
  633. # #
  634. # --------------------------------------------------- #
  635.  
  636. # --------------------------------------------------- #
  637. # SessionModule #
  638. # --------------------------------------------------- #
  639. # (How should be the session-data stored?
  640. # Advantage of DB is that you can split the
  641. # Frontendserver from the db-server. fs is faster.)
  642. $Self->{SessionModule} = 'Kernel::System::AuthSession::DB';
  643.  
  644. # $Self->{SessionModule} = 'Kernel::System::AuthSession::FS';
  645.  
  646. # SessionName
  647. # (Name of the session key. E. g. Session, SessionID, OTRS)
  648. $Self->{SessionName} = 'Session';
  649.  
  650. # SessionCheckRemoteIP
  651. # (If the application is used via a proxy-farm then the
  652. # remote ip address is mostly different. In this case,
  653. # turn of the CheckRemoteID. ) [1|0]
  654. $Self->{SessionCheckRemoteIP} = 1;
  655.  
  656. # SessionDeleteIfNotRemoteID
  657. # (Delete session if the session id is used with an
  658. # invalied remote IP?) [0|1]
  659. $Self->{SessionDeleteIfNotRemoteID} = 1;
  660.  
  661. # SessionMaxTime
  662. # (Max valid time of one session id in second (8h = 28800).)
  663. $Self->{SessionMaxTime} = 16 * 60 * 60;
  664.  
  665. # SessionMaxIdleTime
  666. # (After this time (in seconds) without new http request, then
  667. # the user get logged off)
  668. $Self->{SessionMaxIdleTime} = 6 * 60 * 60;
  669.  
  670. # SessionDeleteIfTimeToOld
  671. # (Delete session's witch are requested and to old?) [0|1]
  672. $Self->{SessionDeleteIfTimeToOld} = 1;
  673.  
  674. # SessionUseCookie
  675. # (Should the session management use html cookies?
  676. # It's more comfortable to send links -==> if you have a valid
  677. # session, you don't have to login again.) [0|1]
  678. # Note: If the client browser disabled html cookies, the system
  679. # will work as usual, append SessionID to links!
  680. $Self->{SessionUseCookie} = 1;
  681.  
  682. # SessionUseCookieAfterBrowserClose
  683. # (store cookies in browser after closing a browser) [0|1]
  684. $Self->{SessionUseCookieAfterBrowserClose} = 0;
  685.  
  686. # SessionDir
  687. # directory for all sessen id information (just needed if
  688. # $Self->{SessionModule}='Kernel::System::AuthSession::FS)
  689. $Self->{SessionDir} = '<OTRS_CONFIG_Home>/var/sessions';
  690.  
  691. # SessionTable*
  692. # (just needed if $Self->{SessionModule}='Kernel::System::AuthSession::DB)
  693. # SessionTable
  694. $Self->{SessionTable} = 'sessions';
  695.  
  696. # --------------------------------------------------- #
  697. # Time Settings
  698. # --------------------------------------------------- #
  699. # TimeZone
  700. # (set the system time zone, default is local time)
  701. # $Self->{'TimeZone'} = 0;
  702.  
  703. # Time*
  704. # (Used for ticket age, escalation and system unlock calculation)
  705.  
  706. # TimeWorkingHours
  707. # (counted hours for working time used)
  708. $Self->{TimeWorkingHours} = {
  709. Mon => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  710. Tue => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  711. Wed => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  712. Thu => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  713. Fri => [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ],
  714. Sat => [],
  715. Sun => [],
  716. };
  717.  
  718. # TimeVacationDays
  719. # adde new days with:
  720. # "$Self->{TimeVacationDays}->{10}->{27} = 'Some Info';"
  721.  
  722. $Self->{TimeVacationDays} = {
  723. 1 => { 1 => 'New Year\'s Eve!', },
  724. 5 => { 1 => '1 St. May', },
  725. 12 => {
  726. 24 => 'Christmas',
  727. 25 => 'Christmas Day',
  728. 26 => 'Boxing Day',
  729. 31 => 'Silvester',
  730. },
  731. };
  732.  
  733. # TimeVacationDaysOneTime
  734. # adde new own days with:
  735. # "$Self->{TimeVacationDaysOneTime}->{1977}-{10}->{27} = 'Some Info';"
  736.  
  737. $Self->{TimeVacationDaysOneTime} = {
  738. # 2004 => {
  739. # 6 => {
  740. # 7 => 'Some Day',
  741. # },
  742. # 12 => {
  743. # 24 => 'Some A Day',
  744. # 31 => 'Some B Day',
  745. # },
  746. # },
  747. # 2005 => {
  748. # 1 => {
  749. # 11 => 'Some Day',
  750. # },
  751. # },
  752. };
  753.  
  754. # --------------------------------------------------- #
  755. # Web Settings
  756. # --------------------------------------------------- #
  757. # WebMaxFileUpload
  758. # (Max size for browser file uploads - default ~ 24 MB)
  759. $Self->{WebMaxFileUpload} = 24000000;
  760.  
  761. # WebUploadCacheModule
  762. # (select you WebUploadCacheModule module, default DB [DB|FS])
  763. $Self->{WebUploadCacheModule} = 'Kernel::System::Web::UploadCache::DB';
  764.  
  765. # $Self->{WebUploadCacheModule} = 'Kernel::System::Web::UploadCache::FS';
  766.  
  767. # CGILogPrefix
  768. $Self->{CGILogPrefix} = 'OTRS-CGI';
  769.  
  770. # --------------------------------------------------- #
  771. # Agent Web Interface
  772. # --------------------------------------------------- #
  773. # LostPassword
  774. # (use lost password feature)
  775. $Self->{LostPassword} = 1;
  776.  
  777. # ShowMotd
  778. # (show message of the day in login screen)
  779. $Self->{ShowMotd} = 0;
  780.  
  781. # DemoSystem
  782. # (If this is true, no agent preferences, like language and theme, via agent
  783. # frontend can be updated! Just for the current session. Alow no password can
  784. # be changed on agent frontend.)
  785. $Self->{DemoSystem} = 0;
  786.  
  787. # SwitchToUser
  788. # (Allow the admin to switch into a selected user session.)
  789. $Self->{SwitchToUser} = 0;
  790.  
  791. # --------------------------------------------------- #
  792. # MIME-Viewer for online to html converter
  793. # --------------------------------------------------- #
  794. # (e. g. xlhtml (xls2html), http://chicago.sourceforge.net/xlhtml/)
  795. # $Self->{'MIME-Viewer'}->{'application/excel'} = 'xlhtml';
  796. # MIME-Viewer for online to html converter
  797. # (e. g. wv (word2html), http://wvware.sourceforge.net/)
  798. # $Self->{'MIME-Viewer'}->{'application/msword'} = 'wvWare';
  799. # (e. g. pdftohtml (pdf2html), http://pdftohtml.sourceforge.net/)
  800. # $Self->{'MIME-Viewer'}->{'application/pdf'} = 'pdftohtml -stdout -i';
  801. # (e. g. xml2html (xml2html))
  802. # $Self->{'MIME-Viewer'}->{'text/xml'} = $Self->{Home}.'/scripts/tools/xml2html.pl';
  803.  
  804. # --------------------------------------------------- #
  805. # SpellChecker
  806. # --------------------------------------------------- #
  807. # (If ispell or aspell is available, then we will provide a spelling
  808. # checker.)
  809. # $Self->{SpellChecker} = 0;
  810. $Self->{SpellChecker} = 1;
  811. $Self->{SpellCheckerBin} = '/usr/bin/ispell';
  812. $Self->{SpellCheckerDictDefault} = 'english';
  813.  
  814. # SpellCheckerIgnore
  815. # (A list of ignored words.)
  816. $Self->{SpellCheckerIgnore} = [ 'www', 'webmail', 'https', 'http', 'html', 'rfc' ];
  817.  
  818. # --------------------------------------------------- #
  819. # directories #
  820. # --------------------------------------------------- #
  821. # root directory
  822. $Self->{Home} = '/opt/otrs';
  823.  
  824. # tmp dir
  825. $Self->{TempDir} = '<OTRS_CONFIG_Home>/var/tmp';
  826.  
  827. # html template dirs
  828. $Self->{TemplateDir} = '<OTRS_CONFIG_Home>/Kernel/Output';
  829. $Self->{CustomTemplateDir} = '<OTRS_CONFIG_Home>/Custom/Kernel/Output';
  830.  
  831. # --------------------------------------------------- #
  832. # CommonCSS #
  833. # --------------------------------------------------- #
  834.  
  835. # Customer Common CSS
  836. $Self->{'Loader::Customer::CommonCSS'}->{'000-Framework'} = [
  837. 'Core.Reset.css',
  838. 'Core.Default.css',
  839. 'Core.Form.css',
  840. 'Core.Login.css',
  841. 'Core.Control.css',
  842. 'Core.Table.css',
  843. 'Core.TicketZoom.css',
  844. 'Core.Print.css'
  845. ];
  846.  
  847. # Customer Common CSS for IE7
  848. $Self->{'Loader::Customer::CommonCSS::IE7'}->{'000-Framework'} = [
  849. 'Core.IE7.css'
  850. ];
  851. # Customer Common CSS for IE8
  852. $Self->{'Loader::Customer::CommonCSS::IE8'}->{'000-Framework'} = [];
  853.  
  854. # Agent Common CSS
  855. $Self->{'Loader::Agent::CommonCSS'}->{'000-Framework'} = [
  856. 'Core.Reset.css',
  857. 'Core.Default.css',
  858. 'Core.Header.css',
  859. 'Core.OverviewControl.css',
  860. 'Core.OverviewSmall.css',
  861. 'Core.OverviewMedium.css',
  862. 'Core.OverviewLarge.css',
  863. 'Core.Footer.css',
  864. 'Core.PageLayout.css',
  865. 'Core.Form.css',
  866. 'Core.Table.css',
  867. 'Core.Widget.css',
  868. 'Core.WidgetMenu.css',
  869. 'Core.TicketDetail.css',
  870. 'Core.Tooltip.css',
  871. 'Core.Dialog.css',
  872. 'Core.Print.css'
  873. ];
  874.  
  875. # Agent Common CSS for IE8
  876. $Self->{'Loader::Agent::CommonCSS::IE8'}->{'000-Framework'} = [
  877. 'Core.OverviewSmall.IE8.css'
  878. ];
  879.  
  880. # --------------------------------------------------- #
  881. # CommonJS #
  882. # --------------------------------------------------- #
  883.  
  884. # Customer Common JS
  885. $Self->{'Loader::Customer::CommonJS'}->{'000-Framework'} = [
  886. 'thirdparty/jquery-1.6.4/jquery.js',
  887. 'thirdparty/stacktrace-0.4/stacktrace.js',
  888. 'thirdparty/jquery-pubsub/pubsub.js',
  889. 'Core.Debug.js',
  890. 'Core.Exception.js',
  891. 'Core.Config.js',
  892. 'Core.App.js',
  893. 'Core.Customer.js',
  894. 'Core.JavaScriptEnhancements.js',
  895. 'Core.UI.RichTextEditor.js'
  896. ];
  897.  
  898. # Agent Common JS
  899. $Self->{'Loader::Agent::CommonJS'}->{'000-Framework'} = [
  900. 'thirdparty/json/json2.js',
  901. 'thirdparty/jquery-1.6.4/jquery.js',
  902. 'thirdparty/jquery-ui-1.8.21/jquery-ui.js',
  903. 'thirdparty/jquery-validate-1.10/jquery.validate.js',
  904. 'thirdparty/stacktrace-0.4/stacktrace.js',
  905. 'thirdparty/jquery-pubsub/pubsub.js',
  906. 'Core.JavaScriptEnhancements.js',
  907. 'Core.Debug.js',
  908. 'Core.Data.js',
  909. 'Core.Config.js',
  910. 'Core.Exception.js',
  911. 'Core.JSON.js',
  912. 'Core.AJAX.js',
  913. 'Core.App.js',
  914. 'Core.UI.js',
  915. 'Core.UI.IE7Fixes.js',
  916. 'Core.UI.Accordion.js',
  917. 'Core.UI.Datepicker.js',
  918. 'Core.UI.Resizable.js',
  919. 'Core.UI.Table.js',
  920. 'Core.UI.Accessibility.js',
  921. 'Core.UI.RichTextEditor.js',
  922. 'Core.Form.js',
  923. 'Core.Form.ErrorTooltips.js',
  924. 'Core.UI.Dialog.js',
  925. 'Core.Form.Validate.js',
  926. 'Core.UI.ActionRow.js',
  927. 'Core.UI.Popup.js',
  928. 'Core.Agent.js'
  929. ];
  930.  
  931. # --------------------------------------------------- #
  932. # #
  933. # package management options #
  934. # #
  935. # --------------------------------------------------- #
  936.  
  937. # Package::RepositoryRoot
  938. # (get online repository list, use the fist availabe result)
  939. $Self->{'Package::RepositoryRoot'} = [
  940. 'http://ftp.otrs.org/pub/otrs/misc/packages/repository.xml',
  941. 'http://otrs.org/repository.xml',
  942. ];
  943.  
  944. # Package::RepositoryList
  945. # (repository list)
  946. # $Self->{'Package::RepositoryList'} = {
  947. # 'ftp://ftp.example.com/pub/otrs/misc/packages/' => '[Example] ftp://ftp.example.com/',
  948. # };
  949.  
  950. # Package::Timeout
  951. # (http/ftp timeout to get packages)
  952. $Self->{'Package::Timeout'} = 15;
  953.  
  954. # Package::Proxy
  955. # (fetch packages via proxy)
  956. # $Self->{'Package::Proxy'} = 'http://proxy.sn.no:8001/';
  957.  
  958. # --------------------------------------------------- #
  959. # PGP settings (supports gpg) #
  960. # --------------------------------------------------- #
  961. $Self->{PGP} = 0;
  962. $Self->{'PGP::Bin'} = '/usr/bin/gpg';
  963. $Self->{'PGP::Options'} = '--homedir /opt/otrs/.gnupg/ --batch --no-tty --yes';
  964.  
  965. # $Self->{'PGP::Options'} = '--batch --no-tty --yes';
  966. # $Self->{'PGP::Key::Password'}->{'D2DF79FA'} = 1234;
  967. # $Self->{'PGP::Key::Password'}->{'488A0B8F'} = 1234;
  968.  
  969. # --------------------------------------------------- #
  970. # S/MIME settings (supports smime) #
  971. # --------------------------------------------------- #
  972. $Self->{SMIME} = 0;
  973.  
  974. # maybe openssl need a HOME env!
  975. #$ENV{HOME} = '/var/lib/wwwrun';
  976. $Self->{'SMIME::Bin'} = '/usr/bin/openssl';
  977.  
  978. # $Self->{'SMIME::CertPath'} = '/etc/ssl/certs';
  979. # $Self->{'SMIME::PrivatePath'} = '/etc/ssl/private';
  980.  
  981. # --------------------------------------------------- #
  982. # system permissions
  983. # --------------------------------------------------- #
  984. $Self->{'System::Permission'} = [ 'ro', 'rw' ];
  985. $Self->{'System::Customer::Permission'} = [ 'ro', 'rw' ];
  986.  
  987. # --------------------------------------------------- #
  988. # #
  989. # Start of config options!!! #
  990. # Preferences stuff #
  991. # #
  992. # --------------------------------------------------- #
  993.  
  994. # PreferencesTable*
  995. # (Stored preferences table data.)
  996. $Self->{PreferencesTable} = 'user_preferences';
  997. $Self->{PreferencesTableKey} = 'preferences_key';
  998. $Self->{PreferencesTableValue} = 'preferences_value';
  999. $Self->{PreferencesTableUserID} = 'user_id';
  1000.  
  1001. # PreferencesView
  1002. # (Order of shown items)
  1003. $Self->{PreferencesView} = [ 'User Profile', 'Email Settings', 'Other Settings' ];
  1004.  
  1005. $Self->{PreferencesGroups}->{Password} = {
  1006. Module => 'Kernel::Output::HTML::PreferencesPassword',
  1007. Column => 'Other Options',
  1008. Label => 'Change Password',
  1009. Prio => 1000,
  1010. Area => 'Agent',
  1011.  
  1012. # PasswordRegExp => '[a-z]|[A-z]|[0-9]|\.|;|,|:|-|\+|#|!|\$|&|\?',
  1013. PasswordRegExp => '',
  1014. PasswordMinSize => 0,
  1015. PasswordMin2Lower2UpperCharacters => 0,
  1016. PasswordMin2Characters => 0,
  1017. PasswordNeedDigit => 0,
  1018. Active => 1,
  1019. };
  1020. $Self->{PreferencesGroups}->{SpellDict} = {
  1021. Module => 'Kernel::Output::HTML::PreferencesGeneric',
  1022. Column => 'Other Options',
  1023. Label => 'Spelling Dictionary',
  1024. Desc => 'Select your default spelling dictionary.',
  1025. Data => {
  1026.  
  1027. # installed dict catalog (check your insalled catalogues, e. g. deutsch -=> german!)
  1028. # dict => frontend (ispell)
  1029. 'english' => 'English',
  1030. 'deutsch' => 'Deutsch',
  1031.  
  1032. # dict => frontend (aspell)
  1033. # 'english' => 'English',
  1034. # 'german' => 'Deutsch',
  1035. },
  1036. PrefKey => 'UserSpellDict',
  1037. Prio => 5000,
  1038. Active => 1,
  1039. };
  1040. $Self->{PreferencesGroups}->{Comment} = {
  1041. Module => 'Kernel::Output::HTML::PreferencesGeneric',
  1042. Column => 'Other Options',
  1043. Label => 'Comment',
  1044. Desc => 'Comment',
  1045. Block => 'Input',
  1046. Data => '$Env{"UserComment"}',
  1047. PrefKey => 'UserComment',
  1048. Prio => 6000,
  1049. Active => 0,
  1050. };
  1051.  
  1052. $Self->{PreferencesGroups}->{Language} = {
  1053. Module => 'Kernel::Output::HTML::PreferencesLanguage',
  1054. Column => 'Frontend',
  1055. Label => 'Language',
  1056. Desc => 'Select your frontend language.',
  1057. PrefKey => 'UserLanguage',
  1058. Prio => 1000,
  1059. Active => 1,
  1060. };
  1061. $Self->{PreferencesGroups}->{Theme} = {
  1062. Module => 'Kernel::Output::HTML::PreferencesTheme',
  1063. Column => 'Frontend',
  1064. Label => 'Theme',
  1065. Desc => 'Select your frontend Theme.',
  1066. PrefKey => 'UserTheme',
  1067. Prio => 2000,
  1068. Active => 1,
  1069. };
  1070.  
  1071. # --------------------------------------------------- #
  1072. # #
  1073. # Start of config options!!! #
  1074. # Notification stuff #
  1075. # #
  1076. # --------------------------------------------------- #
  1077.  
  1078. # notification sender
  1079. $Self->{NotificationSenderName} = 'OTRS Notification Master';
  1080. $Self->{NotificationSenderEmail} = 'otrs@<OTRS_CONFIG_FQDN>';
  1081.  
  1082. # notification email for new password
  1083. $Self->{NotificationSubjectLostPassword} = 'New OTRS Password!';
  1084. $Self->{NotificationBodyLostPassword} = "
  1085. Hi <OTRS_USERFIRSTNAME>,
  1086.  
  1087. you or someone impersonating you has requested to change your OTRS
  1088. password.
  1089.  
  1090. New Password: <OTRS_NEWPW>
  1091.  
  1092. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>index.pl
  1093.  
  1094. Your OTRS Notification Master
  1095. ";
  1096.  
  1097. # --------------------------------------------------- #
  1098. # #
  1099. # Start of config options!!! #
  1100. # CustomerPanel stuff #
  1101. # #
  1102. # --------------------------------------------------- #
  1103.  
  1104. # SessionName
  1105. # (Name of the session key. E. g. Session, SessionID, OTRS)
  1106. $Self->{CustomerPanelSessionName} = 'CSID';
  1107.  
  1108. # CustomerPanelUserID
  1109. # (The customer panel db-uid.) [default: 1]
  1110. $Self->{CustomerPanelUserID} = 1;
  1111.  
  1112. # CustomerGroupSupport (0 = compat. to OTRS 1.1 or lower)
  1113. # (if this is 1, the you need to set the group <-> customer user
  1114. # relations! http://host/otrs/index.pl?Action=AdminCustomerUserGroup
  1115. # otherway, each user is ro/rw in each group!)
  1116. $Self->{CustomerGroupSupport} = 0;
  1117.  
  1118. # CustomerGroupAlwaysGroups
  1119. # (if CustomerGroupSupport is true and you don't want to manage
  1120. # each customer user for this groups, then put the groups
  1121. # for all customer user in there)
  1122. $Self->{CustomerGroupAlwaysGroups} = [ 'users', 'info' ];
  1123.  
  1124. # show online agents
  1125. # $Self->{'CustomerFrontend::NotifyModule'}->{'1-ShowAgentOnline'} = {
  1126. # Module => 'Kernel::Output::HTML::NotificationAgentOnline',
  1127. # ShowEmail => 1,
  1128. # IdleMinutes => 60,
  1129. # };
  1130.  
  1131. # --------------------------------------------------- #
  1132. # login and logout settings #
  1133. # --------------------------------------------------- #
  1134. # CustomerPanelLoginURL
  1135. # (If this is anything other than '', then it is assumed to be the
  1136. # URL of an alternate login screen which will be used in place of
  1137. # the default one.)
  1138. # $Self->{CustomerPanelLoginURL} = '';
  1139. # $Self->{CustomerPanelLoginURL} = 'http://host.example.com/cgi-bin/login.pl';
  1140.  
  1141. # CustomerPanelLogoutURL
  1142. # (If this is anything other than '', it is assumed to be the URL
  1143. # of an alternate logout page which users will be sent to when they
  1144. # logout.)
  1145. # $Self->{CustomerPanelLogoutURL} = '';
  1146. # $Self->{CustomerPanelLogoutURL} = 'http://host.example.com/cgi-bin/login.pl';
  1147.  
  1148. # CustomerPanelPreApplicationModule
  1149. # (Used for every request, if defined, the PreRun() function of
  1150. # this module will be used. This interface use useful to check
  1151. # some user options or to redirect not accept new application
  1152. # news)
  1153. # $Self->{CustomerPanelPreApplicationModule}->{CustomerAccept} = 'Kernel::Modules::CustomerAccept';
  1154. # Kernel::Modules::CustomerAccept check key, if this user preferences key
  1155. # is true, then the message is already accepted
  1156. # $Self->{'CustomerPanel::InfoKey'} = 'CustomerAccept1';
  1157. # shown InfoFile located under Kernel/Output/HTML/Standard/CustomerAccept.dtl
  1158. # $Self->{'CustomerPanel::InfoFile'} = 'CustomerAccept';
  1159.  
  1160. # CustomerPanelLostPassword
  1161. # (use lost passowrd feature)
  1162. $Self->{CustomerPanelLostPassword} = 1;
  1163.  
  1164. # CustomerPanelCreateAccount
  1165. # (use create cutomer account self feature)
  1166. $Self->{CustomerPanelCreateAccount} = 1;
  1167.  
  1168. # --------------------------------------------------- #
  1169. # notification email about new password #
  1170. # --------------------------------------------------- #
  1171. $Self->{CustomerPanelSubjectLostPassword} = 'New OTRS Password!';
  1172. $Self->{CustomerPanelBodyLostPassword} = "
  1173. Hi <OTRS_USERFIRSTNAME>,
  1174.  
  1175. you or someone impersonating you has requested to change your OTRS
  1176. password.
  1177.  
  1178. New Password: <OTRS_NEWPW>
  1179.  
  1180. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl
  1181.  
  1182. Your OTRS Notification Master
  1183. ";
  1184.  
  1185. # --------------------------------------------------- #
  1186. # notification email about new account #
  1187. # --------------------------------------------------- #
  1188. $Self->{CustomerPanelSubjectNewAccount} = 'New OTRS Account!';
  1189. $Self->{CustomerPanelBodyNewAccount} = "
  1190. Hi <OTRS_USERFIRSTNAME>,
  1191.  
  1192. you or someone impersonating you has created a new OTRS account for
  1193. you (<OTRS_USERFIRSTNAME> <OTRS_USERLASTNAME>).
  1194.  
  1195. Login: <OTRS_USERLOGIN>
  1196. Password: <OTRS_USERPASSWORD>
  1197.  
  1198. <OTRS_CONFIG_HttpType>://<OTRS_CONFIG_FQDN>/<OTRS_CONFIG_ScriptAlias>customer.pl
  1199.  
  1200. Your OTRS Notification Master
  1201. ";
  1202.  
  1203. # --------------------------------------------------- #
  1204. # customer authentication settings #
  1205. # (enable what you need, auth against otrs db, #
  1206. # against a LDAP directory, against HTTP basic #
  1207. # authentication and against Radius server) #
  1208. # --------------------------------------------------- #
  1209. # This is the auth. module againt the otrs db
  1210. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::DB';
  1211. $Self->{'Customer::AuthModule::DB::Table'} = 'customer_user';
  1212. $Self->{'Customer::AuthModule::DB::CustomerKey'} = 'login';
  1213. $Self->{'Customer::AuthModule::DB::CustomerPassword'} = 'pw';
  1214.  
  1215. # $Self->{'Customer::AuthModule::DB::DSN'} = "DBI:mysql:database=customerdb;host=customerdbhost";
  1216. # $Self->{'Customer::AuthModule::DB::User'} = "some_user";
  1217. # $Self->{'Customer::AuthModule::DB::Password'} = "some_password";
  1218.  
  1219. # if you use odbc or you want to define a database type (without autodetection)
  1220. # $Self->{'Customer::AuthModule::DB::Type'} = 'mysql';
  1221.  
  1222. # password crypt type (md5|crypt|plain)
  1223. # $Self->{'Customer::AuthModule::DB::CryptType'} = 'md5';
  1224.  
  1225. # This is an example configuration for an LDAP auth. backend.
  1226. # (take care that Net::LDAP is installed!)
  1227. # $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  1228. # $Self->{'Customer::AuthModule::LDAP::Host'} = 'ldap.example.com';
  1229. # $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=example,dc=com';
  1230. # $Self->{'Customer::AuthModule::LDAP::UID'} = 'uid';
  1231. $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
  1232. $Self->{'Customer::AuthModule::LDAP::Host'} = 'cns.domen.lcl';
  1233. $Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dc=domen,dc=lcl';
  1234. $Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
  1235. $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'cn=otrsadmin,ou=OTRS,dc=domen,dc=lcl';
  1236. $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '1qa2ws+!';
  1237. # Check if the user is allowed to auth in a posixGroup
  1238. # (e. g. user needs to be in a group xyz to use otrs)
  1239. # $Self->{'Customer::AuthModule::LDAP::GroupDN'} = 'cn=otrsallow,ou=posixGroups,dc=example,dc=com';
  1240. # $Self->{'Customer::AuthModule::LDAP::AccessAttr'} = 'memberUid';
  1241. # for ldap posixGroups objectclass (just uid)
  1242. # $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'UID';
  1243. # for non ldap posixGroups objectclass (full user dn)
  1244. # $Self->{'Customer::AuthModule::LDAP::UserAttr'} = 'DN';
  1245.  
  1246. # The following is valid but would only be necessary if the
  1247. # anonymous user do NOT have permission to read from the LDAP tree
  1248. # $Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = '';
  1249. # $Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = '';
  1250.  
  1251. # in case you want to add always one filter to each ldap query, use
  1252. # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  1253. # $Self->{'Customer::AuthModule::LDAP::AlwaysFilter'} = '';
  1254.  
  1255. # in case you want to add a suffix to each customer login name, then
  1256. # you can use this option. e. g. user just want to use user but
  1257. # in your ldap directory exists user@domain.
  1258. # $Self->{'Customer::AuthModule::LDAP::UserSuffix'} = '@domain.com';
  1259.  
  1260. # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  1261. # $Self->{'Customer::AuthModule::LDAP::Params'} = {
  1262. # port => 389,
  1263. # timeout => 120,
  1264. # async => 0,
  1265. # version => 3,
  1266. # };
  1267.  
  1268. # Die if backend can't work, e. g. can't connect to server.
  1269. # $Self->{'Customer::AuthModule::LDAP::Die'} = 1;
  1270.  
  1271. # This is an example configuration for an apache ($ENV{REMOTE_USER})
  1272. # auth. backend. Use it if you want to have a singe login through
  1273. # apache http-basic-auth
  1274. # $Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
  1275.  
  1276. # In case there is a leading domain in the REMOTE_USER, you can
  1277. # replace it by the next config option.
  1278. # $Self->{'Customer::AuthModule::HTTPBasicAuth::Replace'} = 'example_domain\\';
  1279. # Note:
  1280. # In case you need to replace some part of the REMOTE_USER, you can
  1281. # use the following RegExp ($1 will be new login).
  1282. # $Self->{'Customer::AuthModule::HTTPBasicAuth::ReplaceRegExp'} = '^(.+?)@.+?$';
  1283. # If you use this module, you should use as fallback the following
  1284. # config settings if user isn't login through apache ($ENV{REMOTE_USER})
  1285. # $Self->{CustomerPanelLoginURL} = 'http://host.example.com/not-authorised-for-otrs.html';
  1286. # $Self->{CustomerPanelLogoutURL} = 'http://host.example.com/thanks-for-using-otrs.html';
  1287.  
  1288. # This is example configuration to auth. agents against a radius server
  1289. # $Self->{'Customer::AuthModule'} = 'Kernel::System::Auth::Radius';
  1290. # $Self->{'Customer::AuthModule::Radius::Host'} = 'radiushost';
  1291. # $Self->{'Customer::AuthModule::Radius::Password'} = 'radiussecret';
  1292.  
  1293. # --------------------------------------------------- #
  1294. # #
  1295. # Start of config options!!! #
  1296. # CustomerUser stuff #
  1297. # #
  1298. # --------------------------------------------------- #
  1299.  
  1300. # CustomerUser
  1301. # (customer user database backend and settings)
  1302. $Self->{CustomerUser} = {
  1303. Name => 'Database Backend',
  1304. Module => 'Kernel::System::CustomerUser::DB',
  1305. Params => {
  1306. # if you want to use an external database, add the
  1307. # required settings
  1308. # DSN => 'DBI:odbc:yourdsn',
  1309. # Type => 'mssql', # only for ODBC connections
  1310. # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
  1311. # User => '',
  1312. # Password => '',
  1313. Table => 'customer_user',
  1314. # if your frontend is unicode and the charset of your
  1315. # customer database server is iso-8859-1, use these options.
  1316. # SourceCharset => 'iso-8859-1',
  1317. # DestCharset => 'utf-8',
  1318.  
  1319. # CaseSensitive will control if the SQL statements need LOWER()
  1320. # function calls to work case insensitively. Setting this to
  1321. # 1 will improve performance dramatically on large databases.
  1322. CaseSensitive => 0,
  1323. },
  1324.  
  1325. # customer unique id
  1326. CustomerKey => 'login',
  1327.  
  1328. # customer #
  1329. CustomerID => 'customer_id',
  1330. CustomerValid => 'valid_id',
  1331. CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],
  1332.  
  1333. # CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
  1334. CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ],
  1335. CustomerUserSearchPrefix => '*',
  1336. CustomerUserSearchSuffix => '*',
  1337. CustomerUserSearchListLimit => 250,
  1338. CustomerUserPostMasterSearchFields => ['email'],
  1339. CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ],
  1340. CustomerUserEmailUniqCheck => 1,
  1341.  
  1342. # # show now own tickets in customer panel, CompanyTickets
  1343. # CustomerUserExcludePrimaryCustomerID => 0,
  1344. # # generate auto logins
  1345. # AutoLoginCreation => 0,
  1346. # # generate auto login prefix
  1347. # AutoLoginCreationPrefix => 'auto',
  1348. # # admin can change customer preferences
  1349. # AdminSetPreferences => 1,
  1350. # # use customer company support (reference to company, See CustomerCompany settings)
  1351. # CustomerCompanySupport => 1,
  1352. # cache time to live in sec. - cache any database queries
  1353. CacheTTL => 60 * 60 * 24,
  1354. # # just a read only source
  1355. # ReadOnly => 1,
  1356. Map => [
  1357.  
  1358. # note: Login, Email and CustomerID needed!
  1359. # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
  1360. [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
  1361. [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
  1362. [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
  1363. [ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
  1364. [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
  1365. [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
  1366. # [ 'UserEmail', 'Email', 'email', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
  1367. [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
  1368. # [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
  1369. [ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
  1370. [ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
  1371. [ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
  1372. [ 'UserStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
  1373. [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
  1374. [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ],
  1375. [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
  1376. [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
  1377. [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
  1378. ],
  1379.  
  1380. # default selections
  1381. Selections => {
  1382.  
  1383. # UserTitle => {
  1384. # 'Mr.' => 'Mr.',
  1385. # 'Mrs.' => 'Mrs.',
  1386. # },
  1387. },
  1388. };
  1389.  
  1390. # CustomerUser
  1391. # (customer user ldap backend and settings)
  1392. $Self->{CustomerUser} = {
  1393. Name => 'LDAP Backend',
  1394. Module => 'Kernel::System::CustomerUser::LDAP',
  1395. Params => {
  1396. # # ldap host
  1397. Host => 'cns.domen.lcl',
  1398. # # ldap base dn
  1399. BaseDN => 'dc=domen,dc=lcl',
  1400. # # search scope (one|sub)
  1401. SSCOPE => 'sub',
  1402. # # The following is valid but would only be necessary if the
  1403. # # anonymous user does NOT have permission to read from the LDAP tree
  1404. UserDN => 'cn=otrsadmin,ou=OTRS,dc=domen,dc=lcl',
  1405. UserPw => '1qa2ws+!',
  1406. # # in case you want to add always one filter to each ldap query, use
  1407. # # this option. e. g. AlwaysFilter => '(mail=*)' or AlwaysFilter => '(objectclass=user)'
  1408. AlwaysFilter => '(&(objectcategory=person)(objectclass=user)(mail=*)(!(description=built-In))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))',
  1409. SourceCharset => 'utf-8',
  1410. DestCharset => 'utf-8',
  1411. },
  1412.  
  1413.  
  1414.  
  1415. ReadOnly => 1,
  1416. CustomerKey => 'sAMAccountName',
  1417. CustomerID => 'mail',
  1418. CustomerUserListFields => ['givenname', 'sn', 'mail'],
  1419. CustomerUserSearchFields => ['displayName','sAMAccountName','givenName', 'sn', 'mail','description'],
  1420. CustomerUserSearchPrefix => '',
  1421. CustomerUserSearchSuffix => '*',
  1422. CustomerUserPostMasterSearchFields => ['displayName','sAMAccountName','givenName','sn','mail','description'],
  1423. CustomerUserNameFields => ['givenname', 'sn'],
  1424. CustomerUserExcludePrimaryCustomerID => 0,
  1425. CacheTTL => 120,
  1426. Map => [
  1427. [ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
  1428. [ 'UserFirstname', 'Firstname', 'givenName', 1, 1, 'var' ],
  1429. [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
  1430. [ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
  1431. [ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
  1432. [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
  1433. [ 'UserPhone', 'Phone', 'telephoneNumber', 1, 0, 'var' ],
  1434. [ 'UserAddress', 'Address', 'postalAddress', 1, 0, 'var' ],
  1435. [ 'UserStreet', 'Street', 'streetAddress', 1, 0, 'var' ],
  1436. [ 'UserCity', 'City', 'l', 1, 0, 'var' ],
  1437. [ 'UserZip', 'ZIP', 'postalCode', 1, 0, 'var' ],
  1438. [ 'UserCountry', 'Country', 'co', 1, 0, 'var' ],
  1439. [ 'UserComment', 'Comment', 'wWWHomePage', 1, 0, 'var' ],
  1440. ],
  1441. };
  1442. # AlwaysFilter => '',
  1443. # # if both your frontend and your LDAP are unicode, use this:
  1444. # SourceCharset => 'utf-8',
  1445. # DestCharset => 'utf-8',
  1446. # # if your frontend is unicode and the charset of your
  1447. # # ldap server is iso-8859-1, use these options.
  1448. # # SourceCharset => 'iso-8859-1',
  1449. # # DestCharset => 'utf-8',
  1450. # # die if backend can't work, e. g. can't connect to server
  1451. # Die => 0,
  1452. # # Net::LDAP new params (if needed - for more info see perldoc Net::LDAP)
  1453. # Params => {
  1454. # port => 389,
  1455. # timeout => 120,
  1456. # async => 0,
  1457. # version => 3,
  1458. # },
  1459. # },
  1460. # # customer unique id
  1461. # CustomerKey => 'uid',
  1462. # # customer #
  1463. # CustomerID => 'mail',
  1464. # CustomerUserListFields => ['cn', 'mail'],
  1465. # CustomerUserSearchFields => ['uid', 'cn', 'mail'],
  1466. # CustomerUserSearchPrefix => '',
  1467. # CustomerUserSearchSuffix => '*',
  1468. # CustomerUserSearchListLimit => 250,
  1469. # CustomerUserPostMasterSearchFields => ['mail'],
  1470. # CustomerUserNameFields => ['givenname', 'sn'],
  1471. # # show now own tickets in customer panel, CompanyTickets
  1472. # CustomerUserExcludePrimaryCustomerID => 0,
  1473. # # add a ldap filter for valid users (expert setting)
  1474. # # CustomerUserValidFilter => '(!(description=gesperrt))',
  1475. # # admin can't change customer preferences
  1476. # AdminSetPreferences => 0,
  1477. # # cache time to live in sec. - cache any ldap queries
  1478. # CacheTTL => 0,
  1479. # Map => [
  1480. # # note: Login, Email and CustomerID needed!
  1481. # # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
  1482. # [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
  1483. # [ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var', '', 0 ],
  1484. # [ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var', '', 0 ],
  1485. # [ 'UserLogin', 'Username', 'uid', 1, 1, 'var', '', 0 ],
  1486. # [ 'UserEmail', 'Email', 'mail', 1, 1, 'var', '', 0 ],
  1487. # [ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var', '', 0 ],
  1488. # # [ 'UserCustomerIDs', 'CustomerIDs', 'second_customer_ids', 1, 0, 'var', '', 0 ],
  1489. # [ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var', '', 0 ],
  1490. # [ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var', '', 0 ],
  1491. # [ 'UserComment', 'Comment', 'description', 1, 0, 'var', '', 0 ],
  1492. # ],
  1493. # };
  1494.  
  1495. $Self->{CustomerCompany} = {
  1496. Params => {
  1497. # if you want to use an external database, add the
  1498. # required settings
  1499. # DSN => 'DBI:odbc:yourdsn',
  1500. # Type => 'mssql', # only for ODBC connections
  1501. # DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
  1502. # User => '',
  1503. # Password => '',
  1504. Table => 'customer_company',
  1505. # ForeignDB => 0, # set this to 1 if your table does not have create_time, create_by, change_time and change_by fields
  1506.  
  1507. # CaseSensitive will control if the SQL statements need LOWER()
  1508. # function calls to work case insensitively. Setting this to
  1509. # 1 will improve performance dramatically on large databases.
  1510. CaseSensitive => 0,
  1511. },
  1512.  
  1513. # company unique id
  1514. CustomerCompanyKey => 'customer_id',
  1515. CustomerCompanyValid => 'valid_id',
  1516. CustomerCompanyListFields => [ 'customer_id', 'name' ],
  1517. CustomerCompanySearchFields => ['customer_id', 'name'],
  1518. CustomerCompanySearchPrefix => '',
  1519. CustomerCompanySearchSuffix => '*',
  1520. CustomerCompanySearchListLimit => 250,
  1521. CacheTTL => 60 * 60 * 24, # use 0 to turn off cache
  1522.  
  1523. Map => [
  1524. # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
  1525. [ 'CustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],
  1526. [ 'CustomerCompanyName', 'Company', 'name', 1, 1, 'var', '', 0 ],
  1527. [ 'CustomerCompanyStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
  1528. [ 'CustomerCompanyZIP', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
  1529. [ 'CustomerCompanyCity', 'City', 'city', 1, 0, 'var', '', 0 ],
  1530. [ 'CustomerCompanyCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
  1531. [ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
  1532. [ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
  1533. [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
  1534. ],
  1535. };
  1536.  
  1537. # --------------------------------------------------- #
  1538. # misc
  1539. # --------------------------------------------------- #
  1540. # yes / no options
  1541. $Self->{YesNoOptions} = {
  1542. 1 => 'Yes',
  1543. 0 => 'No',
  1544. };
  1545.  
  1546. # --------------------------------------------------- #
  1547. # default core objects and params in frontend
  1548. # --------------------------------------------------- #
  1549. $Self->{'Frontend::CommonObject'} = {
  1550.  
  1551. # key => module
  1552. # SomeObject => 'Kernel::System::Some',
  1553. };
  1554. $Self->{'Frontend::CommonParam'} = {
  1555.  
  1556. # param => default value
  1557. # SomeParam => 'DefaultValue',
  1558. Action => 'AdminInit',
  1559. };
  1560.  
  1561. # --------------------------------------------------- #
  1562. # default core objects and params in customer frontend
  1563. # --------------------------------------------------- #
  1564. $Self->{'CustomerFrontend::CommonObject'} = {
  1565.  
  1566. # key => module
  1567. # SomeObject => 'Kernel::System::Some',
  1568. };
  1569. $Self->{'CustomerFrontend::CommonParam'} = {
  1570.  
  1571. # param => default value
  1572. # SomeParam => 'DefaultValue',
  1573. };
  1574.  
  1575. # --------------------------------------------------- #
  1576. # default core objects and params in public frontend
  1577. # --------------------------------------------------- #
  1578. $Self->{'PublicFrontend::CommonObject'} = {
  1579.  
  1580. # key => module
  1581. # SomeObject => 'Kernel::System::Some',
  1582. };
  1583. $Self->{'PublicFrontend::CommonParam'} = {
  1584.  
  1585. # param => default value
  1586. # SomeParam => 'DefaultValue',
  1587. };
  1588.  
  1589. # --------------------------------------------------- #
  1590. # Frontend Module Registry (Agent)
  1591. # --------------------------------------------------- #
  1592. # Module (from Kernel/Modules/*.pm) => Group
  1593.  
  1594. # admin interface
  1595. $Self->{'Frontend::Module'}->{Admin} = {
  1596. Group => ['admin'],
  1597. Description => 'Admin-Area',
  1598. Title => '',
  1599. NavBarName => 'Admin',
  1600. NavBar => [
  1601. { Description => 'Admin-Area',
  1602. Type => 'Menu',
  1603. Block => 'ItemArea',
  1604. Name => 'Admin',
  1605. Image => 'admin.png',
  1606. Link => 'Action=Admin',
  1607. NavBar => 'Admin',
  1608. Prio => 10000,
  1609. AccessKey => 'a',
  1610. },
  1611. ],
  1612. NavBarModule => { Module => 'Kernel::Output::HTML::NavBarModuleAdmin', },
  1613. };
  1614. $Self->{'Frontend::Module'}->{AdminInit} = {
  1615. Group => ['admin'],
  1616. Description => 'Admin',
  1617. Title => 'Init',
  1618. };
  1619. $Self->{'Frontend::Module'}->{AdminLog} = {
  1620. Group => ['admin'],
  1621. Description => 'Admin',
  1622. Title => 'System Log',
  1623. NavBarName => 'Admin',
  1624. NavBarModule => {
  1625. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1626. Name => 'System Log',
  1627. Block => 'Block4',
  1628. Prio => 600,
  1629. },
  1630. };
  1631. $Self->{'Frontend::Module'}->{AdminSysConfig} = {
  1632. Group => ['admin'],
  1633. Description => 'Admin',
  1634. Title => 'SysConfig',
  1635. NavBarName => 'Admin',
  1636. NavBarModule => {
  1637. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1638. Name => 'SysConfig',
  1639. Description => 'Edit the system configuration settings.',
  1640. Block => 'System',
  1641. Prio => 800,
  1642. },
  1643. Loader => {
  1644. CSS => [
  1645. 'Core.Agent.Admin.SysConfig.css',
  1646. ],
  1647. JavaScript => [
  1648. 'Core.Agent.Admin.SysConfig.js',
  1649. ],
  1650. },
  1651. };
  1652. $Self->{'Frontend::Module'}->{AdminPackageManager} = {
  1653. Group => ['admin'],
  1654. Description => 'Software Package Manager',
  1655. Title => 'Package Manager',
  1656. NavBarName => 'Admin',
  1657. NavBarModule => {
  1658. Module => 'Kernel::Output::HTML::NavBarModuleAdmin',
  1659. Name => 'Package Manager',
  1660. Block => 'Block4',
  1661. Prio => 1000,
  1662. },
  1663. };
  1664. # specify Loader settings for Login screens
  1665. $Self->{'Frontend::Module'}->{Login} = {
  1666. Loader => {
  1667. JavaScript => [
  1668. 'Core.Agent.Login.js',
  1669. ],
  1670. },
  1671. };
  1672. $Self->{'CustomerFrontend::Module'}->{CustomerLogin} = {
  1673. Loader => {
  1674. JavaScript => [
  1675. 'Core.Customer.Login.js',
  1676. ],
  1677. },
  1678. };
  1679.  
  1680. # specify Loader settings for the installer
  1681. $Self->{'Frontend::Module'}->{Installer} = {
  1682. Loader => {
  1683. JavaScript => [
  1684. 'Core.Installer.js',
  1685. ],
  1686. CSS => [
  1687. 'Core.Installer.css'
  1688. ],
  1689. },
  1690. };
  1691. # --------------------------------------------------- #
  1692. return;
  1693. }
  1694.  
  1695. sub Get {
  1696. my ( $Self, $What ) = @_;
  1697.  
  1698. # debug
  1699. if ( $Self->{Debug} > 1 ) {
  1700. my $Value = defined $Self->{$What} ? $Self->{$What} : '<undef>';
  1701. print STDERR "Debug: Config.pm ->Get('$What') --> $Value\n";
  1702. }
  1703.  
  1704. return $Self->{$What};
  1705. }
  1706.  
  1707. sub Set {
  1708. my ( $Self, %Param ) = @_;
  1709.  
  1710. for (qw(Key)) {
  1711. if ( !defined $Param{$_} ) {
  1712. $Param{$_} = '';
  1713. }
  1714. }
  1715.  
  1716. # debug
  1717. if ( $Self->{Debug} > 1 ) {
  1718. my $Value = defined $Param{Value} ? $Param{Value} : '<undef>';
  1719. print STDERR "Debug: Config.pm ->Set(Key => $Param{Key}, Value => $Value)\n";
  1720. }
  1721.  
  1722. # set runtime config option
  1723. if ( $Param{Key} =~ /^(.+?)###(.+?)$/ ) {
  1724. if ( !defined $Param{Value} ) {
  1725. delete $Self->{$1}->{$2};
  1726. }
  1727. else {
  1728. $Self->{$1}->{$2} = $Param{Value};
  1729. }
  1730. }
  1731. else {
  1732. if ( !defined $Param{Value} ) {
  1733. delete $Self->{ $Param{Key} };
  1734. }
  1735. else {
  1736. $Self->{ $Param{Key} } = $Param{Value};
  1737. }
  1738. }
  1739. return 1;
  1740. }
  1741.  
  1742. #
  1743. # ConfigChecksum
  1744. #
  1745. # This function returns an MD5 sum that is generated from all available
  1746. # config files (Kernel/Config.pm, Kernel/Config/Defaults.pm, Kernel/Config/Files/*.(pm|xml) except ZZZAAuto.pm) and their
  1747. # modification timestamps. Whenever a file is changed, added or removed,
  1748. # this checksum will change.
  1749. #
  1750. sub ConfigChecksum {
  1751. my $Self = shift;
  1752.  
  1753. my @Files = glob( $Self->{Home} . "/Kernel/Config/Files/*.pm");
  1754.  
  1755. # Ignore ZZZAAuto.pm, because this is only a cached version of the XML files which
  1756. # will be in the checksum. Otherwise the SysConfig cannot use its cache files.
  1757. @Files = grep { $_!~ m/ZZZAAuto\.pm$/smx } @Files;
  1758.  
  1759. push @Files, glob( $Self->{Home} . "/Kernel/Config/Files/*.xml");
  1760. push @Files, $Self->{Home} . "/Kernel/Config/Defaults.pm" ;
  1761. push @Files, $Self->{Home} . "/Kernel/Config.pm";
  1762.  
  1763. # Create a string with filenames and file mtimes of the config files
  1764. my $ConfigString;
  1765. for my $File (@Files) {
  1766.  
  1767. # get file metadata
  1768. my $Stat = stat( $File );
  1769.  
  1770. if ( !$Stat ) {
  1771. print STDERR "Error: cannot stat file '$File': $!";
  1772. return;
  1773. }
  1774.  
  1775. $ConfigString .= $File . $Stat->mtime();
  1776. }
  1777.  
  1778. return Digest::MD5::md5_hex( $ConfigString );
  1779. }
  1780.  
  1781. sub new {
  1782. my ( $Type, %Param ) = @_;
  1783.  
  1784. # allocate new hash for object
  1785. my $Self = {};
  1786. bless( $Self, $Type );
  1787.  
  1788. # 0=off; 1=log if there exists no entry; 2=log all;
  1789. $Self->{Debug} = 0;
  1790.  
  1791. # return on clear level
  1792. if ( $Param{Level} && $Param{Level} eq 'Clear' ) {
  1793.  
  1794. # load config
  1795. $Self->Load();
  1796. return $Self;
  1797. }
  1798.  
  1799. # load defaults
  1800. $Self->LoadDefaults();
  1801.  
  1802. # load config
  1803. $Self->Load();
  1804.  
  1805. # load extra config files
  1806. if ( -e "$Self->{Home}/Kernel/Config/Files/" ) {
  1807. my @Files = glob("$Self->{Home}/Kernel/Config/Files/*.pm");
  1808.  
  1809. # sort
  1810. my @NewFileOrderPre = ();
  1811. my @NewFileOrderPost = ();
  1812. for my $File (@Files) {
  1813. if ( $File =~ /Ticket/ ) {
  1814. push @NewFileOrderPre, $File;
  1815. }
  1816. else {
  1817. push @NewFileOrderPost, $File;
  1818. }
  1819. }
  1820. @Files = ( @NewFileOrderPre, @NewFileOrderPost );
  1821. for my $File (@Files) {
  1822.  
  1823. # do not use ZZZ files
  1824. if ( $Param{Level} && $Param{Level} eq 'Default' && $File =~ /ZZZ/ ) {
  1825. next;
  1826. }
  1827.  
  1828. # check config file format - use 1.0 as eval string, 1.1 as require or do
  1829. my $FileFormat = 1;
  1830. my $ConfigFile = '';
  1831. ## no critic
  1832. if ( open( my $In, '<', $File ) ) {
  1833. ## use critic
  1834.  
  1835. # only try to find # VERSION:1.1 in the first 8 lines
  1836. my $TryCount = 0;
  1837. while ( my $Line = <$In> ) {
  1838. if ($Line =~ /^\Q# VERSION:1.1\E/) {
  1839. $FileFormat = 1.1;
  1840. last;
  1841. }
  1842.  
  1843. $TryCount++;
  1844. if ( $TryCount >= 8 ) {
  1845. last;
  1846. }
  1847. }
  1848. close($In);
  1849.  
  1850. # read file format 1.0 - file as string
  1851. if ( $FileFormat == 1 ) {
  1852. open( my $In, '<', $File );
  1853. $ConfigFile = do {local $/; <$In>};
  1854. close $In;
  1855. }
  1856. }
  1857. else {
  1858. print STDERR "ERROR: $!: $File\n";
  1859. }
  1860.  
  1861. # use file format of config file
  1862. if ( $FileFormat == 1.1 ) {
  1863.  
  1864. # check if mod_perl is used
  1865. my $Require = 1;
  1866. if ( exists $ENV{MOD_PERL} ) {
  1867.  
  1868. # if mod_perl 2.x is used, check if Apache::Reload is use
  1869. # on win32 Apache::Reload is not working correctly, so do also use "do"
  1870. my $OS = $^O;
  1871. ## no critic
  1872. if ( $mod_perl::VERSION >= 1.99 && $OS ne 'MSWin32') {
  1873. ## use critic
  1874. my $ApacheReload = 0;
  1875. for my $Module ( sort keys %INC ) {
  1876. $Module =~ s/\//::/g;
  1877. $Module =~ s/\.pm$//g;
  1878. if ( $Module eq 'Apache::Reload' || $Module eq 'Apache2::Reload' ) {
  1879. $ApacheReload = 1;
  1880. last;
  1881. }
  1882. }
  1883. if ( !$ApacheReload ) {
  1884. $Require = 0;
  1885. }
  1886. }
  1887.  
  1888. # if mod_perl 1.x is used, do not use require
  1889. else {
  1890. $Require = 0;
  1891. }
  1892. }
  1893.  
  1894. # if require is usable, use it (because of better performance,
  1895. # if not, use do to do it on runtime)
  1896. ## no critic
  1897. if ( $Require ) {
  1898. if (! require $File ) {
  1899. die "ERROR: $!\n";
  1900. }
  1901. }
  1902. else {
  1903. if (! do $File ) {
  1904. die "ERROR: $!\n";
  1905. }
  1906. }
  1907. ## use critic
  1908.  
  1909. # prepare file
  1910. $File =~ s/\Q$Self->{Home}\E//g;
  1911. $File =~ s/^\///g;
  1912. $File =~ s/\/\//\//g;
  1913. $File =~ s/\//::/g;
  1914. $File =~ s/.pm//g;
  1915. $File->Load($Self);
  1916. }
  1917. else {
  1918.  
  1919. # use eval for old file format
  1920. if ($ConfigFile) {
  1921. if ( !eval $ConfigFile ) { ## no critic
  1922. print STDERR "ERROR: Syntax error in $File: $@\n";
  1923. }
  1924.  
  1925. # print STDERR "Notice: Loaded: $File\n";
  1926. }
  1927. }
  1928. }
  1929. }
  1930.  
  1931. # load RELEASE file
  1932. if ( -e ! "$Self->{Home}/RELEASE" ) {
  1933. print STDERR "ERROR: $Self->{Home}/RELEASE does not exist! This file is needed by central system parts of OTRS, the system will not work without this file.\n";
  1934. die;
  1935. }
  1936. if ( open( my $Product, '<', "$Self->{Home}/RELEASE" ) ) { ## no critic
  1937. while (<$Product>) {
  1938.  
  1939. # filtering of comment lines
  1940. if ( $_ !~ /^#/ ) {
  1941. if ( $_ =~ /^PRODUCT\s{0,2}=\s{0,2}(.*)\s{0,2}$/i ) {
  1942. $Self->{Product} = $1;
  1943. }
  1944. elsif ( $_ =~ /^VERSION\s{0,2}=\s{0,2}(.*)\s{0,2}$/i ) {
  1945. $Self->{Version} = $1;
  1946. }
  1947. }
  1948. }
  1949. close($Product);
  1950. }
  1951. else {
  1952. print STDERR "ERROR: Can't read $Self->{Home}/RELEASE: $! This file is needed by central system parts of OTRS, the system will not work without this file.\n";
  1953. die;
  1954. }
  1955.  
  1956. # load config (again)
  1957. $Self->Load();
  1958.  
  1959. # do not use ZZZ files
  1960. if ( !$Param{Level} ) {
  1961.  
  1962. # replace config variables in config variables
  1963. for my $Key ( sort keys %{$Self} ) {
  1964. next if !defined $Key;
  1965. if ( defined $Self->{$Key} ) {
  1966. $Self->{$Key} =~ s/\<OTRS_CONFIG_(.+?)\>/$Self->{$1}/g;
  1967. }
  1968. else {
  1969. print STDERR "ERROR: $Key not defined!\n";
  1970. }
  1971. }
  1972. }
  1973.  
  1974. return $Self;
  1975. }
  1976.  
  1977. 1;
  1978.  
  1979. =head1 TERMS AND CONDITIONS
  1980.  
  1981. This software is part of the OTRS project (L<http://otrs.org/>).
  1982.  
  1983. This software comes with ABSOLUTELY NO WARRANTY. For details, see
  1984. the enclosed file COPYING for license information (AGPL). If you
  1985. did not receive this file, see L<http://www.gnu.org/licenses/agpl.txt>.
  1986.  
  1987. =cut
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement