
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.