--- listhandler.module.old	2008-01-05 10:12:07.000000000 +0000
+++ listhandler.module	2008-01-06 17:07:06.000000000 +0000
@@ -226,6 +226,7 @@
  */
 function listhandler_send_mail($edit) {
   global $user, $base_url;
+  $mid=array();
 
   if (!$user->uid) {
     $edit['name'] = variable_get('anonymous', 'Anonymous');
@@ -282,8 +283,8 @@
     $edit['pid']=0;
   }
   if ($result) {// Parent was sent or received by listhandler
-    $mid = "References: ". $result->msgid ."\n";
-    $mid .= "In-Reply-To: ". $result->msgid ."\n";
+    $mid['References'] = $result->msgid;
+    $mid['In-Reply-To'] = $result->msgid;
   }
   //common headers
   $dir = str_replace("/", ".", substr(strchr(str_replace("http://", "", $base_url), "/"), 1));
@@ -299,7 +300,9 @@
 
     // We add tokens to the MID. Replies to comments sent by listhandler can thus be classified easier.
     $msgid = "<listhandler=". $edit["mid"] ."&site=". $dir . $_SERVER["SERVER_NAME"] ."&nid=". $edit["nid"] ."&pid=". $edit["pid"] ."&cid=".  $edit["cid"] ."&uid=". $user->uid ."&tid=".  $edit["tid"] ."&". md5($edit["nid"] . $edit["cid"]) ."@". $dir . strtolower($_SERVER["SERVER_NAME"]) .">";
-    $mid .= "Message-Id: ". $msgid ."\n";
+    $mid['Message-Id'] = $msgid;
+    // ezmlm uses Return-Path to determine who sent the posting
+    $mid['Return-Path'] = $edit['mail'];
     
     // load mail routines
     $file = drupal_get_path('module', 'listhandler') .'/mail.inc';
@@ -317,7 +320,7 @@
 
     // send email
       // was: $err = user_mail($address, $subject, $body, "From: ". $edit["name"] ." <". $edit["mail"] .">\n". $mid);
-    $ok = drupal_mail($mid, $address, $subject, $body, $edit["mail"]);
+    $ok = drupal_mail('listhandler-mail', $address, $subject, $body, $edit["mail"], $mid);
 
     // save comment ids in listhandler table.
     // Not strictly needed, the same info is stored in the msgid.
