Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 19734)
+++ wp-includes/comment.php	(working copy)
@@ -569,16 +569,16 @@
 	return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value);
 }
 
-/**  
- * Sets the cookies used to store an unauthenticated commentator's identity. Typically used  
- * to recall previous comments by this commentator that are still held in moderation.  
- *  
+/**
+ * Sets the cookies used to store an unauthenticated commentator's identity. Typically used
+ * to recall previous comments by this commentator that are still held in moderation.
+ *
  * @param object $comment Comment object.
  * @param object $user Comment author's object.
  *
  * @since 3.4.0
- */  
-function wp_set_comment_cookies($comment, $user) {  
+ */
+function wp_set_comment_cookies($comment, $user) {
 	if ( $user->ID )
 		return;
 
@@ -586,7 +586,7 @@
 	setcookie('comment_author_' . COOKIEHASH, $comment->comment_author, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
 	setcookie('comment_author_email_' . COOKIEHASH, $comment->comment_author_email, time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
 	setcookie('comment_author_url_' . COOKIEHASH, esc_url($comment->comment_author_url), time() + $comment_cookie_lifetime, COOKIEPATH, COOKIE_DOMAIN);
-}  
+}
 
 /**
  * Sanitizes the cookies sent to the user already.
@@ -1331,6 +1331,7 @@
  *
  * @since 1.5.0
  * @uses apply_filters() Calls 'preprocess_comment' hook on $commentdata parameter array before processing
+ * @uses apply_filters() Calls 'notify_postauthor' hook on get_option('comments_notify') before processing
  * @uses do_action() Calls 'comment_post' hook on $comment_ID returned from adding the comment and if the comment was approved.
  * @uses wp_filter_comment() Used to filter comment before adding comment.
  * @uses wp_allow_comment() checks to see if comment is approved.
@@ -1372,7 +1373,9 @@
 
 		$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
 
-		if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
+		$do_notify = apply_filters( 'notify_postauthor', get_option('comments_notify'), $comment_ID );
+
+		if ( $do_notify && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
 			wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' );
 	}
 
@@ -1390,6 +1393,7 @@
  *
  * @since 1.0.0
  * @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
+ * @uses apply_filters() Calls 'notify_postauthor' hook on get_option('comments_notify') before processing
  *
  * @param int $comment_id Comment ID.
  * @param string $comment_status New comment status, either 'hold', 'approve', 'spam', or 'delete'.
@@ -1408,7 +1412,8 @@
 		case 'approve':
 		case '1':
 			$status = '1';
-			if ( get_option('comments_notify') ) {
+			$do_notify = apply_filters( 'notify_postauthor', get_option('comments_notify'), $comment_id );
+			if ( $do_notify ) {
 				$comment = get_comment($comment_id);
 				wp_notify_postauthor($comment_id, $comment->comment_type);
 			}
