org.subethamail.smtp
Interface MessageContext
- All Known Implementing Classes:
- Session
public interface MessageContext
Interface which provides context to the message handlers.
- Author:
- Jeff Schnitzer
getSMTPServer
SMTPServer getSMTPServer()
- Returns:
- the SMTPServer object.
getRemoteAddress
java.net.SocketAddress getRemoteAddress()
- Returns:
- the IP address of the remote server.
getAuthenticationHandler
AuthenticationHandler getAuthenticationHandler()
- Returns:
- the handler instance that was used to authenticate.
getHelo
java.lang.String getHelo()
- Returns:
- the host name or address literal the client supplied in the HELO
or EHLO command, or null if neither of these commands were
received yet. Note that SubEthaSMTP (along with some MTAs, but
contrary to RFC 5321) accept mail transactions without these
commands.
getTlsPeerCertificates
java.security.cert.Certificate[] getTlsPeerCertificates()
- Returns the identity of the peer which was established as part of the TLS handshake
as defined by
SSLSession.getPeerCertificates().
In order to get this information, override SMTPServer.createSSLSocket(java.net.Socket) and call
setNeedClientAuth(true) on the created socket.
- Returns:
- an ordered array of peer certificates, with the peer's own certificate first followed
by any certificate authorities, or null when no such information is available
- See Also:
SSLSession.getPeerCertificates()
Copyright © 2006-2011. All Rights Reserved.