mail-journaling:
  app-connector:
    uri: http://127.0.0.1:8060 # specifies the location of the app connector service
  duplicate-mode: IGNORE #IGNORE will not check for duplicate messages, WARN will add info about duplicate in log file
  smtp:
    port: 25000 # port the service receive mails via SMTP; needs to by > 1024 due to Java limitations
    username: test    #credentials in case of using basic authentification
    password: optimal
    require-tls: false #switch for using TLS  fals/true
    key-store-pass: <password> # password if using certifcate for TLS
    key-store-file: C:\\Users\\kookaburra\\Desktop\\tmp_HM\\Certificats\\<filename>.p12 # certificate
    allowed-senders:  journal@kooka.os, adress2@yourdomin.xy #comma separated mail addresses of accepted senders, should be adapted to exchange configuration.
    allowed-recipients: target@kooka.os, adress2@yourdomin.xy #comma separated mail addresses of accepted senders, should be adapted to exchange configuration - usually part of the journaling rule
    message-mode: JOURNAL #expected type of message through smtp, set to receive journal reports (JOURNAL), Non-delivery reports, ie. alternate messages (ALTERNATE) or ordinary mails (NORMAL)
  enaio:
    dms:
      structure: 
        journal-folder: Journal #user name of the folder where journal mails will be stored
        use-register: PER_DAY #should the folder contain registers for mail, and for white timeframe should the registers be created. Possible values are NONE, PER_DAY, PER_WEEK, PER_MONTH
        user-folders: #list of address-folder mapping for special business use (e.g. project folder)
          "[enaio@kooka.os]" : Projekt enaio #for which mail in mail message should exist dedicated folder with document links to original message in journal folder   
          "[invoice@kooka.os]" : Rechnungen     
      folder-type: # configuration for objecttype in DMS - folder
        name: EXCHANGESTORAGE_FOLDER #internal name of folder cabinet in enaio. this value is default
        fields: #fields mapping for folder cabinet. key value is Ale-R configuration key and internal-name value is internal name of the field in enaio. this value is default
          - key: FOLDER_USER
            internal-name: Benutzer
      register-type: # configuration for objecttype in DMS - register
        name: StrukturRegister #internal name of folder cabinet in enaio. this value is default
        fields: #fields mapping for folder cabinet. key value is Ale-R configuration key and internal-name value is internal name of the field in enaio. this value is default
          - key: NAME
            internal-name: Feld1
      mail-type: # configuration for objecttype in DMS - document
        name: EMAIL_DOCUMENT #internal name of mail document in enaio. this value is default
        fields: #fields mapping for mail document. key values are Ale-R configuration keys and internal-name values are internal names of the fields in enaio. all values are default
          - key: REPORT_INFO
            internal-name: RPRT_INFO
          - key: REPORT_RECIPIENTS
            internal-name: RPRT_RECIPIENTS
          - key: MAIL_FROM
            internal-name: MAIL_FROM
          - key: MAIL_TO
            internal-name: MAIL_TO
          - key: MAIL_CC
            internal-name: MAIL_CC
          - key: MAIL_SUBJECT
            internal-name: MAIL_SUBJECT
          - key: MAIL_BODY
            internal-name: MAIL_BODY
          - key: MAIL_MESSAGE_ID
            internal-name: MAIL_MESSAGE_ID
          - key: MAIL_HAS_ATTACHMENT
            internal-name: MAIL_HAS_ATTACHMENT
          - key: MAIL_SUBMIT_TIME
            internal-name: MAIL_SUBMIT_TIME
          - key: MAIL_TOS
            internal-name: MAIL_TOS
          - key: MAIL_SIZE
            internal-name: MAIL_SIZE
          - key: MAIL_PRIORITY
            internal-name: MAIL_PRIORITY
          - key: SMTP_HEADER
            internal-name: SMTP_HEADER
          - key: MAIL_RECEIVE_TIME
            internal-name: MAIL_RECEIVE_TIME
      link-folder-type: # configuration for objecttype for additional link documents in DMS - folder
        name: USERMAIL_FOLDER #internal name of folder cabinet in enaio. this value is default
        fields: #fields mapping for folder cabinet. key value is Ale-R configuration key and internal-name value is internal name of the field in enaio. this value is default
          - key: FOLDER_USER
            internal-name: Benutzer
      link-register-type: # configuration for objecttype for additional link documents in DMS - register
        name: UserStrukturRegister #internal name of folder cabinet in enaio. this value is default
        fields: #fields mapping for folder cabinet. key value is Ale-R configuration key and internal-name value is internal name of the field in enaio. this value is default
          - key: NAME
            internal-name: Feld1
      link-mail-type: # configuration for objecttype for additional link documents in DMS - document
        name: USER_EMAIL_DOCUMENT #internal name of mail document in enaio. this value is default
        fields: #fields mapping for mail document. key values are Ale-R configuration keys and internal-name values are internal names of the fields in enaio. all values are default
          - key: REPORT_INFO
            internal-name: RPRT_INFO
          - key: REPORT_RECIPIENTS
            internal-name: RPRT_RECIPIENTS
          - key: MAIL_FROM
            internal-name: MAIL_FROM
          - key: MAIL_TO
            internal-name: MAIL_TO
          - key: MAIL_CC
            internal-name: MAIL_CC
          - key: MAIL_SUBJECT
            internal-name: MAIL_SUBJECT
          - key: MAIL_BODY
            internal-name: MAIL_BODY
          - key: MAIL_MESSAGE_ID
            internal-name: MAIL_MESSAGE_ID
          - key: MAIL_HAS_ATTACHMENT
            internal-name: MAIL_HAS_ATTACHMENT
          - key: MAIL_SUBMIT_TIME
            internal-name: MAIL_SUBMIT_TIME
          - key: MAIL_TOS
            internal-name: MAIL_TOS
          - key: MAIL_SIZE
            internal-name: MAIL_SIZE
          - key: MAIL_PRIORITY
            internal-name: MAIL_PRIORITY
          - key: SMTP_HEADER
            internal-name: SMTP_HEADER
          - key: MAIL_RECEIVE_TIME
            internal-name: MAIL_RECEIVE_TIME
  exchange: # configuration for accessing exchange online
    client-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # credentials for GRAPH-API, taken from application configuration in Azure portal
    tenant-id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # credentials for GRAPH-API, takentake from application configuration in Azure portal
    secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # credentials for GRAPH-API, takentake from application configuration in Azure portal
    page-size: 999 #Maximal size of results per Graph API request. Default 999, not allowed to be greater than 999
    use-exchange-service: true #enables/disables usage of exchange service to create folders for link document based on AD-parameters connected to mail addresses
    access-scope-uri: https://graph.microsoft.com/.default # defined by microsoft, optional, do not change
    folder-field: FIRST_NAME # defines, which AD-propertie is used for folders for link documents, accepted values USERNAME, FIRST_NAME, LAST_NAME, DISPLAY_NAME, SAM_ACCOUNT_NAME
    domains: kooka.os, mail.kooka.os # List of domains that are part of Active Directory, used to retrieve proper folder for link documents, for each mail that is part of configured domains
    mailboxes: # list of mailboxes, the system pulls mails from 
      - user: JournalNDR@kooka.os #an email address which is representing backup mailbox
        read-folder: Inbox #folder name from which backup mails should be pulled
        error-folder: JournalError #folder in which will be moved mails that could not be processed
        message-mode: ALTERNATE #mailbox set as alternate mailbox (ALTERNATE), journaling mailbox (JOURNAL) or ordinary mailbox (NORMAL)
      - user: invoice@kooka.os #an email address which is representing backup mailbox
        read-folder: Inbox #folder name from which backup mails should be pulled
        error-folder: JournalError #folder in which will be moved mails that could not be processed
        message-mode: NORMAL #mailbox set as alternate mailbox (ALTERNATE), journaling mailbox (JOURNAL) or ordinary mailbox (NORMAL)
