Hi Laurent,

Laurent Rouvet wrote:
Hi,

Is it the time to remove the RemoteDeliverySocketFactory and to have ability to have multiple binding ?

I planned to do that change in past but I had to keep the socket factory because one of my production servers had problems with the total number of connections opened (that I never had time to investigate too much) and I fixed using a custom socket factory:

----
public class RemoteDeliverySocketFactoryTimeout extends RemoteDeliverySocketFactory {

    public static final int TIMEOUT = 300000;

    /**
     * the same as the similarly named javax.net.SocketFactory operation.
     */
    public static SocketFactory getDefault() {
        return new RemoteDeliverySocketFactoryTimeout();
    }

    public Socket createSocket() throws SocketException {
        Socket s = new Socket();
        s.setSoTimeout(TIMEOUT);
        return s;
    }

    public Socket createSocket(String host, int port)
                            throws IOException, UnknownHostException {
        Socket s = new Socket();
        s.setSoTimeout(TIMEOUT);
        s.connect(new InetSocketAddress(host,port),60000);
        return s;
    }

public Socket createSocket(InetAddress host, int port) throws IOException {
        Socket s = new Socket();
        s.setSoTimeout(TIMEOUT);
        s.connect(new InetSocketAddress(host,port),60000);
        return s;
    }

}
-----

So I think we can remove that object but keep the ability to use an external factory to be used when the default javamail socket factory is not enough.

Should we use mail.smtp.bindAdress or mail.smtp.localaddr ?

mail.smtp.localaddr/mail.smtp.localport seems to be the only properties used: where did you find about mail.smtp.bindAdress ?

I'll be happy to do and test it... ;-)

If you do that, please open a JIRA issue and attach your patch granting rights to ASF for inclusion.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to