Mails that arrive via the Input agent "SMTP" or are picked up by the scheduled input agents "Mail" or "X.400" can be archived either in the EML or XML format.
IMPORTANT: Please note that you are responsible for managing the archive folder yourself. There is no automatic deletion of files. See Scheduled input agents (cron), 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 e-mail data stream for troubleshooting
To find errors caused by a faulty structure of an e-mail, the data stream can be copied to a file when downloading an e-mail via POP3 or IMAP, or when receiving via SMTP. To do this, start the Integration Server with the following system property. The received e-mails will be saved as files in folder ./logs/dump.
-Dhub.mail.preserveOriginal=true |
Additionally, activate the 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 e-mails.