GVMailServices

From GreenVulcano Wiki
Revision as of 06:33, 10 April 2012 by Anonymous (talk) (imap)
Jump to: navigation, search

Description

The GVMailServices Adapters specifies the Email services configuration.

The GVMailServices Element is used by: GVAdapters.

The following table shows its attributes:

Attribute Type Description
type fixed Element type 'module'.

This attribute must assume the value module.

name fixed Module id always set to 'MAIL_SERVICES'.

This attribute must assume the value MAIL_SERVICES.


Might contain the sub-elements:

mail-service

Specifies the Email service configuration.

The mail-service Element is used by: GVMailServices.

The following table shows its attributes:

Attribute Type Description
code fixed Specifies the Email service plugin.

This attribute must assume the value org.jboss.mail.MailService.

name required Specifies the Email service name.

ex: jboss:service=Mail The attribute's value can't be null.

jndi-name required Specifies the javax.mail.Session object JNDI name registered into the application server JNDI tree.

ex: java:/Mail The attribute's value can't be null.

host optional Specifies the default Mail server.

The Store and Transport object's connect methods use this property, if the protocolspecific host property is absent, to locate the target host. ex: smtp.nosuchhost.nosuchdomain.com The attribute's value cannot be null.

user required Specifies the username to provide when connecting to a Mail server.

The Store and Transport object's connect methods use this property, if the protocol specific username property is absent, to obtain the username. ex: nobody We assume that the authentication username is the same for each protocol. The attribute's value cannot be null.

password optional Specifies the password to provide when connecting to a Mail server.

This parameter is not included in the JavaMail specifications, but is used to configure the JBoss mail service. We assume that the authentication password is the same for each protocol. The attribute's value cannot be null.

from optional Specifies the return address of the current user.

Used by the InternetAddress.getLocalAddress method to specify the current user’s email address. ex: someone@host.domain.com The attribute's value can't be null.

debug optional Specifies the initial debugging mode.

Setting this property to "true" will turn on debug mode, while setting it to "false" turns debug mode off. The attribute's admitted values are:

  • false
  • true

The attribute's value can't be null.

alternates optional A string which contains additional email addresses to which current user is aware.

The MimeMessage reply method will eliminate any of these addresses from the recipient list in the message it builds, to avoid sending the reply back to the sender. This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification. The attribute's value can't be null.

replyallcc optional If set to "true", the MimeMessage reply method will put all recipients except the original sender in the Cc list of the new message.

Normally, recipients in the "To" header of the original message will also appear in the "To" list of the new email message. This property is supported by Sun Microsystem implementation of JavaMail, but is not currently a required part of the specification. The attribute's admitted values are:

  • false
  • true

The attribute's value can't be null.

Might contain the sub-elements:

smtp

SMTP configuration parameters.

The smtp Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
host optional The SMTP server to connect to.

The attribute's value cannot be null.

port optional The SMTP server port to connect to, if the connect() method does not explicitly specify one.

Defaults is "25". The attribute's value cannot be null.

connectiontimeout optional Socket connection timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

timeout optional Socket I/O timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

from optional Email address for SMTP MAIL command.

It sets the envelope return address. Defaults to msg.getFrom() or InternetAddress.getLocalAddress(). NOTE: mail.smtp.user was previously used for this. The attribute's value cannot be null.

localhost optional Local host name used in the SMTP HELO or EHLO command.

Default is InetAddress.getLocalHost().getHostName(). No need to be set if your JDK and your name service are properly configured. The attribute's value cannot be null.

localaddress optional Local address (host name) to bind when creating the SMTP socket.

Default is to the address selected by the Socket class. No need to be set, but can be useful with multi-homed hosts where it's important to pick a particular local address to bind to. The attribute's value cannot be null.

localport optional Local port number to bind to when creating the SMTP socket.

Default is to the port number picked by the Socket class. The attribute's value cannot be null.

ehlo optional If "false", do not attempt to sign on with the EHLO command.

Default is "true". Failure of the EHLO command will fallback to the HELO command; this property exists only for servers that do not fail EHLO properly or do not implement EHLO properly. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth optional If "true", authenticates the user using the AUTH command.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

submitter optional This is the submitter to use in the AUTH tag in the MAIL FROM command.

It's used by the mail relay to pass along information about the original submitter of the message. See also the setSubmitter method of SMTPMessage. Mail clients typically do not use this. The attribute's value cannot be null.

dsn-notify optional The NOTIFY option to the RCPT command.

Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas). The attribute's value cannot be null.

dsn-ret optional The RET option to the MAIL command. Either FULL or HDRS.

The attribute's admitted values are:

  • FULL
  • HDRS

The attribute's value cannot be null.

allow8bitmime optional If set to "true", and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sendpartial optional If set to "true", and a message has some valid and invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException.

