Browse Source

Send FQDN instead of simple hostname in SMTP HELO command

This closes #101 pull request at github/apache/ant repo
master
mguessan@free.fr Jaikiran Pai 5 years ago
parent
commit
451ecde5c9
5 changed files with 14 additions and 2 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +7
    -0
      WHATSNEW
  3. +4
    -0
      contributors.xml
  4. +1
    -1
      src/main/org/apache/tools/mail/MailMessage.java
  5. +1
    -1
      src/tests/junit/org/apache/tools/mail/MailMessageTest.java

+ 1
- 0
CONTRIBUTORS View File

@@ -292,6 +292,7 @@ Michael Newcomb
Michael Nygard Michael Nygard
Michael Saunders Michael Saunders
Michael Seele Michael Seele
Mickaël Guessant
Miha Miha
Mike Davis Mike Davis
Mike Roberts Mike Roberts


+ 7
- 0
WHATSNEW View File

@@ -1,6 +1,13 @@
Changes from Ant 1.10.7 TO Ant 1.10.8 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 Changes from Ant 1.10.6 TO Ant 1.10.7
===================================== =====================================


+ 4
- 0
contributors.xml View File

@@ -1212,6 +1212,10 @@
<first>Michael</first> <first>Michael</first>
<last>Seele</last> <last>Seele</last>
</name> </name>
<name>
<first>Mickaël</first>
<last>Guessant</last>
</name>
<name> <name>
<last>Miha</last> <last>Miha</last>
</name> </name>


+ 1
- 1
src/main/org/apache/tools/mail/MailMessage.java View File

@@ -393,7 +393,7 @@ public class MailMessage {
} }


void sendHelo() throws IOException { void sendHelo() throws IOException {
String local = InetAddress.getLocalHost().getHostName();
String local = InetAddress.getLocalHost().getCanonicalHostName();
int[] ok = {OK_HELO}; int[] ok = {OK_HELO};
send("HELO " + local, ok); send("HELO " + local, ok);
} }


+ 1
- 1
src/tests/junit/org/apache/tools/mail/MailMessageTest.java View File

@@ -44,7 +44,7 @@ public class MailMessageTest {
@Before @Before
public void setUp() { public void setUp() {
try { try {
local = InetAddress.getLocalHost().getHostName();
local = InetAddress.getLocalHost().getCanonicalHostName();
} catch (java.net.UnknownHostException uhe) { } catch (java.net.UnknownHostException uhe) {
// ignore // ignore
} }


Loading…
Cancel
Save