Nukes Forum And JBoss Mail integration
This is still experimental. These instructions for setting it up are pretty brief meant for developers involved.
The following allows for integration between JBoss Mail and Nukes, so that users watching nukes topis/forums can reply to the mails sent out by Nukes and have their replies posted on the forums.
Set up Nukes and JBoss Mail "as usual". When setting up Nukes, make sure you install the bb module as that is where the forums are kept.
The reply to functionality is acheived by replacing the user part of the from email address with data identifying the user and post they are replying to. So if Nukes and JBoss Mail is integrated (see below), the from addresses on the emails the user receives will look something like 123_2326@jboss.org rather than nukes@jboss.org. A hash is appended to the subject for authentication purposes.
Build and install the nukes-jbmail "bridge"
It is kept under the nukes cvs directory structure, in the nukes/jbmail folder. Build it, and copy nukes-jbmail.ear to the %JBOSS_HOME%/server/default/nukes folder.
Set up JBoss Mail for integration with Nukes
The steps here are to
include the NukesPosterJMSListener at the top of the SMTPProtocol configuration
include the NukesPosterJMSListener in the list of mail-listeners. It should be entered near the top of the list.
<mbean code="org.jboss.mail.smtp.SMTPProtocol" name="jboss.mail:type=MailServices,name=SMTPProtocol"> <depends>jboss.mail:type=MailServices,name=MailListener</depends> <depends>jboss.mail:type=MailServices,name=MailListJMSListener</depends> <depends>jboss.mail:type=MailServices,name=NukesPosterJMSListener</depends> <depends>jboss.mail:type=MailServices,name=UserRepository,uimanageable=true</depends> <depends optional-attribute-name="DomainGroup">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends> <!-- Stuff removed for brevity --> <attribute name="Properties"> <properties> <!-- Stuff removed for brevity --> <property><name>mail-listeners</name> <values> <value>jboss.mail:type=MailServices,name=NukesPosterJMSListener</value> <value>jboss.mail:type=MailServices,name=MailListJMSListener</value> <value>jboss.mail:type=MailServices,name=MailListener</value> </values> </property> <!-- Stuff removed for brevity --> </properties> </attribute> </mbean>
Set up Nukes for integration with JBoss Mail
Go to http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=nukes.modules%3Aname%3Dbb
Set AllowReplyViaEmail to true, as this is what will cause the emails to have the extra information needed for posting
The BlockedUsers attribute takes a comma-separated string of ids of the users who cannot post to the forums.
The FloodInterval parameter contans the minumum amount of time that should pass between a users posts. (This also applies to posts via the web interface)
For testing it out on your local machine
Create a forum in Nukes
Set up a few test accounts in JBoss Mail
Create a few users in Nukes with email addresses matching the ones created above, and subscribe to the forum created.
Go to http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=nukes.modules%3Aname%3Dmail and set the following attributes:
Gateway to 'localhost' (i.e. the machine running JBoss Mail)
SmtpUser to one of the accounts who can send mail through your JBoss Mail setup
SmtpPassword to the password of the account used in SmtpUser
Mode to '1'
Under http://localhost:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=nukes.modules%3Aname%3Dbb you will want to change the From attribute to something like nukes@localhost.localdomain.com
Comments