I am using the latest version of the stable branch of TMDA.
Eventually, some users complained they couldn't get their mails, and looking
at the debug logs, the problem was that they had no Return-Path header set.
I don't know why, but it was only with a few mails. Almost every mail had
it's Return-Path header. I am using sendmail, with procmail. Anyway, I
patched tmda-rfilter and now it works ok.

Before you laugh at me and curse me and spit in my face, _I have no damn
idea of programming in python_, and neither I have no idea of the definition
of the functions used in TMDA, I did this patch by trying and trying, taking
http://mla.libertine.org/tmda-workers/2002-09/txt00000.txt as a base. Here
it is. Please answer cc to my E-mail address because I'm not suscribed to
this list. Thanks.


--- tmda-rfilter.orig   Thu Mar 11 00:03:52 2004
+++ tmda-rfilter        Thu Mar 11 00:03:52 2004
@@ -475,6 +475,10 @@
     """Release a confirmed message from the pending queue."""
     # Remove Return-Path: to avoid duplicates.
     return_path = return_path = parseaddr(msg.get('return-path'))[1]
+    if return_path is None:
+        return_path = parseaddr(msg.get('sender'))[1]
+        if return_path is None:
+            return_path = os.environ.get('SENDER')
     del msg['return-path']
     # Remove X-TMDA-Recipient:
     recipient = msg.get('x-tmda-recipient')
@@ -538,8 +542,14 @@
                     parseaddr(msg.get('x-primary-address'))[1],
                     parseaddr(msg.get('return-path'))[1])
                 if not confirm_append_addr:
-                    raise IOError, \
-                          confirmed_filepath + ' has no Return-Path
header!'
+                    return_path = parseaddr(msg.get('sender'))[1]
+                    if return_path is None:
+                        return_path = os.environ.get('SENDER')
+                        if return_path is None:
+                            raise IOError, \
+                                confirmed_filepath + ' has no Return-Path
header!'
+
+
             if Defaults.CONFIRM_APPEND:
                 if Util.append_to_file(confirm_append_addr,
                                        Defaults.CONFIRM_APPEND) != 0:

_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to