Package gnu.mail.providers.nntp

This is a provider for the Network News Transfer Protocol (NNTP), as detailed in RFC 977.

See: Description

Package gnu.mail.providers.nntp Description

This is a provider for the Network News Transfer Protocol (NNTP), as detailed in RFC 977.

This provider uses the XHDR command introduced in RFC 2980.

The provider can store the state of subscribed newsgroups and read articles on the local host, using the standard newsrc mechanism.

The provider includes both a Store and a Transport implementation. Due to JavaMail limitations, the transport protocol is called "nntp-post". Use the same connection setting as the store to post articles. The messages to be sent must be MimeMessages, and they must have a recipient of type MimeMessage.RecipientType.NEWSGROUPS, of which the address is a NewsAddress.

This provider supports secured connections via TLS. However, you should use "nntps" (resp. "nntps-post") in order to create encrypted connections, as the setting "tls" to "true" triggers use of the STARTTLS command whose support on the server side cannot be verified without implementation of RFC 3977.

This provider supports the following properties:

Name Type Description IP address or hostname The NNTP server to connect to.
mail.nntp.port integer (>=1) The port to connect to, if not the default.
mail.nntp.user username The default username for NNTP.
mail.nntp.connectiontimeout integer (>=1) Socket connection timeout, in milliseconds. Default is no timeout.
mail.nntp.timeout integer (>=1) Socket I/O timeout, in milliseconds. Default is no timeout.
mail.nntp.tls boolean If set to false, TLS negotiation will not be attempted.
mail.nntp.trustmanager String The name of a class implementing the interface, which will be used to determine trust in TLS negotiation.
mail.nntp.newsrc.file file path The file path to the file to use as newsrc. Defaults to ${user.home}/.newsrc-${host} or ${user.home}/.newsrc
mail.nntp.listall boolean If set to true, calling Folder.list on the root folder will actually attempt to list all newsgroups. Since there are upwards of 30,000 newsgroups on Usenet, this option should be used with caution. Otherwise a small subset of default newsgroups are returned.