You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2019/09/14 12:07:13 UTC
[ant] branch master updated: Send FQDN instead of simple hostname
in SMTP HELO command
This is an automated email from the ASF dual-hosted git repository.
jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 451ecde Send FQDN instead of simple hostname in SMTP HELO command
451ecde is described below
commit 451ecde5c915d94fdb6c5c8e59b291868290bc14
Author: mguessan@free.fr <gdeYUExU5NGUKyzpdORa>
AuthorDate: Tue Sep 3 13:05:31 2019 +0200
Send FQDN instead of simple hostname in SMTP HELO command
This closes #101 pull request at github/apache/ant repo
---
CONTRIBUTORS | 1 +
WHATSNEW | 7 +++++++
contributors.xml | 4 ++++
src/main/org/apache/tools/mail/MailMessage.java | 2 +-
src/tests/junit/org/apache/tools/mail/MailMessageTest.java | 2 +-
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c269a67..4d7a8cf 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -292,6 +292,7 @@ Michael Newcomb
Michael Nygard
Michael Saunders
Michael Seele
+Mickaël Guessant
Miha
Mike Davis
Mike Roberts
diff --git a/WHATSNEW b/WHATSNEW
index fa6604b..4f199b8 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,13 @@
Changes from Ant 1.10.7 TO Ant 1.10.8
=====================================
+=======
+Other changes:
+--------------
+
+ * org.apache.tools.mail.MailMessage will now send a fully qualified
+ domain name in its HELO message.
+ Github Pull Request #101
Changes from Ant 1.10.6 TO Ant 1.10.7
=====================================
diff --git a/contributors.xml b/contributors.xml
index 44c77e0..e73660b 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -1213,6 +1213,10 @@
<last>Seele</last>
</name>
<name>
+ <first>Mickaël</first>
+ <last>Guessant</last>
+ </name>
+ <name>
<last>Miha</last>
</name>
<name>
diff --git a/src/main/org/apache/tools/mail/MailMessage.java b/src/main/org/apache/tools/mail/MailMessage.java
index bb16c48..48b1550 100644
--- a/src/main/org/apache/tools/mail/MailMessage.java
+++ b/src/main/org/apache/tools/mail/MailMessage.java
@@ -393,7 +393,7 @@ public class MailMessage {
}
void sendHelo() throws IOException {
- String local = InetAddress.getLocalHost().getHostName();
+ String local = InetAddress.getLocalHost().getCanonicalHostName();
int[] ok = {OK_HELO};
send("HELO " + local, ok);
}
diff --git a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
index 944e889..72ee1fa 100644
--- a/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
+++ b/src/tests/junit/org/apache/tools/mail/MailMessageTest.java
@@ -44,7 +44,7 @@ public class MailMessageTest {
@Before
public void setUp() {
try {
- local = InetAddress.getLocalHost().getHostName();
+ local = InetAddress.getLocalHost().getCanonicalHostName();
} catch (java.net.UnknownHostException uhe) {
// ignore
}