"Todd A. Jacobs" <[EMAIL PROTECTED]> writes:

> Part of my questions is: Why does From_ need to be regenerated after
> TMDA in the first place?

I just realized that the MTA is already adding a From_ line before
procmail or TMDA sees the message, so TMDA must be stripping
it. Looking at code confirmed this suspicion.

Can you do me a favor and apply the attached patch in your TMDA
library directory (where Delivery.py lies) and see if it fixes your
problem? If it does, I'll check it in tomorrow.

Index: Deliver.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Deliver.py,v
retrieving revision 1.6
diff -u -r1.6 Deliver.py
--- Deliver.py	30 Sep 2002 23:45:54 -0000	1.6
+++ Deliver.py	8 Nov 2002 04:47:37 -0000
@@ -60,7 +60,6 @@
         from the TMDA.FilterParser instance.
         """
         self.msg = msg
-        self.message = msg.as_string()
         self.option = delivery_option
         self.env_sender = os.environ.get('SENDER')
         
@@ -110,9 +109,9 @@
         """Deliver the message appropriately."""
         (type, dest) = self.get_instructions()
         if type == 'program':
-            self.__deliver_program(self.message, dest)
+            self.__deliver_program(self.msg.as_string(unixfrom=1), dest)
         elif type == 'forward':
-            self.__deliver_forward(self.message, dest)
+            self.__deliver_forward(self.msg.as_string(), dest)
         elif type == 'mbox':
             # Ensure destination path exists.
             if not os.path.exists(dest):
@@ -124,14 +123,14 @@
                 raise Errors.DeliveryError, \
                       'Destination "%s" is a symlink!' % dest
             else:
-                self.__deliver_mbox(self.message, dest)
+                self.__deliver_mbox(self.msg.as_string(), dest)
         elif type == 'maildir':
             # Ensure destination path exists.
             if not os.path.exists(dest):
                 raise Errors.DeliveryError, \
                       'Destination "%s" does not exist!' % dest
             else:
-                self.__deliver_maildir(self.message, dest)
+                self.__deliver_maildir(self.msg.as_string(), dest)
 
     def __deliver_program(self, message, program):
         """Deliver message to /bin/sh -c program."""

Reply via email to