<chapter id="configfile">
<title>Konfigurationsdatei</title>
<para>
Innerhalb OTRS gibt es viele Konfigurationsoptionen. Insgesamt gibt es zwei solcher Dateien: 1. Kernel/Config.pm und 2. Kernel/Config/Defaults.pm. 
</para>
<para>
Kernel/Config/Defaults.pm ist die Standard Konfigurationsdatei, die nicht geändert werden sollte. Alle möglichen Konfigurationsoptionen finden Sie in dieser Datei. Das Lesen sollte Ihnen nicht schwer fallen. 
</para>
<para>
Kernel/Config.pm.dist ist die initiale Beispieldatei für Kernel/Config.pm (angepasste Konfiguration Ihres Systems). Config.pm muß noch aus Config.pm.dist erzeugt werden. (cp Kernel/Config.pm.dist Kernel/Config.pm).
</para>
<para>
So funktioniert's! Die Datei Kernel/Config/Defaults.pm wird zuerst, die Datei Kernel/Config.pm danach geladen. Wenn Sie Änderungen an der Konfiguration vornehmen wollen, copieren Sie einfach die benötigte Option aus Kernel/Config/Defaults.pm in Kernel/Config.pm und ändern Sie die Werte hier. 
</para>
<para>
Nun werden wir einige, nicht alle Konfigurationsfunktionen erläutern.
</para>

<sect1 id="configfile-tickethook">
<title>TicketHook (Ticket Kennzeichen)</title>
<para>
Sie können den TicketHook / das Ticket Kennzeichen anpassen. Dies ist der erste Teil im Betreff Ihrer E-Mails (z.B. [MyTicket: 007]).
</para>
<example>
<title>Kernel/Config.pm - TicketHook / Ticket Kennzeichen</title>
<programlisting>
[...]
    # TicketHook
    # (To set the Ticket identifier. Some people want to  
    # set this to e. g. 'Call#', 'MyTicket#' or 'Ticket#'.)     
    $Self->{TicketHook} = 'Ticket#',              
[...]
</programlisting>
</example>
<para>
Hinweis: Verwenden Sie keinen TicketHook, der nur aus 2 Zeichen (z.B. TN) besteht. MS Outlook würde nämlich "TN: 54968797" durch "RE: 54968797" ersetzen. OTRS würde dies ziehmliche Probleme bereiten.  
</para>
</sect1>

<sect1 id="configfile-fqdn">
<title>FQDN</title>
<para>
Der OTRS "full qualified domain name" wird für E-Mail Nachrichten ID's verwendet.
</para>
<example>
<title>Kernel/Config.pm - FQDN</title>
<programlisting>
[...]
    # FQDN
    # (Full qualified domain name of your system.)
    $Self->{FQDN} = 'yourhost.example.com';
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-log">
<title>Protokoll</title>
<para>
Die OTRS Protokollierungsmethode.
</para>
<example>
<title>Kernel/Config.pm - LogModule</title>
<programlisting>
[...]
    # ----------------------------------------------------#
    # log settings                                   #
    # ----------------------------------------------------#

    # LogModule
    # (log backend module)
    $Self->{LogModule} = 'Kernel::System::Log::SysLog';
#    $Self->{LogModule} = 'Kernel::System::Log::File';

    # param for LogModule Kernel::System::Log::File (required!)
#    $Self->{'LogModule::LogFile'} = '/tmp/otrs.log'; 
    # param if the date (yyyy-mm) should be added as suffix to 
    # logfile [0|1]
#    $Self->{'LogModule::LogFile::Date'} = 0;
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-checkemail">
<title>E-Mail Überprüfungsoption</title>
<para>
Es gibt zwei Möglichkeiten, die verwendeten E-Mailadressen zu überprüfen:
</para>
<para>
<example>
<title>Kernel/Config.pm - CheckEmailAddresses</title>
<programlisting>
[...]
    # CheckEmailAddresses
    # (Check syntax of used email addresses)
    $Self->{CheckEmailAddresses} = 1;
[...]
</programlisting>
</example>

