]
David Lloyd commented on WFLY-1469:
-----------------------------------
I think the better solution in this case would be to use (or allow the user to use) a
deployment descriptor which creates and binds custom mail sessions. I think any time
users are compelled to perform management operations on startup, it is because we are
missing DD functionality.
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
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: