@Immutable
public class MtaAddress
extends Object
Modifier and Type | Field and Description |
---|---|
java.net.InetAddress |
address
IP address of MTA.
|
String |
dnsName
The host name as an RFC-5321 domain name or address-literal.
|
int |
port |
Constructor and Description |
---|
MtaAddress(org.xbill.DNS.Name dnsName,
java.net.InetAddress address)
Constructs a new MtaAddress with the default port, which is 25.
|
MtaAddress(String dnsName,
java.net.InetAddress address)
Constructs a new MtaAddress with the default port, which is 25.
|
MtaAddress(String smtpFormattedHost,
java.net.InetAddress address,
int port) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString()
Prints the address in a compact form for informational purposes.
|
public final String dnsName
public final java.net.InetAddress address
public final int port
public MtaAddress(String smtpFormattedHost, java.net.InetAddress address, int port)
smtpFormattedHost
- The host name as an RFC-5321 domain name or address-literal.
It comes from the content of a DNS MX record or an email
address with a literal address part, or a smart host or
back-end server name. For example:
address
- IP address of the MTAport
- port of the remote MTApublic MtaAddress(String dnsName, java.net.InetAddress address)
MtaAddress(String, InetAddress, int)
with port 25.public MtaAddress(org.xbill.DNS.Name dnsName, java.net.InetAddress address)
MtaAddress(String, InetAddress, int)
with port 25, and with a dnsName converted from the supplied DnsJava Name
object by removing the last dot. The trailing dot marks an absolute
domain name in DNS - but that syntax is invalid in SMTP.