<example>
<title>Kernel/Config.pm - CheckMXRecord</title>
<programlisting>
[...]
    # CheckMXRecord
    # (Check mx recorde of used email addresses)
    $Self->{CheckMXRecord} = 1;
[...]
</programlisting>
</example>
Deaktivieren Sie diese Einstellung, wenn Sie sich in einem Netzwerk ohne externe DNS Anbindung befinden. Andernfalls können Sie keine E-Mails von der Agenten Oberfläche verschicken. 
</para>
</sect1>

<sect1 id="configfile-postmaster"> 
<title>Max. Postmaster E-Mail</title> 
<para> 
OTRS ist in der Lage, automatische E-Mail-Antworten zu verschicken. Hierdurch können Schleifen entstehen.
</para>
<example>
<title>Kernel/Config.pm - PostmasterMaxEmails</title>
<programlisting>
[...]
    # PostmasterMaxEmails
    # (Max post master daemon email to own email-address a day.
    # Loop-Protection!) [default: 40]
    $Self->{PostmasterMaxEmails} = 40;
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-ticketnumberformat">
<title>Format der Ticket-Nummer</title>
<para> 
Sie können zwischen vier verschiedenen OTRS Formaten wählen. AutoIncrement ist als Standard gesetzt.
</para>
<example>
<title>Kernel/Config.pm - TicketNumberGenerator</title>
<programlisting>
[...] 
    # TicketNumberGenerator 
    # 
    # Kernel::System::Ticket::Number::AutoIncrement (default) --> auto increment 
    #   ticket numbers "SystemID.Counter" like 1010138 and 1010139.
    #
    # Kernel::System::Ticket::Number::Date --> ticket numbers with date 
    #   "Year.Month.Day.SystemID.Counter" like 200206231010138 and 200206231010139.
    #
    # Kernel::System::Ticket::Number::DateChecksum --> ticket numbers with date and 
    #   check sum the counter will be rotated daily (my favorite) 
    #   "Year.Month.Day.SystemID.Counter.CheckSum" like 2002070110101520 and 2002070110101535.
    #
    # Kernel::System::Ticket::Number::Random -->
    #   random ticket numbers "SystemID.Random" like 100057866352 and 103745394596.

    $Self->{TicketNumberGenerator} = 'Kernel::System::Ticket::Number::AutoIncrement';
[...]
</programlisting>
</example>
<para>
Sie können auch Ihr eigenes Modul zur Erzeugung von Ticket Nummern schreiben. Das Modul muss lediglich über zwei Funktionen verfügen: 1. "CreateTicketNr()" um eine neue Ticket Nummer zu generieren und 2. "GetTNByString()" um eine Ticket Nummer als Zeichenkette zu erhalten. 
</para>
<para>
Ein nettes Beispiel ist das <ulink url="http://otrs.org/cgi-bin/cvsweb.cgi/otrs/Kernel/System/Ticket/Number/Random.pm">Kernel::System::Ticket::Number::Random</ulink> Zufallsmodul.
</para>
</sect1>


<sect1 id="configfile-dbstuff">
<title>Datenbankeinstellungen</title>
<example>
<title>Kernel/Config.pm - Datenbankeinstellungen</title>
<programlisting>
[...]
    # DatabaseHost
    # (The database host.)
    $Self->{DatabaseHost} = 'localhost';

    # Database
    # (The database name.)
    $Self->{Database} = 'otrs';

    # DatabaseUser
    # (The database user.)
    $Self->{DatabaseUser} = 'otrs';

    # DatabasePw
    # (The password of database user.)
    $Self->{DatabasePw} = 'some-pass';

    # DatabaseDSN
    # (The database DSN for MySQL ==> more: "man DBD::mysql") 
    $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};";

    # (The database DSN for PostgrSQL ==> more: "man DBD::Pg") 
    #$Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};";
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-asp">
<title>ASP (Application Service Provider) Optionen</title>
<para>
Soll der Agent in der Lage sein Tickets in Queues zu verschieben, denen er nicht angehört, so sollte die Option verwendet werden. (Nützlich, wenn OTRS im ASP Modus verwendet wird).
</para>
<example>
<title>Kernel/Config.pm - ChangeOwnerToEveryone</title>
<programlisting>
[...]
    # ChangeOwnerToEveryone -> useful for ASP
    # (Possible to change owner of ticket ot everyone) [0|1]
    $Self->{ChangeOwnerToEveryone} = 0;
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-customqueue">
<title>Custom Queue</title>
<para>
Einige Benutzer von OTRS wollen den "Custom Queue" Namen verändern. 
</para>
<example>
<title>Kernel/Config.pm - Custom Queue</title>
<programlisting>
[...]
    # CustomQueue
    # (The name of custom queue.)
    $Self->{CustomQueue} = 'PersonalQueue';
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-queuelisttype">
<title>Queue Verzeichnisart</title>
<para>
Konfigurieren Sie die Queue-Auswahl in Ihrem System! Die Optionen sind "tree" (Standard) und "list".
</para>
<para>
Tree:
<programlisting>
QueueA 
  Queue1
  Queue2
  Queue3
