Index: mail/base/content/mailCommands.js
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/mailCommands.js,v
retrieving revision 1.25
diff -u -p -r1.25 mailCommands.js
--- mail/base/content/mailCommands.js	26 Jan 2006 23:48:13 -0000	1.25
+++ mail/base/content/mailCommands.js	6 Apr 2006 02:26:56 -0000
@@ -258,7 +258,10 @@ function ComposeMessage(type, format, fo
       var messageIDScheme = messageID ? messageID.split(":")[0] : "";
       if (messageIDScheme && (messageIDScheme == 'http' || messageIDScheme == 'https') &&  "openComposeWindowForRSSArticle" in this) 
         openComposeWindowForRSSArticle(messageID, hdr, type); 
-      else if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline ||
+      else if (type == msgComposeType.Reply ||
+                type == msgComposeType.ReplyAll ||
+                type == msgComposeType.ReplyToList ||
+                type == msgComposeType.ForwardInline ||
                 type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || 
                 type == msgComposeType.ReplyToSenderAndGroup ||
                 type == msgComposeType.Template || type == msgComposeType.Draft)
Index: mailnews/base/resources/content/mailCommands.js
===================================================================
RCS file: /cvsroot/mozilla/mailnews/base/resources/content/mailCommands.js,v
retrieving revision 1.100
diff -u -p -r1.100 mailCommands.js
--- mailnews/base/resources/content/mailCommands.js	20 Oct 2005 16:03:26 -0000	1.100
+++ mailnews/base/resources/content/mailCommands.js	6 Apr 2006 02:26:57 -0000
@@ -267,7 +267,9 @@ function ComposeMessage(type, format, fo
           }
         }
 
-        if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll || type == msgComposeType.ForwardInline ||
+        if (type == msgComposeType.Reply || type == msgComposeType.ReplyAll ||
+            type == msgComposeType.ReplyToList ||
+            type == msgComposeType.ForwardInline ||
             type == msgComposeType.ReplyToGroup || type == msgComposeType.ReplyToSender || 
             type == msgComposeType.ReplyToSenderAndGroup ||
             type == msgComposeType.Template || type == msgComposeType.Draft)
Index: mailnews/compose/public/nsIMsgComposeParams.idl
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/public/nsIMsgComposeParams.idl,v
retrieving revision 1.8
diff -u -p -r1.8 nsIMsgComposeParams.idl
--- mailnews/compose/public/nsIMsgComposeParams.idl	16 Sep 2005 15:18:32 -0000	1.8
+++ mailnews/compose/public/nsIMsgComposeParams.idl	6 Apr 2006 02:26:57 -0000
@@ -59,6 +59,7 @@ interface nsIMsgCompType {
     const long Template                 = 10;
     const long MailToUrl                = 11;
     const long ReplyWithTemplate        = 12;
+    const long ReplyToList              = 13;
 };
 
 
