james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r487587 - /james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java
Date Fri, 15 Dec 2006 16:09:18 GMT
Author: norman
Date: Fri Dec 15 08:09:17 2006
New Revision: 487587

URL: http://svn.apache.org/viewvc?view=rev&rev=487587
Log:
Add EHLO/HELO informations the Received header. See JAMES-652

Modified:
    james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java

Modified: james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java?view=diff&rev=487587&r1=487586&r2=487587
==============================================================================
--- james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java (original)
+++ james/server/trunk/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java Fri Dec
15 08:09:17 2006
@@ -210,11 +210,21 @@
         MailHeaders newHeaders = new MailHeaders();
         
         String heloMode = (String) session.getConnectionState().get(SMTPSession.CURRENT_HELO_MODE);
-        
+        String heloName = (String) session.getConnectionState().get(SMTPSession.CURRENT_HELO_NAME);
+
         // Put our Received header first
         headerLineBuffer.append(RFC2822Headers.RECEIVED + ": from ")
-                        .append(session.getRemoteHost())
-                        .append(" ([")
+                        .append(session.getRemoteHost());
+        
+        if (heloName != null) {
+            headerLineBuffer.append(" (")
+                            .append(heloMode)
+                            .append(" ")
+                            .append(heloName)
+                            .append(") ");
+        }
+        
+        headerLineBuffer.append(" ([")
                         .append(session.getRemoteIPAddress())
                         .append("])");
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message