Archiving of emails and X.400 mails
Mails that arrive via the Input Agent "SMTP" or are picked up by the time-driven Input Agents "Mail" or "X.400" can be archived either in the EML or XML format. Important note: Please note that you are responsible for managing the archive folder yourself. There is no automatic deletion of files. See section Cronjob for Deleting Old Files, for example .
Configuration
The configuration for this is done in file ./etc/startup.xml. Please use one of the following two options. In the profile, the file name of the archive is then available via the system variable VAR_SYS_MAIL_ARCHIVE.
<
Call
name
=
"setMailArchiver"
>
<
Arg
>default_dir_to_place_archive</
Arg
>
<
Arg
>com.ebd.hub.datawizard.plugin.archive.EmlMailArchiver</
Arg
>
</
Call
>
<
Call
name
=
"setMailArchiver"
>
<
Arg
>default_dir_to_place_archive</
Arg
>
<
Arg
>com.ebd.hub.datawizard.plugin.archive.XmlMailArchiver</
Arg
>
</
Call
>
Only one of the two possibilities can be configured, which then works for all mails. The first argument, here as placeholder "default_dir_to_place_archive", specifies the archive directory that will be used if no individual configuration (see the following section) is set for the profile.
You can use date placeholders (<MM>, <dd>, <yyyy>, etc.) in the directory argument. The angle brackets have to be encoded with their entities "<" and ">".
<Arg>./backup/mails/<YY><MM></Arg> |
Individual configuration for single profile
The mail archiving setting can be changed for individual profiles using the file ./conf/datawizard/mail_archiver.properties. Following is an exemplary entry for specifying a different archive directory for the profile MyProfile.
MyProfile=/some/path/to/store |
Switching off the archiving for profile MyProfile can be achieved as follows.
exclude.MyProfile |
Saving the email data stream for troubleshooting
To find errors caused by a faulty structure of an email, the data stream can be copied to a file when downloading an email via POP3 or IMAP, or when receiving via SMTP. To do this, start the Integration Server with the following system property. The received emails will be saved as files in folder ./logs/dump.
-Dhub.mail.preserveOriginal=true |
Additionally, activate option "Mail Log" for phase 1 in the "Profile logging" for the profile that polls the mailbox. This will create trace files in folder ./logs/mail that also contain the received emails.