# Batch script to configure the custom MyOtherMail mail session # Start batching commands batch # Create the custom MyOtherMail mail session /subsystem=mail/mail-session=MyOtherMail:add(jndi-name=java:jboss/mail/MyOtherMail,debug=true) # Configure the custom SMTP, POP3, and IMAP socket binding groups /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-smtp-binding:add(host=${MAIL_SERVER_ADDRESS:localhost},port=1025) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-pop3-binding:add(host=${MAIL_SERVER_ADDRESS:localhost},port=1110) /socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=my-imap-binding:add(host=${MAIL_SERVER_ADDRESS:localhost},port=1143) # Add the custom socket binding groups to the custom MyOtherMail mail session /subsystem=mail/mail-session=MyOtherMail/server=smtp:add(outbound-socket-binding-ref=my-smtp-binding,username="user01@mail.local",password=1234) /subsystem=mail/mail-session=MyOtherMail/server=pop3:add(outbound-socket-binding-ref=my-pop3-binding) /subsystem=mail/mail-session=MyOtherMail/server=imap:add(outbound-socket-binding-ref=my-imap-binding, username="user02@mail.local",password=1234) # Run the batch commands run-batch # Reload the server configuration #reload