QueueB
  Queue1 
    Queue-a 
    Queue-b 
    Queue-c 
    Queue-d 
  Queue2
    Queue-a 
    Queue-b 
QueueC
  Queue1 
  Queue2
</programlisting>
</para>
<para>
List:
<programlisting>
QueueA
QueueA::Queue1
QueueA::Queue2
QueueA::Queue3
QueueB
QueueB::Queue1
QueueB::Queue2
</programlisting>
</para>
<example>
<title>Kernel/Config.pm - QueueListType</title>
<programlisting>
[...]
    # QueueListType
    # (show queues in system as tree or as list) [tree|list]
    $Self->{QueueListType} = 'tree';
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-notification">
<title>Agent Benachrichtigung</title>
<para>
Sollten neue Tickets eintreffen oder der Verlauf eines Tickets gewünscht sein, so kann OTRS den/die Agenten informieren. 
</para>
<example>
<title>Kernel/Config.pm - Agent notification</title>
<programlisting>
[...]
    # ----------------------------------------------------#
    # notification stuff                                  #
    # ----------------------------------------------------#
    # notification sender
    $Self-&gt;{NotificationSenderName} = 'OTRS Notification Master';
    $Self-&gt;{NotificationSenderEmail} = 'otrs@'.$Self-&gt;{FQDN};

    # new ticket
    $Self-&gt;{NotificationSubjectNewTicket} = 'New ticket notification! (&lt;OTRS_CUSTOMER_SUBJECT[10]&gt;)';
    $Self-&gt;{NotificationBodyNewTicket} = "
Hi,

there is a new ticket!

&lt;snip&gt;
&lt;OTRS_CUSTOMER_EMAIL[6]&gt;
&lt;snip&gt;

http://$Self-&gt;{FQDN}/otrs/index.pl?Action=AgentZoom&amp;TicketID=&lt;OTRS_TICKET_ID&gt;

Your OTRS Notification Master

";

    # follow up
    $Self-&gt;{NotificationSubjectFollowUp} = 'You got follow up! (&lt;OTRS_CUSTOMER_SUBJECT[10]&gt;)';
    $Self-&gt;{NotificationBodyFollowUp} = "
Hi &lt;OTRS_USER_FIRSTNAME&gt;,

you got a follow up!

&lt;snip&gt;
&lt;OTRS_CUSTOMER_EMAIL[6]&gt;
&lt;snip&gt;

http://$Self-&gt;{FQDN}/otrs/index.pl?Action=AgentZoom&amp;TicketID=&lt;OTRS_TICKET_ID&gt;

Your OTRS Notification Master

";
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-session">
<title>Sitzungsmanagement</title>
<para>
Das OTRS Sitzungsmanagement.
</para>
<example>
<title>Kernel/Config.pm - Session management</title>
<programlisting>
[...]
    # ----------------------------------------------------#
    # session settings                                    #
    # ----------------------------------------------------#

    # SessionModule (replace old SessionDriver!!!)
    # (How should be the session-data stored? 
    # Advantage of DB is that you can split the 
    # Frontendserver from the DB-Server. fs is faster.)
    $Self->{SessionModule} = 'Kernel::System::AuthSession::DB';
