Mailparser: Unterschied zwischen den Versionen

Aus infra-struktur AdminWiki 2.10
Zur Navigation springenZur Suche springen
Keine Bearbeitungszusammenfassung
Zeile 30: Zeile 30:




  -noarchiv                                 noarchiv - If this flag is
  usage: Options [-c] -dblogin <arg> -dbname <arg> -dbpwd <arg> [-defaultOwnerGroupAndUser <arg>] [-delay <arg>] [-disableImapPlainAuthentication]
                                            set, the mails are not automatically archivied.
      [-disableMemorySafePOP3Parsing] [-h] -host <arg> [-ictp <arg>] [-imapEntireMessage] [-imaxa <arg>] [-it <arg>] [-keystorepassphrase <arg>]
  -imaxa,--idletime_maxage                  idletime_maxage <min> - Sets
      [-maxp <arg>] [-minp <arg>] [-noarchiv] [-notifyFatalErrors] [-port <arg>] [-solrServerURL <arg>] -storagepath <arg> [-t <arg>] [-to <arg>]
                                            Idle max age (in min). The time (in minutes), for a connection to remain
      [-v] [-vv] [-workingDirectory <arg>] [-workingSet <arg>]
                                            unused before it is closed off. Default: 1 minutes
-c,--console                                    Use this option to write the log outputs to the console.
  -ictp,--idletime_connection_test_period
-dblogin <arg>                                  dblogin <login> - The login name (user) for the database.
                                            idletime_connection_test_period <min> - Sets the idleConnectionTestPeriod.
  -dbname <arg>                                  dbname <name> - The name of the database.
                                            This sets the time (in minutes), for a connection to remain idle before
-dbpwd <arg>                                    dbpwd <password> - The password of the user for the database.
                                            sending a test query to the DB. This is useful to prevent a DB from timing
-defaultOwnerGroupAndUser <arg>                Optional - this options sets the default owner group and user for the file generated in the ifs
                                            out connections on its end. Default: 30 minutes
                                                storage directory. e.g user:group
  -delay                                    delay <millisec> - The delay
-delay <arg>                                    delay <millisec> - The delay (in millisec) between parsing of two messages. Default is 2.
                                            (in millisec) between parsing of two messages. Default is 2.
-disableImapPlainAuthentication                Optional - To work around a bug in Exchange 2007. The Exchange server advertises that it supports
  -dblogin                                  dblogin <login> - The login
                                                AUTH=PLAIN, even though this Exchange documentation claims that it's not supported.
                                            name (user) for the database.
-disableMemorySafePOP3Parsing                  DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
-to,--timeout                              timeout <sec> - The maximal
                                                from your start scripts.
                                            length (in sec) of time the parser waits for data on a connection. Default
-h,--help                                      Prints this help.
                                            is 80.
-host <arg>                                    host <ip> - The networkadress of the database host. Either an ip or a name within the network.
  -it,--idletime                             idletime <sec> - The maximal
  -ictp,--idletime_connection_test_period <arg>  idletime_connection_test_period <min> - Sets the idleConnectionTestPeriod. This sets the time (in
                                            length of time (in sec) the parser holds idle database connections.
                                                minutes), for a connection to remain idle before sending a test query to the DB. This is useful to
                                            Default is forever.
                                                prevent a DB from timing out connections on its end. Default: 30 minutes
  -maxp,--maxpool                           maxpool <size> - The maximum
  -imapEntireMessage                              This allows to avoid all sorts of parsing and protocol bugs in many IMAP servers by downloading the
                                            amount of connections the pool aquires during a peak. Default is 2.
                                                entire message to the client and parsing it in the client. Default is deactivated
  -t,--time                                  time <sec> - The minimal
  -imaxa,--idletime_maxage <arg>                  idletime_maxage <min> - Sets Idle max age (in min). The time (in minutes), for a connection to remain
                                            length (in sec) of the pause between two parser runs. Default is 300.
                                                unused before it is closed off. Default: 1 minutes
-minp,--minpool                            minpool <size> - The minimum
  -it,--idletime <arg>                            idletime <sec> - The maximal length of time (in sec) the parser holds idle database connections.
                                            amount of connections the pool holds for eternity. Default is 1.
                                                Default is forever.
  -dbname                                    dbname <name> - The name of
-keystorepassphrase <arg>                      keystore-passphrase <password> - The password for the local keystore
                                            the database.
  -maxp,--maxpool <arg>                          maxpool <size> - The maximum amount of connections the pool aquires during a peak. Default is 2.
  -host                                      host <ip> - The networkadress
  -minp,--minpool <arg>                           minpool <size> - The minimum amount of connections the pool holds for eternity. Default is 1.
                                            of the database host. Either an ip or a name within the network.
  -noarchiv                                      noarchiv - If this flag is set, the mails are not automatically archivied.
  -keystorepassphrase                        keystore-passphrase <password>
