[jboss-jira] [JBoss JIRA] (WFLY-1469) Mail Service does not honor remote socket binding

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Fri Jun 7 02:55:55 EDT 2013


Andrew Rubinger created WFLY-1469:
-------------------------------------

             Summary: Mail Service does not honor remote socket binding
                 Key: WFLY-1469
                 URL: https://issues.jboss.org/browse/WFLY-1469
             Project: WildFly
          Issue Type: Bug
          Components: Mail
    Affects Versions: 8.0.0.Alpha1
            Reporter: Andrew Rubinger
            Assignee: Tomaz Cerar


I'm finding that the mail service is not honoring the association with a specific outbound socket binding.

Configuration of Mail Session and Socket Binding:
{code}[standalone at localhost:9990 /] /subsystem=mail/mail-session=java\:jboss\/mail\/ALR/server=smtp:read-resource
{
    "outcome" => "success",
    "result" => {
        "outbound-socket-binding-ref" => "mail-smtp-25000",
        "password" => undefined,
        "ssl" => false,
        "tls" => false,
        "username" => undefined
    }
}
[standalone at localhost:9990 /] /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp-25000:read-resource(recursive="true")
{
    "outcome" => "success",
    "result" => {
        "fixed-source-port" => false,
        "host" => "localhost",
        "port" => 25000,
        "source-interface" => undefined,
        "source-port" => undefined
    }
}{code}

Code to inject the Mail Session:

{code}@Resource(lookup = "java:jboss/mail/ALR")
    private Session mailSession;{code}

This injection succeeds, as I'd expect based on the tests: 
https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/mail/annotation/StatelessMail.java#L46

However, when using this to send mail, getting the default port of "25", not "25000" as I've specified in the config:

{code}23:54:17,102 INFO  [stdout] (default task-1) DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
23:54:17,103 INFO  [stdout] (default task-1) DEBUG SMTP: useEhlo true, useAuth false
23:54:17,103 INFO  [stdout] (default task-1) DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false{code}

I don't see anything in the testsuite attempting to broker mail through a non-default configuration.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the jboss-jira mailing list