Mailparser: Unterschied zwischen den Versionen

Aus infra-struktur AdminWiki 2.10
Zur Navigation springenZur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(6 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
[[Datei:Hinweis.png]] HINWEIS:
Der Mailparser wird bei Onlineinstallationen auf unseren Servern auch von uns gehostet, eingestellt und überwacht.<br>
Nur bei Lokalinstallationen müssen sie diesen selber aktivieren und einstellen.
<br>
Der Mailparser ist das Java-Programm daß für den Abruf der Postfächer bei den Mailservern
Der Mailparser ist das Java-Programm daß für den Abruf der Postfächer bei den Mailservern
zuständig ist. <br>
zuständig ist. <br>
Zeile 7: Zeile 15:
Als nächstes prüft der Mailparser unter Berücksichtigung der [[IDO-DS_Instanzen|IDO-DS Einstellungen]] der Webmailverwaltung ob die Absenderadresse der aktuellen eMail in einem Datensatz vorhanden ist.<br>  
Als nächstes prüft der Mailparser unter Berücksichtigung der [[IDO-DS_Instanzen|IDO-DS Einstellungen]] der Webmailverwaltung ob die Absenderadresse der aktuellen eMail in einem Datensatz vorhanden ist.<br>  
In dem Fall wird direkt eine entsprechende Verknüpfung zu dem Datensatz gemacht.<br>
In dem Fall wird direkt eine entsprechende Verknüpfung zu dem Datensatz gemacht.<br>
Wenn eine Datensatzverknüpfung möglich ist, dann setzt der Mailparser auch automatisch das [[User_zu_Archiv|Archivrecht]] für diese eMail.<br>
Wenn eine Datensatzverknüpfung möglich ist, dann setzt der Mailparser auch automatisch das [[Mails veröffentlichen|Veröffentlichen-Status]] für diese eMail auf sichtbar.<br>


[[Datei:Hinweis.png]] Der Mailparser wird bei Onlineinstallationen auf unseren Servern auch von uns gehostet, eingestellt und überwacht.<br>
Nur bei Lokalinstallationen müssen sie diesen selber aktivieren und einstellen.
<br>


Der Mailparser wird unter Windows mit einer Batch-Datei und unter Linux mit einer Shell-Datei gestartet.
Der Mailparser wird unter Windows mit einer Batch-Datei und unter Linux mit einer Shell-Datei gestartet.
Zeile 29: Zeile 34:
erhalten sie eine Hilfeübersicht zu den Parametern.
erhalten sie eine Hilfeübersicht zu den Parametern.


 
usage: Options [-c] -dblogin <arg> -dbname <arg> -dbpwd <arg> [-defaultOwnerGroupAndUser <arg>] [-delay <arg>] [-disableImapPlainAuthentication]
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>]
       [-disableMemorySafePOP3Parsing] [-h] -host <arg> [-ictp <arg>] [-imapEntireMessage] [-imaxa <arg>] [-it                     <arg>] [-keystorepassphrase <arg>]
       [-maxp <arg>] [-minp <arg>] [-noarchiv] [-notifyFatalErrors] [-port <arg>] [-rabbitMQHost <arg>] [-rabbitMQPassword <arg>] [-rabbitMQUser
       [-maxp <arg>] [-minp <arg>] [-noarchiv] [-notifyFatalErrors] [-port <arg>] [-rabbitMQHost <arg>] [-rabbi                    tMQPassword <arg>] [-rabbitMQUser
       <arg>] [-rabbitMQVhost <arg>] [-solrServerURL <arg>] -storagepath <arg> [-t <arg>] [-to <arg>] [-v] [-vv] [-workingDirectory <arg>]
       <arg>] [-rabbitMQVhost <arg>] [-solrServerURL <arg>] -storagepath <arg> [-t <arg>] [-to <arg>] [-v] [-vv                     ] [-workingDirectory <arg>]
       [-workingSet <arg>]
       [-workingSet <arg>]
  -c,--console                                    Use this option to write the log outputs to the console.
  -c,--console                                    Use this option to write the log outputs to the console.
Zeile 39: Zeile 43:
  -dbname <arg>                                  dbname <name> - The name of the database.
  -dbname <arg>                                  dbname <name> - The name of the database.
  -dbpwd <arg>                                    dbpwd <password> - The password of the user for 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
  -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
                                                 storage directory. e.g user:group
  -delay <arg>                                    DEPRECATED!!  - This option is deprecated and will be removed                     in a further version, please remove it
  -delay <arg>                                    DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                 from your start scripts.
                                                 from your start scripts.
  -disableImapPlainAuthentication                Optional - To work around a bug in Exchange 2007. The Exchange                     server advertises that it supports
  -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 tha                    t it's not supported.
                                                 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
  -disableMemorySafePOP3Parsing                  DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                 from your start scripts.
                                                 from your start scripts.
  -h,--help                                      Prints this help.
  -h,--help                                      Prints this help.
  -host <arg>                                    host <ip> - The networkadress of the database host. Either an                     ip or a name within the network.
  -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 idleConnectio                    nTestPeriod. This sets the time (in
  -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 tes                    t query to the DB. This is useful to
                                                 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
                                                 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
  -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. Def                    ault is deactivated
                                                 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
  -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
                                                 unused before it is closed off. Default: 1 minutes
  -it,--idletime <arg>                            idletime <sec> - The maximal length of time (in sec) the parse                    r holds idle database connections.
  -it,--idletime <arg>                            idletime <sec> - The maximal length of time (in sec) the parser holds idle database connections.
                                                 Default is forever.
                                                 Default is forever.
  -keystorepassphrase <arg>                      keystore-passphrase <password> - The password for the local ke                    ystore
  -keystorepassphrase <arg>                      keystore-passphrase <password> - The password for the local keystore
  -maxp,--maxpool <arg>                          maxpool <size> - The maximum amount of connections the pool aq                    uires during a peak. Default is 2.
  -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 ho                    lds for eternity. Default is 1.
  -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 automaticall                    y archivied.
  -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.
  -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 ho                    st.
  -port <arg>                                    port <number> - The port where to reach the database on the host.
  -rabbitMQHost <arg>                            rabbitMQHost <urls> - Optional - the adress of the rabbitMQ se                    rver
  -rabbitMQHost <arg>                            rabbitMQHost <urls> - Optional - the adress of the rabbitMQ server
  -rabbitMQPassword <arg>                        rabbitMQPassword <password> - Optional - The password of the u                    ser for the rabbitMQ server
  -rabbitMQPassword <arg>                        rabbitMQPassword <password> - Optional - The password of the user for the rabbitMQ server
  -rabbitMQUser <arg>                            rabbitMQUser <user> - Optional - The login name (user) for the                     rabbitMQ server
  -rabbitMQUser <arg>                            rabbitMQUser <user> - Optional - The login name (user) for the rabbitMQ server
  -rabbitMQVhost <arg>                            rabbitMQVhost <vhost> - Optional - the virtual host for the ra                    bbitMQ server
  -rabbitMQVhost <arg>                            rabbitMQVhost <vhost> - Optional - the virtual host for the rabbitMQ server
  -solrServerURL <arg>                            solrServerURL <url> - Optional - the URL of the Solr Server
  -solrServerURL <arg>                            solrServerURL <url> - Optional - the URL of the Solr Server
  -storagepath <arg>                              storagepath <storagepath> - The root storage path of the objec                    t storage. e.g
  -storagepath <arg>                              storagepath <storagepath> - The root storage path of the object storage. e.g
                                                 file:///somedir/somesubdir
                                                 file:///somedir/somesubdir
  -t,--time <arg>                                time <sec> - The minimal length (in sec) of the pause between                     two parser runs. Default is 300.
  -t,--time <arg>                                time <sec> - The minimal length (in sec) of the pause between two parser runs. Default is 300.
  -to,--timeout <arg>                            DEPRECATED!!  - This option is deprecated and will be removed                     in a further version, please remove it
  -to,--timeout <arg>                            DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                 from your start scripts.
                                                 from your start scripts.
  -v,--verbose                                    The output 'noise': 'verbose'  warnings and errors are printed
  -v,--verbose                                    The output 'noise': 'verbose'  warnings and errors are printed
  -vv,--very verbose                              The output 'noise': 'very verbose' - only fine infos, info, wa                    rnings 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 pars                    er (the path were the log-/cachefiles
  -workingDirectory <arg>                        Optional - this options sets the working directory of the parser (the path were the log-/cachefiles
                                                 are genereated.)
                                                 are genereated.)
  -workingSet <arg>                              set <number> - Optinal - with this option you can specify a se                    t of mailaccounts which is parsed
  -workingSet <arg>                              set <number> - Optinal - with this option you can specify a set of mailaccounts which is parsed
                                                 instead of all of the instance.
                                                 instead of all of the instance.


Zeile 95: Zeile 99:


== Verwandte Themen ==
== Verwandte Themen ==
* [[Mails mit langem Subject]]
* [[Courier-IMAP]]
* [[Webmailverwaltung]]
* [[Import_alter_Mails|Import alter E-Mails]]

Aktuelle Version vom 14. April 2020, 07:42 Uhr

HINWEIS:

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 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 Veröffentlichen-Status für diese eMail auf sichtbar.


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>] [-rabbitMQHost <arg>] [-rabbitMQPassword <arg>] [-rabbitMQUser
      <arg>] [-rabbitMQVhost <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>                                    DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                from your start scripts.
-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.
-rabbitMQHost <arg>                             rabbitMQHost <urls> - Optional - the adress of the rabbitMQ server
-rabbitMQPassword <arg>                         rabbitMQPassword <password> - Optional - The password of the user for the rabbitMQ server
-rabbitMQUser <arg>                             rabbitMQUser <user> - Optional - The login name (user) for the rabbitMQ server
-rabbitMQVhost <arg>                            rabbitMQVhost <vhost> - Optional - the virtual host for the rabbitMQ server
-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>                             DEPRECATED!!  - This option is deprecated and will be removed in a further version, please remove it
                                                from your start scripts.
-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.2.1

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