mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
EHLO local host address
This commit is contained in:
parent
1804e75911
commit
7515a321c4
2 changed files with 8 additions and 6 deletions
|
@ -604,12 +604,13 @@ public class FragmentIdentity extends FragmentBase {
|
||||||
else
|
else
|
||||||
props.put("mail.smtps.localhost", host);
|
props.put("mail.smtps.localhost", host);
|
||||||
} else {
|
} else {
|
||||||
String haddr = (ip instanceof Inet6Address ? "IPv6:" : "") + ip.getHostAddress();
|
InetAddress localhost = InetAddress.getLocalHost();
|
||||||
|
String haddr = "[" + (localhost instanceof Inet6Address ? "IPv6:" : "") + localhost.getHostAddress() + "]";
|
||||||
Log.i("Check local address=" + haddr);
|
Log.i("Check local address=" + haddr);
|
||||||
if (starttls)
|
if (starttls)
|
||||||
props.put("mail.smtp.localaddress", haddr);
|
props.put("mail.smtp.localhost", haddr);
|
||||||
else
|
else
|
||||||
props.put("mail.smtps.localaddress", haddr);
|
props.put("mail.smtps.localhost", haddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create session
|
// Create session
|
||||||
|
|
|
@ -1920,12 +1920,13 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
else
|
else
|
||||||
props.put("mail.smtps.localhost", ident.host);
|
props.put("mail.smtps.localhost", ident.host);
|
||||||
} else {
|
} else {
|
||||||
String haddr = (ip instanceof Inet6Address ? "IPv6:" : "") + ip.getHostAddress();
|
InetAddress localhost = InetAddress.getLocalHost();
|
||||||
|
String haddr = "[" + (localhost instanceof Inet6Address ? "IPv6:" : "") + localhost.getHostAddress() + "]";
|
||||||
EntityLog.log(ServiceSynchronize.this, "Send local address=" + haddr);
|
EntityLog.log(ServiceSynchronize.this, "Send local address=" + haddr);
|
||||||
if (ident.starttls)
|
if (ident.starttls)
|
||||||
props.put("mail.smtp.localaddress", haddr);
|
props.put("mail.smtp.localhost", haddr);
|
||||||
else
|
else
|
||||||
props.put("mail.smtps.localaddress", haddr);
|
props.put("mail.smtps.localhost", haddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create session
|
// Create session
|
||||||
|
|
Loading…
Reference in a new issue