Index: mailnews/compose/src/nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.481
diff -u -p -r1.481 nsMsgCompose.cpp
--- mailnews/compose/src/nsMsgCompose.cpp	3 Feb 2006 14:18:18 -0000	1.481
+++ mailnews/compose/src/nsMsgCompose.cpp	6 Apr 2006 02:26:58 -0000
@@ -1751,6 +1751,7 @@ nsresult nsMsgCompose::CreateMessage(con
         default: break;
         case nsIMsgCompType::Reply :
         case nsIMsgCompType::ReplyAll:
+        case nsIMsgCompType::ReplyToList:
         case nsIMsgCompType::ReplyToGroup:
         case nsIMsgCompType::ReplyToSender:
         case nsIMsgCompType::ReplyToSenderAndGroup:
@@ -2196,8 +2197,13 @@ NS_IMETHODIMP QuotingOutputStreamListene
     if (!mCiteReference.IsEmpty())
       compose->SetCiteReference(mCiteReference);
 
-    if (mHeaders && (type == nsIMsgCompType::Reply || type == nsIMsgCompType::ReplyAll || type == nsIMsgCompType::ReplyToSender ||
-                     type == nsIMsgCompType::ReplyToGroup || type == nsIMsgCompType::ReplyToSenderAndGroup) && mQuoteOriginal)
+    if (mHeaders && (type == nsIMsgCompType::Reply ||
+                     type == nsIMsgCompType::ReplyAll ||
+                     type == nsIMsgCompType::ReplyToList ||
+                     type == nsIMsgCompType::ReplyToSender ||
+                     type == nsIMsgCompType::ReplyToGroup ||
+                     type == nsIMsgCompType::ReplyToSenderAndGroup) &&
+        mQuoteOriginal)
     {
       nsCOMPtr<nsIMsgCompFields> compFields;
       compose->GetCompFields(getter_AddRefs(compFields));
@@ -2213,6 +2219,7 @@ NS_IMETHODIMP QuotingOutputStreamListene
         nsAutoString followUpTo;
         nsAutoString messageId;
         nsAutoString references;
+        nsAutoString listPost;
         nsXPIDLCString outCString;
         PRBool needToRemoveDup = PR_FALSE;
         if (!mMimeConverter)
@@ -2257,6 +2264,29 @@ NS_IMETHODIMP QuotingOutputStreamListene
 
           needToRemoveDup = PR_TRUE;
         }
+
+        mHeaders->ExtractHeader(HEADER_LIST_POST, PR_TRUE, getter_Copies(outCString));
+        if (!outCString.IsEmpty())
+          mMimeConverter->DecodeMimeHeader(outCString, listPost, charset);
+
+        if (type == nsIMsgCompType::ReplyToList && ! listPost.IsEmpty())
+        {
+          nsString::const_iterator mailtoStart, mailtoEnd;
+          listPost.BeginReading(mailtoStart);
+          listPost.EndReading(mailtoEnd);
+          nsAutoString mailtoText(NS_LITERAL_STRING("<mailto:"));
+          PRBool mailtoFound = FindInReadable(mailtoText, mailtoStart, mailtoEnd);
+          
+          // Strip off the leading "<mailto:" and trailing ">"
+          if (mailtoFound && listPost.Equals(mailtoStart.get()) &&
+              listPost.RFindChar('>') == listPost.Length() - 1)
+          {
+            listPost.Cut(0, mailtoText.Length());
+            listPost.Cut(listPost.Length() - 1, 1);
+
+            compFields->SetTo(listPost);
+          }
+        }
               
         mHeaders->ExtractHeader(HEADER_REPLY_TO, PR_FALSE, getter_Copies(outCString));
         if (outCString)
@@ -2294,7 +2324,8 @@ NS_IMETHODIMP QuotingOutputStreamListene
           mMimeConverter->DecodeMimeHeader(outCString, references, charset);
         }
         
-        if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()))
+        if (! ((type == nsIMsgCompType::ReplyAll) && ! mailFollowupTo.IsEmpty()) &&
+            ! ((type == nsIMsgCompType::ReplyToList) && ! listPost.IsEmpty()))
         {
           if (! mailReplyTo.IsEmpty())
           { // handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html)
@@ -2796,6 +2827,7 @@ NS_IMETHODIMP nsMsgCompose::RememberQueu
   // the header that we then look at when we actually send the message.
   if (mType == nsIMsgCompType::Reply || 
     mType == nsIMsgCompType::ReplyAll ||
+    mType == nsIMsgCompType::ReplyToList ||
     mType == nsIMsgCompType::ReplyToGroup ||
     mType == nsIMsgCompType::ReplyToSender ||
     mType == nsIMsgCompType::ReplyToSenderAndGroup ||
@@ -2834,6 +2866,7 @@ nsresult nsMsgCompose::ProcessReplyFlags
   // for this URI.
   if (mType == nsIMsgCompType::Reply || 
       mType == nsIMsgCompType::ReplyAll ||
+      mType == nsIMsgCompType::ReplyToList ||
       mType == nsIMsgCompType::ReplyToGroup ||
       mType == nsIMsgCompType::ReplyToSender ||
       mType == nsIMsgCompType::ReplyToSenderAndGroup ||
@@ -3745,6 +3778,7 @@ nsMsgCompose::BuildBodyMessageAndSignatu
     case nsIMsgCompType::New :
     case nsIMsgCompType::Reply :        /* should not happen! but just in case */
     case nsIMsgCompType::ReplyAll :       /* should not happen! but just in case */
+    case nsIMsgCompType::ReplyToList :    /* should not happen! but just in case */
     case nsIMsgCompType::ForwardAsAttachment :  /* should not happen! but just in case */
     case nsIMsgCompType::ForwardInline :
     case nsIMsgCompType::NewsPost :
Index: mailnews/mime/public/nsMailHeaders.h
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/public/nsMailHeaders.h,v
retrieving revision 1.11
diff -u -p -r1.11 nsMailHeaders.h
--- mailnews/mime/public/nsMailHeaders.h	28 Feb 2005 17:10:57 -0000	1.11
+++ mailnews/mime/public/nsMailHeaders.h	6 Apr 2006 02:27:01 -0000
@@ -65,6 +65,7 @@
 #define HEADER_FROM							            "From"
 #define HEADER_STATUS							            "Status"
 #define HEADER_LINES						            "Lines"
+#define HEADER_LIST_POST                    "List-Post"
 #define HEADER_MAIL_FOLLOWUP_TO				      "Mail-Followup-To"
 #define HEADER_MAIL_REPLY_TO				       "Mail-Reply-To"
 #define HEADER_MESSAGE_ID					          "Message-ID"

