ShowTable of Contents
Overview of the ReplyTo feature
You are able to follow Forums created in IBM® Connections 4.0 and post replies, given the correct permissions. The frequency with which you are notified of posts to a Forum you are following is determined by your email settings. If your email is configured to receive individual emails for Forum posts, you will be informed by email notification of each post made to a followed Forum.
When the ReplyTo feature is enabled, you can submit a new post to the Forum by replying to the email notifications. Figure 1 illustrates the processes involved in the ReplyTo feature, from the sending of the initial notification triggered by a Forum being followed, to the consumption of the reply back into IBM Connections.
Figure 1. ReplyTo process
When you receive the email notification about the new Forum entry, you see it contains details of the new Forum post. With the ReplyTo feature enabled, the “Reply to” address of the mail contains a unique ID along with a configurable prefix/suffix and domain, as shown in figure 2.
Figure 2. ReplyTo address
The unique ID is used to identify the recipient of the mail and the Forums topic to which they are replying. When you reply to this email, the “Reply to” address is used as the “To:” address for the reply.
IBM Connections 4.0 periodically runs a job that uses a mail session to fetch replies to ReplyTo notifications. The mail session retrieves all the emails from a given Inbox. When a ReplyTo notification is replied to, the mail server must catch the reply and move it to the Inbox so that the ReplyTo mail session will retrieve it. The manner in which the catching process is performed varies between mail servers.
This document describes methods for performing this action in Microsoft® Exchange 2010 and IBM Lotus® Domino® 8.5.2. When the replies are retrieved and processed, the unique ID contained in the To address is used to obtain a link back to the original Forums entry. The text in the reply is then set as a reply to the Forum post that was the subject of the original notification.
Configuration of ReplyTo
The configuration of ReplyTo can be broken down into a number of steps:
(1) Configuring ReplyTo feature on the Connections server
(2) Setting up mailboxes and rules
(3) Setting up the Connections mail session
(4) Enabling the ReplyTo per user
Configuring ReplyTo on Connections server
The ReplyTo feature can be enabled during the installation of IBM Connections 4.0 or in a post- installation step. This article refers to a number of configuration files for the server that are held in this directory:
The news-config.xml configuration file contains the settings in listing 1, which are used to enable and configure the ReplyTo feature.
Listing 1. news-config.xml confuration file
- We enable the ReplyTo feature by setting the enabled attributes of the <mailin> and <replyto> elements to true, as shown.
- The server provides the “Reply to” attribute of an email notification sent to a user who is set up to receive ReplyTo replies, with the address constructed in this format:
- The <replytoAddressFormat> element of the XML determines how these values are set.
- The <affix> element is used to specify a prefix or suffix that is used in conjunction with the unique ID.
- The “type” attribute can be set to either “prefix” or “suffix,” depending on which of these is required. Note that either a “suffix” or “prefix” can be set, but not both. Also, there is a limit of 28 characters for the length of the affix.
element contains the domain of the address that will be contained in the Reply to address and must be provided. The structure of this email address is important as it will be used by the mail server rule to catch emails to ReplyTo addresses. Depending on how the mail server is configured to catch all relevant emails and route to them the ReplyTo Inbox, you might need the addresses to match a specific, recognizable format.
If you can use a custom domain for the ReplyTo addresses, then you should not need to use a prefix or suffix, as the mail server can just check for the custom domain on incoming mails and route them accordingly. Alternatively, you might be able to route all emails to that domain to a specific Inbox without needing any pattern matching on the addresses.
However, when using a custom domain, your email infrastructure must be aware of the custom domain and be able to route emails to the appropriate server(s). If you cannot use a custom domain, then you must use a prefix or suffix in the email address that can be used to match addresses.
When choosing the prefix or suffix, be sure to use something that will be unique in your environment, so that the server rules you define to route all mails to the ReplyTo inbox do not pick up emails addressed to any users in the system.
Table 1 shows some example configurations and their resultant email addresses.
Table 1. Example configurations and addresses
Resultant email address
Note that the News application must be restarted for the changes to the news-config.xml file to take effect. Also, you must create a mail session used by the ReplyTo session, the process for which is described in subsequent sections of this article.
Setting up mailboxes and rules
This section describes how to construct the rules that catch a ReplyTo reply and move it to the ReplyTo Inbox. Details are provided for setting these up on Microsoft Exchange 2010 and Domino 8.5.2 mail servers.
The chosen mail server must be running the IMAP(S) service; the ReplyTo feature is not compatible with POP3.
Microsoft Exchange 2010
Create new mailbox
We must create a new mailbox to hold all the ReplyTo replies. Note that you should create a new user for the mailbox, rather than one that belongs to an existing Connections user. We can perform the new user creation either using Active Directory tools before creating the mailbox or during the mailbox creation.
A means of identifying the emails must then be put in place. We'll do this by setting up a domain to which only ReplyTo mails will be sent, and then having the rule catch all emails sent to this domain.
Setting up accepted domain
Using the Exchange Management Console, select the Organization/Hub Transport item in the left-most pane of the console, and then use the “New Accepted Domain...” action to create a new domain. This must match the domain that is specified in the <domain> element in the news-config.xml file in the previous example, “connections.example.com”.
Creating new rule
We must write a rule to catch all mails sent to this domain. With the Organization/Hub Transport item selected, use the “New Transport Rule” option to create a new rule:
- On the Conditions page, select “when the message header matches text patterns”
- Change the “message header” place holder to “To”.
- Change the “specific words” placeholder to be the domain you created. In the case in which a custom domain is not being used, match addresses by using the prefix or suffix.
- On the Actions page, select “redirect the message to”.
- Set the “addresses” placeholder to be the mailbox that holds all the ReplyTo replies.
You can test the rule by using a mail client to send an email to the domain; if the rule is working, the message will appear in the ReplyTo Inbox.
Lotus Domino 8.5
If a custom domain is being used for ReplyTo emails, a Foreign domain could be used to put all the replies into a single mailfile, as an alternative to using rules. The rest of this section describes how we can move the emails to an Inbox by using rules.
A rule can be set up on a Domino server to catch the ReplyTo replies. This time, we'll show how the prefix of the “Reply To” address can be used:
- Open the Domino Admin console and click the Domain tab.
- Expand Messaging in the navigator, and then click Configuration.
- Select the messaging server and click Edit Configuration.
- Click the Router/SMTP tab, then the Restrictions and Controls tab, and then the Rules tab.
- Click New Rule and create a rule that moves emails containing the prefix/suffix in the configuration from the To field to the ReplyTo box. For example:
When To contains icreplyto_ move to Database mail\replyto.nsf
where mail\replyto.nsf is the location and name of the dedicated email reply mailbox.
Note, however, that when Lotus Domino moves the mail using the rule, it will move the mail to the Sent view rather than the Inbox of the mail database (the ReplyTo feature reads from the Inbox). A Notes agent must be used to move the emails to the Inbox so the Connections server's task can retrieve the mails, as follows:
- Open the mail server in Lotus Notes and, in the People & Groups tab, expand PeoplebyOrganization.
- Edit the user's account that is used to direct reply mail:
Listing 2. LotusScript to add
- Click Open Mail File and select the View --- Agents menu item.
- Click New Agent and add the LotusScript shown in listing 2 to the agent.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Set db = session.CurrentDatabase
Set view = db.getView("$Sent")
Note that listing 2 is a reference script and may need adjustment for individual environments.
3. Finally, the agent must be set to run so as to move the emails:
- Open the agent properties and, in the Options section, select Shared.
- In the Runtime section, select On schedule, and then select More than once a day.
- In the Target field, select All new & modified documents.
- Set a schedule, for example, have it run every 5 minutes, all day.
- Before running the script ensure you have the adequate permissions to run it.
Setting up the Connections mail session
A mail session must be set up on the WebSphere Connections server to retrieve emails from the ReplyTo Inbox. If you chose to enable ReplyTo during the installation wizard, this will be configured for you by use of the details provided during the install.
Table 2. Mail session details
- Access the WebSphere Console using a Web Browser.
- On the navigation tree, select the “Resources/Mail/Mail Sessions” item.
- Choose the scope of the mail session, using the drop-down list; for example, Cell, and then click the New button to create the new mailsession.
- Set the details for the mail session as shown in table 2, and restart the server for the changes to take effect.
Incoming mail properties:
Server containing the MailServer
IMAP(S) - *ReplyTo feature only works with IMAP
The User and password fields must be set to the user who owns the ReplyTo mailbox.
Enabling ReplyTo for users
The final step is for a user who wants to use the ReplyTo feature to ensure that the feature is enabled for them.
A default setting applied to every new user when ReplyTo is enabled is contained in the notification-config.xml file (there are other settings within the element):
<defaultEmailPreferences>The above setting enables the ReplyTo feature by default for each new user, once it is enabled on the server. The settings to enable the ReplyTo feature for a user are contained in the Notification Preferences section of the Email Settings window (see figure 3).
Figure 3. Notifications Preferences section
The “Allow me to reply to notifications by email” checkbox is visible only when the ReplyTo feature is enabled. The checkbox must be checked before the user will receive notifications to which they can reply.
The user must also have their Forums notification frequency set to “Individual Emails” in the “How often do I want to be notified about” section of the Email Settings window as shown in figure 4.
Figure 4. “How often do I want to be notified about” section
Troubleshooting problems with the ReplyTo configuration
Table 3 provides help for cases in which the ReplyTo feature doesn't seem to be working after it's been enabled.
Table 3. Troubleshooting ReplyTo issues
Administering the ReplyTo feature
Each ReplyTo reply contains a unique ID as part of the address that that refers to a particular post in a Forum. A ReplyTo notification can be replied to any number of times, with each reply becoming a post on the Forum related to the original item.
When you want to stop replies to a Forum entry, using the ReplyTo feature, the following sections describe various ways to do this.
Removing compromised ReplyTo ID
If it is found that a ReplyTo notification for a user is being used to submit Spam or unwanted posts, you can take the following actions:
Disable all current ReplyTo IDs for a user. Users can cancel the ID of ReplyTo notifications they own by using “Disable support for replying to existing notifications” on the Email Settings window (see figure 4).
Figure 4. “Disable support for replying to existing notifications”
After the action is confirmed, any replies sent using an existing notification for the user will fail. The user can still reply to new notifications sent after the action has taken place.
Use wsadmin commands to disable ReplyTo IDs. There are a number of wsadmin commands available to remove ReplyTo IDs that various criteria for selecting the Ids to cancel:
1. To invoke the wsadmin interface, first change to the directory in which the Deployment Manager is installed:
2. Start the wsadmin command, using one of the following commands: \profiles\dm_profile_root\bin
AIX®/Linux®:3. Then, start the news configuration for wsadmin within the wsadmin console, using the command:The commands shown in table 4 can now be used to remove ReplyTo IDs for a number of different criteria.
./wsadmin.sh -lang jython -user -password -port SOAP_CONNECTOR_ADDRESS Port
wsadmin -lang python -user -password -port SOAP_CONNECTOR_ADDRESS Port
Table 4. Commands to remove ReplyTo IDs
Removing expired ReplyTo IDs
It's desirable to remove from the system ReplyTo IDs that belong to Forum posts that are beyond a certain age. The task “ReplyToIdCleanup” is run periodically by the Connections Scheduler to remove these expired ReplyTo IdD, by default running once a week. The job can be configured to run at other intervals by amending its definition in the news-config.xml file (see listing
Listing 3. Amending job definition
interval=”0 0 4 ? * SAT”
The maximum age of ReplyTo IDs is also configured in the news-config.xml file. In this example any ReplyTo ID created more than 365 days ago will be removed:
Cleaning attachment directory
When ReplyTo replies with attachments are processed, the attachments are temporarily placed in a directory on the server, the name of which is contained in the MAILIN_ATTACHMENT_DIR WebSphere variable. These attachments are removed once they have been processed.
However, there could be instances when the attachments aren't removed due to errors handling a reply. The “ReplyToAttachmentCleanup” task is run perodically by the Connections Scheduler to remove any files left in this directory. By default the process is run once a week.
Configuration for the task is contained in the news-config.xml file and can be changed so that the task is run at different intervals.
This article has explained in detail how the Mail-in feature, ReplyTo, works. It also has provided details of how to configure IBM Connections (WebSphere), how to set up the Microsoft Exchange 2010 and Domino 8.5.2 mail servers, and how to administer the Mail-in setup.
Tell us what you think
Please visit this link to take a one-question survey about this article:
Participate in the IBM Connections Forum:
IBM Connections documentation page:
IBM Connections product page:
About the authors
Jim Antill is a Software Developer and has been at IBM for four years.
He is currently working on the Connections 4.0 project in which he was involved in developing the ReplyTo feature, among other things. Previously Jim worked on the IBM Lotus Quickr for WebSphere Portal project developing the Members List functionality. He can be contacted at email@example.com.
Brian O'Gorman is an Advisory Software Developer and has been at IBM since 2004. He is currently the lead for Connectipons Homepage, ActivityStreams UI, Notifications, and ReplyTo, and has previously worked on Lotus Quickr for Domino and on Composite Applications in Lotus Expeditor and Lotus Notes.
Stephen Crawford is a Software Developer and has been at IBM since 2008.
He is currently working on Homepage, ActivityStream UI, and Notifications in IBM Connections. Previously he has worked on Quickr for WebSphere Portal as part of the Level 3 Customer Excellence team.