]
Tomaz Cerar commented on WFLY-1469:
-----------------------------------
Issue is not remote socket binding but fact that mail session is started when you call
:add for mail session and as you later add smtp configuation it is not applied to running
session.
I will fix that adding of server config under mail session will reload session but to have
code portable from 7.1.0 all way up to WildFly 8 you would need to run it in a batch /
composite operation.
at least looking at
Mail Service does not honor remote socket binding without config
reload
-----------------------------------------------------------------------
Key: WFLY-1469
URL:
https://issues.jboss.org/browse/WFLY-1469
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
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@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@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/basi...
However, when using this to send mail, getting the default port of "25", not
"25000" as I've specified in the config:
{code}[0m[0m23:54:17,102 INFO [stdout] (default task-1) DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
[0m[0m23:54:17,103 INFO [stdout] (default task-1) DEBUG SMTP: useEhlo true, useAuth
false
[0m[0m23: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: