« Retour - Message Boards...

Mailing Functionality in Message Boards

The message boards supports email both as a means to send new posts to users and as a way for those users to answer posts or create new threads. This article describes this functionality, how it can be configured and some details about its implementation.

Description #

Users are allowed to subscribe to threads of categories using the web UI. Liferay keeps a list of all users that have subscribed in the database. When a new post is written in the message boards Liferay queries the database (asynchronously) to retrieve the users that are subscribed to the thread where the post is attached and the hierarchy categories to which it belongs and sends each of them an email with the content of the post.

The second part of the implementation allows users to answer to those emails or even write their own new threads using email. To achieve that Liferay assigns an email address to each category in the message boards. Such address is automatically added to the reply-to headers of emails sent to subscriber so that a simple reply to mails received from the message board will result in a new post in the appropriate place. Besides the reply-to header a second header is used so that when a user replies the original message is identified and the message boards can do proper threading.

Configurability #

This functionality allows for several configuration options, including the ability to set up the 'From' address that subscribers will see, the content of the messages sent, etc.

Limitations #

Some known limitations of the implementation are:

  • Email responses do not support formatting, only plain text
  • Lack of listing and management of subscribers
  • Support for attachments
  • Support for secure methods for identifying the user

Implementation details #

Liferay uses JavaMail for sending the emails and sub-etha to receive them. E-mails are received through port 48625 in the events.liferay.com (where 'events' is configurable and 'liferay.com' should be substituted by the mx of the company). Port 48625 is unlikely to cause conflicts because it was unused by known software . Furthermore it has been registered as being used by Liferay in several ports databases (such as http://ports.tantalo.net/?q=48625).

Frequent questions #

Does it work in a cluster? #

Yes. Liferay acts as an SMTP server that listens to in a subdomain of the portal, which gives great flexibility. Based on that you have two solutions:

  • Configure the DNS to redirect all requests to only one of the Liferay servers. This is the simplest solution but introduces a single point of failure.
  • Use an SMTP balancing mechanism to balance the SMTP messages to several Liferay servers.

Can an administrator manage the subscribers? #

No, as of now only users can decide when to subscribe or unsubscribe, through the web UI.

Related Articles #

Message Board: enable listserv feature

How to use the Message Board as a Mailing List

Moyenne (0 Voter)
L'estimation moyenne est de 0.0 étoiles sur 5.
Commentaires
Réponses Auteur Données
Does anyone know whether this functionality... Steve Ricker 9 septembre 2009 16:26
It has, but has been changed. As of 5.2.3,... Mark Round 20 novembre 2009 07:46
Hi! Could anyone tell me how could a user... Mónica Rubio 29 mars 2010 03:58
This quote: Liferay queries the database... David H Nebinger 26 septembre 2012 20:20

Does anyone know whether this functionality still exists as of version 5.2? Namely, is it still possible to configure the Message Board to receive reply emails such that "...Liferay acts as an SMTP server that listens to in a subdomain of the portal..." as per the above?

Thank you for any replies or updates on this.
Publié le 09/09/09 16:26.
It has, but has been changed. As of 5.2.3, here's how to do it :

Set the SMTP server up in the admin console, and subscribe to a thread. Make sure you receive notifications, and that outbound mail for your Liferay system is working OK. Then, set the following in portal-ext.properties :

pop.server.notifications.enabled=true
pop.server.notifications.interval=1
pop.ser­ver.subdomain=events

Message notifications then have a reply-to of things like <mb.10749.10901@events.example.com>. You need to set up a MX record for the events.example.com subdomain to send it to a mail server, that will place all mails in a single mailbox (a "catch-all" mailbox for that domain). This is trivial in postfix, for instance.

Then, make that mail box available over POP3 and give Liferay the login details in the admin console, Server Administration->Mail. You should see it login once a minute, and then any replies recieved will be added to the message board.
Publié le 20/11/09 07:46 en réponse à Steve Ricker.
Hi!
Could anyone tell me how could a user create his own new thread using email?

I want to create a new thread in a category A each time somebody creates another thread in a category B and link these threads.I had thought i could use this mailing functionality for getting it. Each time somebody created one
thread in category B an email account would receive a notification and an automatic reply would create the corresponding new thread in category B.

Thanks in advance.
Publié le 29/03/10 03:58.
This quote:
Liferay queries the database (asynchronously) to retrieve the users that are subscribed to the thread

is not quite accurate. When a post is submitted, a message is pushed onto the Liferay Message Bus. A listener on the bus receives the notice, and it queries the database synchronously.

The entire process is asynchronous, but the query of the database is synchronous within the message bus listener.
Publié le 26/09/12 20:20.