#    $Self->{SessionModule} = 'Kernel::System::AuthSession::FS';
#    $Self->{SessionModule} = 'Kernel::System::AuthSession::IPC';
    
    # SessionCheckRemoteIP 
    # (If the application is used via a proxy-farm then the 
    # remote ip address is mostly different. In this case,
    # turn of the CheckRemoteID. ) [1|0] 
    $Self->{SessionCheckRemoteIP} = 1;

    # SessionDeleteIfNotRemoteID
    # (Delete session if the session id is used with an 
    # invalied remote IP?) [0|1]
    $Self->{SessionDeleteIfNotRemoteID} = 1;

    # SessionMaxTime
    # (Max valid time of one session id in second (8h = 28800).)
    $Self->{SessionMaxTime} = 28800;

    # SessionDeleteIfTimeToOld
    # (Delete session's witch are requested and to old?) [0|1]
    $Self->{SessionDeleteIfTimeToOld} = 1;

    # SessionUseCookie
    # (Should the session management use html cookies?
    # It's more comfortable to send links -==> if you have a valid 
    # session, you don't have to login again.) [0|1]
    # Note: If the client browser disabled html cookies, the system
    # will work as usual, append SessionID to links!
    $Self->{SessionUseCookie} = 1;

    # SessionUseCookieAfterBrowserClose
    # (store cookies in browser after closing a browser) [0|1]
    $Self->{SessionUseCookieAfterBrowserClose} = 0;
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-login-logout">
<title>URL Login und Logout Einstellungen</title>
<para>
</para>
<example>
<title>Kernel/Config.pm - URL Login und Logout Einstellungen</title>
<programlisting>
[...]
    # ----------------------------------------------------#
    # URL login and logout settings          #
    # ----------------------------------------------------#

    # LoginURL
    # (If this is anything other than '', then it is assumed to be the
    # URL of an alternate login screen which will be used in place of 
    # the default one.)
    $Self->{LoginURL} = '';
#    $Self->{LoginURL} = 'http://host.example.com/cgi-bin/login.pl';

    # LogoutURL
    # (If this is anything other than '', it is assumed to be the URL
    # of an alternate logout page which users will be sent to when they
    # logout.)
    $Self->{LogoutURL} = '';
#    $Self->{LogoutURL} = 'http://host.example.com/cgi-bin/login.pl';
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-agentarea">
<title>Agent-Oberfläche Standardeinstellungen</title>
<para>
</para>
<example>
<title>Kernel/Config.pm - Agent-Oberfläche Standardeinstellungen</title>
<programlisting>
[...]
    # ----------------------------------------------------#
    # agent area default settings              #
    # ----------------------------------------------------#

    # ViewableTickets
    # (The default viewable tickets a page.)
    $Self->{ViewableTickets} = 25;

    # ViewableTicketLines
    # (Max viewable ticket lines in the QueueView.)
    $Self->{ViewableTicketLines} = 18;

    # ViewableTicketLinesZoom
    # (Max viewable ticket lines in the QueueZoom.)
    $Self->{ViewableTicketLinesZoom} = 6000;

    # MaxLimit
    # (Max viewable tickets a page.)
    $Self->{MaxLimit} = 150;

    # RefreshOptions
    # (Refresh option list for preferences)
    $Self->{RefreshOptions} = {
        '' => 'off',
        2  => ' 2 minutes',
        5  => ' 5 minutes',
        7  => ' 7 minutes',
        10 => '10 minutes',
        15 => '15 minutes',
    };

    # Highligh*
    # (Set the age and the color for highlighting of old queue
    # in the QueueView.)
    # highlight age1 in min
    $Self->{HighlightAge1} = 1440;
    $Self->{HighlightColor1} = 'orange';
    # highlight age2 in min
    $Self->{HighlightAge2} = 2880;
    $Self->{HighlightColor2} = 'red';

    # ----------------------------------------------------#
    # AgentUtil                                       #
    # ----------------------------------------------------#

    # default limit for Tn search
    $Self->{SearchLimitTn} = 20;

    # default limit for Txt search
    $Self->{SearchLimitTxt} = 20;

    # viewable ticket lines by search util 
    $Self->{ViewableTicketLinesBySearch} = 15;

    # ----------------------------------------------------#
    # Ticket stuff                                        #
    # (Viewable tickets in queue view)                    #
    # ----------------------------------------------------#
    # ViewableLocks 
    # default: ["'unlock'", "'tmp_lock'"]
    $Self->{ViewableLocks} = ["'unlock'", "'tmp_lock'"];

    # ViewableStateType 
    # (see http://yourhost/otrs/index.pl?Action=AdminState -> StateType)
    $Self->{ViewableStateType} = ['new', 'open', 'pending'];

    # ViewableSenderTypes 
    #  default:  ["'customer'"]
    $Self->{ViewableSenderTypes} = ["'customer'"];
