logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: tmda/TMDA Defaults.py,1.61,1.62: msg#00011

Subject: CVS: tmda/TMDA Defaults.py,1.61,1.62
Update of /cvsroot/tmda/tmda/TMDA
In directory usw-pr-cvs1:/tmp/cvs-serv5022/TMDA

Modified Files:
        Defaults.py 
Log Message:
Document the fact that LOCAL_DELIVERY_AGENT can contain arguments
which will be passed to the command.

Also, when verifying that LOCAL_DELIVERY_AGENT exists, strip any
arguments first.


Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- Defaults.py 2001/10/05 21:43:20     1.61
+++ Defaults.py 2001/10/05 23:35:10     1.62
@@ -103,6 +103,8 @@
 # your mailbox.  Only necessary if you are NOT running qmail!
 # Tested LDAs include maildrop and procmail.
 # e.g, LOCAL_DELIVERY_AGENT = "/usr/bin/procmail"
+# This variable may also contain arguments which will be passed to the command.
+# e.g, LOCAL_DELIVERY_AGENT = "/usr/bin/procmail -p"
 # No default
 if not vars().has_key('LOCAL_DELIVERY_AGENT'):
     LOCAL_DELIVERY_AGENT = None
@@ -110,9 +112,12 @@
     if not LOCAL_DELIVERY_AGENT:
         print "Not running qmail: you must define LOCAL_DELIVERY_AGENT"
         sys.exit(EX_TEMPFAIL)
-    elif not os.path.exists(LOCAL_DELIVERY_AGENT):
-        print "Invalid LOCAL_DELIVERY_AGENT path:",LOCAL_DELIVERY_AGENT
-        sys.exit(EX_TEMPFAIL)
+    else:
+        # just /path/to/lda without any command arguments
+        lda_path = string.split(string.lstrip(LOCAL_DELIVERY_AGENT))[0]
+        if not os.path.exists(lda_path):
+            print "Invalid LOCAL_DELIVERY_AGENT path:",lda_path
+            sys.exit(EX_TEMPFAIL)
     
 # SENDMAIL
 # The path to the sendmail program, or sendmail compatibility

_______________________________________________
tmda-cvs mailing list
http://libertine.org/lists/listinfo/tmda-cvs



<Prev in Thread] Current Thread [Next in Thread>