-notifyFatalErrors                              Optional - if this option is activated, FATAL Errors are send to NETZkultur.
                                            - The password for the local keystore
  -port <arg>                                    port <number> - The port where to reach the database on the host.
  -dbpwd                                    dbpwd <password> - The
  -solrServerURL <arg>                            solrServerURL <url> - Optional - the URL of the Solr Server
                                            password of the user for the database.
  -storagepath <arg>                              storagepath <storagepath> - The root storage path of the object storage. e.g
  -port                                      port <number> - The port where
                                                file:///somedir/somesubdir
                                            to reach the database on the host.
  -t,--time <arg>                                time <sec> - The minimal length (in sec) of the pause between two parser runs. Default is 300.
  -disableMemorySafePOP3Parsing              Optional - To safe memory
  -to,--timeout <arg>                            timeout <sec> - The maximal length (in sec) of time the parser waits for data on a connection.
                                            while parsing POP3Folders the parser reconnects after each parsed mail.
                                                Default is 80.
                                            Use this option to disable this behavior.
  -v,--verbose                                    The output 'noise': 'verbose'  warnings and errors are printed
  -notifyFatalErrors                        Optional - if this option is
  -vv,--very verbose                             The output 'noise': 'very verbose' - only fine infos, info, warnings and errors are printed
                                            activated, FATAL Errors are send to NETZkultur.
  -workingDirectory <arg>                         Optional - this options sets the working directory of the parser (the path were the log-/cachefiles
  -vv,--very verbose                         The output 'noise': 'very
                                                are genereated.)
                                            verbose' - only fine infos, info, warnings and errors are printed
  -workingSet <arg>                              set <number> - Optinal - with this option you can specify a set of mailaccounts which is parsed
  -solrServerURL                            solrServerURL <url> - Optional
                                                instead of all of the instance.
                                            - the URL of the Solr Server
-c,--console                              Use this option to write the
                                            log outputs to the console.
  -h,--help                                  Prints this help.
-v,--verbose                              The output 'noise': 'verbose'
-imapEntireMessage (Ab Version 3.4.5)      This allows to avoid all sorts
                                            of parsing and protocol bugs in many IMAP servers by downloading the
                                            entire message to the client and parsing it in the client. Default is
                                            deactivated (genaue Erklärung siehe unten)






Dies ist ein Beispiel aus der Version 3.3.5
 
Dies ist ein Beispiel aus der Version 4.1.11


===imapEntireMessage===
===imapEntireMessage===

Version vom 22. Februar 2013, 07:48 Uhr

Der Mailparser ist das Java-Programm daß für den Abruf der Postfächer bei den Mailservern zuständig ist.
Der Mailparser verbindet sich dabei zur Datenbank, fragt die notwendigen Werte der einzelnen Postfächer ab und ruft dann die entsprechenden eMails ab.
Dabei überprüft der Mailparser zuerst anhand der Message-ID ob die eMail bereits in der Datenbank vorhanden ist. Sollte das der Fall sein wird die eMail nicht erneut abgerufen und es werden nur noch die entsprechenden Rechte vergeben.
Als nächstes prüft der Mailparser unter Berücksichtigung der IDO-DS Einstellungen der Webmailverwaltung ob die Absenderadresse der aktuellen eMail in einem Datensatz vorhanden ist.
In dem Fall wird direkt eine entsprechende Verknüpfung zu dem Datensatz gemacht.
Wenn eine Datensatzverknüpfung möglich ist, dann setzt der Mailparser auch automatisch das Archivrecht für diese eMail.

Der Mailparser wird bei Onlineinstallationen auf unseren Servern auch von uns gehostet, eingestellt und überwacht.
Nur bei Lokalinstallationen müssen sie diesen selber aktivieren und einstellen.

Der Mailparser wird unter Windows mit einer Batch-Datei und unter Linux mit einer Shell-Datei gestartet. Im folgende sehen sie am Beispiel einer Shell-Datei welche Einstellungen sie machen müssen und welche optional möglich sind.


> java -Xmx500M -jar JavaMailParser.jar -host <datenbank-server> -dbname <datenbank-name> -dblogin <datenbank-user> -dbpwd > <datenbank-passwort> -t 560


In diesen Startaufruf lassen sich nun noch verschiedene Parameter zum Verhalten des Mailparser setzen. Wenn sie über die Konsole den Befehl

> java -jar JavaMailParser.jar -h eingeben


erhalten sie eine Hilfeübersicht zu den Parametern.


