The solution is to test into MailUtil.java if the current comment is approved.
The method sendEmailNotification is called if an user posts a comment or when the admin validate a comment waiting for.

In this method, we must add this line "if (commentObject.getApproved())" to test if the current comment is right.
Else as the previous bug explains, others subscribers will be received an email for non approval comments.

Thanks a lot for your reading
Best regards,

// If we are to notify subscribers, then...
if (notifySubscribers) {
log.debug("Sending notification email to all subscribers");

// Get all the subscribers to this comment thread
List comments = entry.getComments(true, true);
for (Iterator it = comments.iterator(); it.hasNext() {
WeblogEntryComment comment = (WeblogEntryComment) it.next();
if (!StringUtils.isEmpty(comment.getEmail())) {
// If user has commented twice,
// count the most recent notify setting
if (commentObject.getApproved()) {
if (comment.getNotify().booleanValue()) {
// only add those with valid email
if (comment.getEmail().matches(EMAIL_ADDR_REGEXP))

Nicolas Muller
added a comment - 06/Mar/13 12:40 Hello,
We met this problem in production : Comment notifcation emails being sent before comment approval https://issues.apache.org/jira/browse/ROL-1926
The solution is to test into MailUtil.java if the current comment is approved.
The method sendEmailNotification is called if an user posts a comment or when the admin validate a comment waiting for.
In this method, we must add this line "if (commentObject.getApproved())" to test if the current comment is right.
Else as the previous bug explains, others subscribers will be received an email for non approval comments.
Thanks a lot for your reading
Best regards,
// If we are to notify subscribers, then...
if (notifySubscribers) {
log.debug("Sending notification email to all subscribers");
// Get all the subscribers to this comment thread
List comments = entry.getComments(true, true);
for (Iterator it = comments.iterator(); it.hasNext() {
WeblogEntryComment comment = (WeblogEntryComment) it.next();
if (!StringUtils.isEmpty(comment.getEmail())) {
// If user has commented twice,
// count the most recent notify setting
if (commentObject.getApproved()) {
if (comment.getNotify().booleanValue()) {
// only add those with valid email
if (comment.getEmail().matches(EMAIL_ADDR_REGEXP))
{
log.info("Add to subscribers list : " + comment.getEmail());
subscribers.add(comment.getEmail());
}
} else
{
// remove user who doesn't want to be notified
log.info("Remove from subscribers list : " + comment.getEmail());
subscribers.remove(comment.getEmail());
}
}
}
}
} else
{
log.debug("Sending notification email only to weblog owner");
}