Contents
JavaMail Properties
E-mail Server uses the JavaMail API library 1.5.1. JavaMail can make use of numerous properties, which are documented at the following locations:
- Environment properties: http://www.oracle.com/technetwork/java/javamail-1-149769.pdf (Appendix A: Environment Properties)
- JavaMail Session properties: https://javamail.java.net/nonav/docs/api/
- JavaMail Session properties for IMAP: https://javamail.java.net/nonav/docs/api/com/sun/mail/imap/package-summary.html
- JavaMail Session properties for POP3: https://javamail.java.net/nonav/docs/api/com/sun/mail/pop3/package-summary.html
These properties are treated in different ways in eServices, depending on
- Whether they are set internally by E-mail Server.
- Whether they can be modified by users.
These two parameters define three different categories of property:
- Set internally and not user-modifiable
- Set internally and user-modifiable
- Not set internally and user-modifiable
The next three sections list the properties in each category and describe how to set the ones in user-modifiable categories.
Set Internally, Not User-Modifiable
- mail.pop3.class
- mail.imap.class
Set Internally, User-Modifiable
- mail.debug
- mail.pop3.host
- mail.pop3.user
- mail.pop3.port
- mail.pop3.connectiontimeout
- mail.pop3.timeout
- mail.pop3.socketFactory.class
- mail.pop3.socketFactory.fallback
- mail.pop3.socketFactory.port
- mail.pop3.socks.host
- mail.pop3.socks.port
- mail.imap.host
- mail.imap.user
- mail.imap.port
- mail.imap.connectiontimeout
- mail.imap.timeout
- mail.imap.socketFactory.class
- mail.imap.socketFactory.fallback
- mail.imap.socketFactory.port
- mail.imap.socks.host
- mail.imap.socks.port
- mail.smtp.socks.host
- mail.smtp.socks.port
You can modify these using existing configuration options in the [pop-client] and [smtp-client] sections, as shown in the following table. In this table, <protocol> is either POP3 or IMAP; for example, mail.<protocol>.timeout covers mail.pop3.timeout and mail.imap.timeout.
JavaMail Properties Controlled by Configuration Options:
JavaMail Property | Configuration Option |
---|---|
mail.debug | enable-debug |
mail.<protocol>.connectiontimeout | connect-timeout |
mail.<protocol>.timeout | protocol-timeout |
mail.<protocol>.user | mailbox |
mail.<protocol>.host | server |
mail.<protocol>.port mail.<protocol>.socketFactory.port |
port |
mail.<protocol>.socketFactory.class mail.<protocol>.socketFactory.fallback |
enable-ssl |
See the eServices Options Reference for complete information on these options.
Not Set Internally, User-Modifiable
Any of the properties not listed in the two preceding sections can be modified by creating options in E-mail Server's pop-client section. The option name is the property name. For the value, see the JavaMail documentation listed above.
Here is an example of adding an option to modify a JavaMail property: Some POP3 servers do not properly implement TOP, an optional POP command. This can create conflicts between the results of the TOP and RETR commands, which in turn can prevent E-mail Server from parsing the retrieved e-mail. To prevent these conflicts, you can create an option that invokes JavaMail's mail.pop3.disabletop property. The option name is mail.pop3.disabletop, it must be in the pop-client section, and its value must be true. E-mail Server then does not use TOP to retrieve messages, only RETR.