Prefix IPv6-addresses with "IPV6:" in EHLO command.
Fixes issue 1708
This commit is contained in:
parent
3812c75f66
commit
576078e778
1 changed files with 9 additions and 2 deletions
|
@ -183,8 +183,15 @@ public class SmtpTransport extends Transport
|
|||
|
||||
if (localHost.equals(localAddress.getHostAddress()))
|
||||
{
|
||||
// IP was returned
|
||||
localHost = "[" + localHost + "]";
|
||||
// We don't have a FQDN, so use IP address.
|
||||
if (localAddress instanceof Inet6Address)
|
||||
{
|
||||
localHost = "[IPV6:" + localHost + "]";
|
||||
}
|
||||
else
|
||||
{
|
||||
localHost = "[" + localHost + "]";
|
||||
}
|
||||
}
|
||||
|
||||
List<String> results = executeSimpleCommand("EHLO " + localHost);
|
||||
|
|
Loading…
Reference in a new issue