If set to "false" (default), the message is not sent to any of the recipients if there is an invalid recipient address. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sasl-realm optional The realm to use with DIGEST-MD5 authentication.

The attribute's value cannot be null.

quitwait optional If set to "true", causes the transport to wait for the response to the QUIT command.

If set to "false" (default), the QUIT command is sent and the connection is immediately closed. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

reportsuccess optional If set to "true", causes the transport to include an SMTPAddressSucceededException for each address that is successful.

This will cause a SendFailedException to be thrown from the sendMessage method of SMTPTransport even if all addresses were correct and the message was successfully sent. The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-class optional If set, specifies the name of a class that implements the javax.net.SocketFactory interface.

This class will be used to create SMTP sockets. The attribute's value cannot be null.

socketFactory-fallback optional If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class.

The Default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-port optional Specifies the port to connect to when using the specified socket factory.

If not set, the default port will be used. The attribute's value cannot be null.

mailextension optional Extension string to append to the MAIL command.

The extension string can be used to specify standard SMTP service extensions as well as vendor-specific extensions. The application should use the SMTPTransport method supportsExtension to verify that the server supports the desired service extension. See RFC 1869 and other RFCs that define specific extensions. The attribute's value cannot be null.

Might contain the sub-elements:


imap

Represents the IMAP configuration parameters.

The imap Element is used by: mail-service.

The following table shows its attributes:

Attribute Type Description
host optional The IMAP server to connect to.

The attribute's value cannot be null.

port optional The IMAP server port to connect to, if the connect() method does not explicitly specify one.

Default is 143. The attribute's value cannot be null.

partialfetch optional Controls whether the IMAP partial-fetch capability should be used.

Default is "true". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

fetchsize optional Partial fetch size in bytes.

Default is 16Kb. The attribute's value cannot be null.

connectiontimeout optional Socket connection timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

timeout optional Socket I/O timeout value in milliseconds.

The Default is an infinite timeout. The attribute's value cannot be null.

statuscachetimeout optional Timeout value in milliseconds for cache of STATUS command response.

Default is 1000 (1 second). Zero disables cache. The attribute's value cannot be null.

appendbuffersize optional Maximum size of a message to buffer in memory when appending to an IMAP folder.

If not set, or set to "-1", there is no maximum and all messages are buffered. If set to "0", no message is buffered. If set to (for example) "8192", messages of 8Kb or less are buffered, larger messages are not buffered. Buffering saves cpu time at the expense of short term memory usage. If you commonly append very large messages to IMAP mailboxes you might want to set this to a moderate value (1Mb or less). The attribute's value cannot be null.

connectionpoolsize optional Maximum number of available connections in the connection pool.

The Default is "1". The attribute's value cannot be null.

connectionpooltimeout optional Timeout value in milliseconds for connection pool connections.

Default is set to "45000" (45 seconds). The attribute's value cannot be null.

separatestoreconnection optional Flag to indicate whether to use a dedicated store connection for store commands.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

allowreadonlyselect optional If "false", when opening a folder read / write will get an error if the SELECT command succeeds but indicates that the folder is READ-ONLY.

This sometimes indicates that the folder contents can NOT be changed, but the flags are per-user and can be changed, such as might be the case for public shared folders. If set to "true", such open attempts will succeed, allowing the flags to be changed. The getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified is Folder.READ_WRITE. The Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth-login-disable optional If "true", prevents the use of the non-standard AUTHENTICATE LOGIN command, instead using the

plain LOGIN command. The Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

auth-plain-disable optional If "true", prevents use of the AUTHENTICATE PLAIN command.

Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

starttls-enable optional If "true", enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is "false". The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

localaddress optional Local address (host name) to bind to when creating the IMAP socket.

Defaults to the address picked by the Socket class. Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to. The attribute's value cannot be null.

localport optional Local port number to bind to when creating the IMAP socket.

Defaults to the port number picked by the Socket class. The attribute's value cannot be null.

sasl-enable optional If set to "true", attempt to use the javax.security.sasl package to choose an authentication mechanism for login. Defaults to "false".

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

sasl-mechanisms optional A space or comma separated list of SASL mechanism names to try to use.

The attribute's value cannot be null.

sasl-authorizationid optional The authorization ID to use in the SASL authentication.

If not set, the authetication ID (user name) is used. The attribute's value cannot be null.

socketFactory-class optional If set, specifies the name of a class that implements the javax.net.SocketFactory interface.

This class will be used to create IMAP sockets. The attribute's value cannot be null.

socketFactory-fallback optional If set to "true", failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to "true".

The attribute's admitted values are:

  • false
  • true

The attribute's value cannot be null.

socketFactory-port optional Specifies the port to connect to when using the specified socket factory.

If not set, the default port will be used. The attribute's value cannot be null.

Might contain the sub-elements: