Javamail-configuration.properties
Subscribe

From OpenNMS

Jump to: navigation, search

This file is where you configure JavaMail as used by the Notification subsystem for sending notifications via e-mail. It should not be confused with javamail-configuration.xml, which is used to configure the use of JavaMail for the Mail Transport Monitor (and end-to-end monitoring of an e-mail system).

On your normal sort of modern Unix server, this will not require any specific configuration; the defaults will likely be ok to at least get you started (Why_using_the_default_javamail-configuration.properties_file_is_a_good_idea), and only a few settings should be modified in the normal course of events.

The properties that can be configured are as follows. Default values are documented in the file as shipped, and will not be repeated here.

Property Name Details
org.opennms.core.utils.fromAddress The From address that will appear in the e-mails. This will commonly be set to something locally meaningful, perhaps for filtering. Whether it corresponds to a real account for replies is up to you.
org.opennms.core.utils.mailHost The IP address of the SMTP server through which mail can be sent. See Why_using_the_default_javamail-configuration.properties_file_is_a_good_idea for why you probably want to leave this as 127.0.0.1.
org.opennms.core.utils.mailer The name of the mailer used in the X-Mailer header; can be useful for filtering if you so desire.
org.opennms.core.utils.transport Only used if useJMTA is false; should usually be "smtp", which will select the Java Mailer SMTP transport. Other values could be any other transport available from JavaMail (outside the scope of this documentation; if you need this, you'll know what values to use)
org.opennms.core.utils.debug Turns on a little bit more debugging output
org.opennms.core.utils.smtpport The port to connect to the SMTP server on
org.opennms.core.utils.smtpssl.enable If set to true, turns on the use of SSL for connecting to the SMTP host; you will probably also have to set smtpport to the port on which your mailer is listening for SSL connections (it's unlikely to be the default port 25)
org.opennms.core.utils.quitwait Whether the client will wait for the response to the final QUIT command sent to the SMTP server. The default (true) is best for most situations, but it's possible that some mail servers may take too long, or not respond correctly, and setting this to false may be helpful for them.
org.opennms.core.utils.useJMTA If set to true, a non-queueing Java-based MTA will be used. It performs mail exchanger (MX) record lookup and sends email directly to the appropriate mail server. If set to false, all email will be delivered to the smart host specified by org.opennms.core.utils.mailHost, which will need to relay the email to the appropriate mail server. If you need to always send mail via a specific host and/or authenticate to the mail host, you must set useJMTA to false. Defaults to true if not set, but the standard configuration file sets it to false.
org.opennms.core.utils.authenticate Enables authentication to the SMTP server
org.opennms.core.utils.authenticateUser If authenticate is turned on, this is the username to use
org.opennms.core.utils.authenticatePassword If authenticate is turned on, this is the password to use
org.opennms.core.utils.starttls.enable If set to true, will enable the use of the STARTTLS command (if supported by the server) to switch to a TLS-protected connection before issuing login commands. Requires additional configuration of Java Trust stores.
org.opennms.core.utils.messageContentType The MIME type to set when sending the message. Defaults to text/plain, so if you're using HTML in your notifications, you may find it necessary to set text/html here.
org.opennms.core.utils.charset The charset in which the message will be encoded; the default will usually do, unless you're using non us-ascii characters in your notifications.