JBoss mail configuration

From OpenKM Documentation
Revision as of 19:41, 25 January 2010 by Pavila (talk | contribs) (Created page with 'OpenKM is a J2EE application deployed in JBoss application server. Some parameters have a default configuration that fit common user requirements but others depends on specific u…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

OpenKM is a J2EE application deployed in JBoss application server. Some parameters have a default configuration that fit common user requirements but others depends on specific user configuration.


Nota clasica.png For specific JBoss issues, visit http://jboss.org/community/docs/DOC-10376.

OpenKM sometimes send mail to users (because they have subscribed a document or folder, for example) and you have to check that this mail configuration is correct. If you edit the file $JBOSS_HOME/server/default/deploy/mail-service.xml:

$ vim $JBOSS_HOME/server/default/deploy/mail-service.xml

You will see something like this:

<mbean code="org.jboss.mail.MailService" name="jboss:service=OpenKM">
  <attribute name="JNDIName">java:/mail/OpenKM</attribute>
  <attribute name="User">nobody</attribute>
  <attribute name="Password">password</attribute>
  <attribute name="Configuration">
    <!-- A test configuration -->
    <configuration>
      <!-- Change to your mail server prototocol -->
      <property name="mail.store.protocol" value="pop3"/>
      <property name="mail.transport.protocol" value="smtp"/>
      <!-- Change to the user who will receive mail  -->
      <property name="mail.user" value="nobody"/>
      <!-- Change to the mail server -->
      <property name="mail.pop3.host" value="pop3.your-domain.com "/>
      <!-- Change to the SMTP gateway server -->
      <property name="mail.smtp.host" value="smtp.your-domain.com "/>
      <!-- The mail server port -->
      <property name="mail.smtp.port" value="25"/>
      <!-- Change to the address mail will be from -->
      <property name="mail.from" value="noreply@your-domain.com"/>
      <!-- Enable debugging output from the javamail classes -->
      <property name="mail.debug" value="false"/>
    </configuration>
  </attribute>
  <depends>jboss:service=Naming</depends>
</mbean>

Typically you only have to configure these parameters:

  • mail.smtp.host: this is the host where is located your mail server. Can be localhost if you have a local mail server installed (like Postfix)
  • mail.from: all the mails send by OpenKM will be from this mail. Can be in the form of noreply@your-domain.com.

But it depends on you own mail configuration. If you run intro troubles, set the parameter mail.debug to true and revise the JBoss log.

$ tail -f $JBOSS_HOME/server/default/log/server.log

For more info, read http://jboss.org/community/docs/DOC-11056.