[...]
</programlisting>
</example>
</sect1>

<sect1 id="configfile-spell">
<title>Rechtschreibüberprüfung</title>
<para>
OTRS ist in der Lage, eine Rechtschreibüberprüfungssoftware wie 
<ulink url="http://fmg-www.cs.ucla.edu/fmg-members/geoff/ispell.html">ispell</ulink> 
oder <ulink url="http://aspell.sourceforge.net/">aspell</ulink> zu verwenden.
</para>
<para>
<example>
<title>Kernel/Config.pm - Rechtschreibüberprüfung</title>
<programlisting>
[...]
    # SpellChecker
    # (If ispell or aspell is available, then we will provide a spelling
    # checker) 
#    $Self->{SpellChecker} = '';
    $Self->{SpellChecker} = '/usr/bin/ispell';
    $Self->{SpellCheckerDictDefault} = 'english';

    # SpellCheckerIgnore
    # (A list of ignored words.)
    $Self->{SpellCheckerIgnore} = ['www', 'webmail', 'https', 'http', 'html'];
[...]
</programlisting>
</example>
</para>
<para>
Mögliche Agenten-Wörterbücher.
<example>
<title>Kernel/Config.pm - Rechtschreibüberprüfung - Agenten Präferenzen</title>
<programlisting>
[...]
    $Self->{PreferencesGroups}->{SpellDict} = {
        Colum => 'Other Options',
        Label => 'Spelling Dictionary',
        Desc => 'Select your default spelling dictionary.',
        Type => 'Generic',
        Data => {
            # installed dict catalog (check your insalled catalogues, 
            # e. g. deutsch -=> german!)
            # dict => frontend
            'english' => 'English',
            'deutsch' => 'Deutsch',
        },
        PrefKey => 'UserSpellDict',
        Activ => 1,
    };
[...]
</programlisting>
</example>
</para>
<para>
Vielleicht wollen Sie, dass die Antwort standardmäßig überprüft werden muss.
<example>
<title>Kernel/Config.pm - Rechtschreibüberprüfung - Überprüfungspflicht</title>
<programlisting>
    # FrontendNeedSpellCheck
    # (compose message must be spell checked)
    $Self->{FrontendNeedSpellCheck} = 0;
</programlisting>
</example>
</para>
</sect1>

<sect1 id="configfile-responsef">
<title>Format der Antwort (Antwort erstellen)</title>
<para>
OTRS ist in der Lage, das Format der Antwort, die in der Agenten-Oberfläche erstellt wurden, zu konfigurieren. 
</para>
<para>
<example>
<title>Kernel/Config.pm - Antwortenformat (unix_style)</title>
<programlisting>
[...]
    # unix_style (default)
    $Self->{ResponseFormat} = '$Data{"Salutation"}
    $Data{"OrigFrom"} $Text{"wrote"}:
    $Data{"Body"}
    $Data{"StdResponse"}
    $Data{"Signature"}
';

[...]
</programlisting>
</example>
</para>
<para>
Wenn sie das Format verändern möchten, benutzen sie das Folgende:
<example>
<title>Kernel/Config.pm - Antwortenformat (ms_style)</title>
<programlisting>
[...]
    # ms_style
    $Self->{ResponseFormat} = '$Data{"Salutation"}
    $Data{"StdResponse"}
    $Data{"Signature"}
    $Data{"OrigFrom"} $Text{"wrote"}:
    $Data{"Body"}
';
[...]
</programlisting>
</example>
</para>
</sect1>

</chapter>