usage: Options [-c] -dblogin <arg> -dbname <arg> -dbpwd <arg> [-defaultOwnerGroupAndUser <arg>] [-delay <arg>] [-disableImapPlainAuthentication]
      [-disableMemorySafePOP3Parsing] [-h] -host <arg> [-ictp <arg>] [-imapEntireMessage] [-imaxa <arg>] [-it <arg>] [-keystorepassphrase <arg>]
      [-maxp <arg>] [-minp <arg>] [-noarchiv] [-notifyFatalErrors] [-port <arg>] [-solrServerURL <arg>] -storagepath <arg> [-t <arg>] [-to <arg>]
      [-v] [-vv] [-workingDirectory <arg>] [-workingSet <arg>]
-c,--console                                    Use this option to write the log outputs to the console.
-dblogin <arg>                                  dblogin <login> - The login name (user) for the database.
-dbname <arg>                                   dbname <name> - The name of the database.
-dbpwd <arg>                                    dbpwd <password> - The password of the user for the database.
-defaultOwnerGroupAndUser <arg>                 Optional - this options sets the default owner group and user for the file generated in the ifs
                                                storage directory. e.g user:group
-delay <arg>                                    delay <millisec> - The delay (in millisec) between parsing of two messages. Default is 2.
-disableImapPlainAuthentication                 Optional - To work around a bug in Exchange 2007. The Exchange server advertises that it supports
                                                AUTH=PLAIN, even though this Exchange documentation claims that it's not supported.
-disableMemorySafePOP3Parsing                   DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                from your start scripts.
-h,--help                                       Prints this help.
-host <arg>                                     host <ip> - The networkadress of the database host. Either an ip or a name within the network.
-ictp,--idletime_connection_test_period <arg>   idletime_connection_test_period <min> - Sets the idleConnectionTestPeriod. This sets the time (in
                                                minutes), for a connection to remain idle before sending a test query to the DB. This is useful to
                                                prevent a DB from timing out connections on its end. Default: 30 minutes
-imapEntireMessage                              This allows to avoid all sorts of parsing and protocol bugs in many IMAP servers by downloading the
                                                entire message to the client and parsing it in the client. Default is deactivated
-imaxa,--idletime_maxage <arg>                  idletime_maxage <min> - Sets Idle max age (in min). The time (in minutes), for a connection to remain
                                                unused before it is closed off. Default: 1 minutes
-it,--idletime <arg>                            idletime <sec> - The maximal length of time (in sec) the parser holds idle database connections.
                                                Default is forever.
-keystorepassphrase <arg>                       keystore-passphrase <password> - The password for the local keystore
-maxp,--maxpool <arg>                           maxpool <size> - The maximum amount of connections the pool aquires during a peak. Default is 2.
-minp,--minpool <arg>                           minpool <size> - The minimum amount of connections the pool holds for eternity. Default is 1.
-noarchiv                                       noarchiv - If this flag is set, the mails are not automatically archivied.
-notifyFatalErrors                              Optional - if this option is activated, FATAL Errors are send to NETZkultur.
-port <arg>                                     port <number> - The port where to reach the database on the host.
-solrServerURL <arg>                            solrServerURL <url> - Optional - the URL of the Solr Server
-storagepath <arg>                              storagepath <storagepath> - The root storage path of the object storage. e.g
                                                file:///somedir/somesubdir
-t,--time <arg>                                 time <sec> - The minimal length (in sec) of the pause between two parser runs. Default is 300.
-to,--timeout <arg>                             timeout <sec> - The maximal length (in sec) of time the parser waits for data on a connection.
                                                Default is 80.
-v,--verbose                                    The output 'noise': 'verbose'  warnings and errors are printed
-vv,--very verbose                              The output 'noise': 'very verbose' - only fine infos, info, warnings and errors are printed
-workingDirectory <arg>                         Optional - this options sets the working directory of the parser (the path were the log-/cachefiles
                                                are genereated.)
-workingSet <arg>                               set <number> - Optinal - with this option you can specify a set of mailaccounts which is parsed
                                                instead of all of the instance.



Dies ist ein Beispiel aus der Version 4.1.11

imapEntireMessage

Bei einigen Mailservern tauchen immer wieder vom RFC abweichende Handhabungen des imap-Protokolls auf. Bekannte Probleme gibt es da beim Courier Mailserver und beim David Mailserver. Beim Abruf der Mail werden die einzelnen Parts hier leicht unterschiedlich übergeben und der Mailparser kann diese dann nicht sauber verarbeiten. Um dieses Problem zu umgehen wird durch die Option imapEntireMessage erzwungen dass der komplette Quelltext einer eMail abgerufen wird und dann der Mailparser selber die einzelnen Parts herauszieht. Erkennbar ist das Problem z.B. an der Meldung: javax.mail.MessagingException: Unable to load BODYSTRUCTURE Dann empfiehlt es sich diese Option zu setzen.


Verwandte Themen