Here is a patch to implement that "passthrough" functionality mentioned at 
http://wiki.tmda.net/TmdaOneDotTwoTodoList.  I didn't write this myself, my 
roommate did.  But he's afraid of people or something and wouldn't post it.  
Right now it is always on, I suppose you might want to make it controlled by a 
command line option.

--- tmda-ofmipd 2004-02-17 14:35:52.000000000 -0700
+++ pass-tmda-ofmipd    2004-02-28 11:21:28.000000000 -0700
@@ -1134,11 +1134,15 @@
                 os.setgid(Util.getgid(auth_username))
                 os.setgroups(Util.getgrouplist(auth_username))
                 os.setuid(Util.getuid(auth_username))
-                try:
-                    Util.pipecmd(inject_cmd, data)
-                except Exception, err:
-                    print >> DEBUGSTREAM, 'Error:', err
-                    os._exit(-1)
+               if not os.path.exists(tmda_configfile):
+                   # TMDA not setup for this user, just pass through
+                   PureProxy.process_message(self, peer, mailfrom, rcpttos, 
data)
+               else:
+                    try:
+                        Util.pipecmd(inject_cmd, data)
+                    except Exception, err:
+                        print >> DEBUGSTREAM, 'Error:', err
+                        os._exit(-1)
                 os._exit(0)
             else:
                 rpid, status = os.wait()


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

Reply via email to