james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1665046 - /james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java
Date Sun, 08 Mar 2015 16:06:57 GMT
Author: eric
Date: Sun Mar  8 16:06:56 2015
New Revision: 1665046

URL: http://svn.apache.org/r1665046
Log:
Incorrect reporting of sending SMTP server hostname, patch contributed by Robert Munn (JAMES-1568)

Modified:
    james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java

Modified: james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java?rev=1665046&r1=1665045&r2=1665046&view=diff
==============================================================================
--- james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java
(original)
+++ james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java
Sun Mar  8 16:06:56 2015
@@ -56,6 +56,7 @@ import javax.mail.internet.MimeMultipart
 import javax.mail.internet.MimePart;
 import javax.mail.internet.ParseException;
 
+import org.apache.geronimo.javamail.transport.smtp.SMTPTransport;
 import org.apache.james.dnsservice.api.DNSService;
 import org.apache.james.dnsservice.api.TemporaryResolutionException;
 import org.apache.james.dnsservice.library.MXHostAddressIterator;
@@ -957,9 +958,10 @@ public class RemoteDelivery extends Gene
                     // "mail.smtp.dsn.notify" //default to nothing...appended as
                     // NOTIFY= after RCPT TO line.
 
-                    Transport transport = null;
+                    SMTPTransport transport = null;
                     try {
-                        transport = session.getTransport(outgoingMailServer);
+                        transport =  (SMTPTransport) session.getTransport(outgoingMailServer);
+                        transport.setLocalHost( props.getProperty("mail.smtp.localhost",
heloName) );
                         try {
                             if (authUser != null) {
                                 transport.connect(outgoingMailServer.getHostName(), authUser,
authPass);



---------------------------------------------------------------------
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