logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: tmda/bin ChangeLog,1.172,1.173 tmda-rfilter,1.17,1.18: msg#00101

Subject: CVS: tmda/bin ChangeLog,1.172,1.173 tmda-rfilter,1.17,1.18
Update of /cvsroot/tmda/tmda/bin
In directory usw-pr-cvs1:/tmp/cvs-serv28660/bin

Modified Files:
        ChangeLog tmda-rfilter 
Log Message:
Introduce local mail delivery capability.  

This was done in response to several user requests for the ability to
specify various delivery instructions from the incoming filter file,
including delivery to a program, delivery to a Maildir or mbox, and
forward to an e-mail address.

The delivery instruction is given as an option to the existing
ok,accept,deliver action.

The local delivery work is done in the new Deliver module.  Initially, 
'forward' and 'program' instructions are supported.

NOTE: qmail users must now invoke tmda-filter with 'preline' in their
dot-qmail.  e.g,

|preline /usr/local/bin/tmda-filter


Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- ChangeLog   24 Feb 2002 03:35:31 -0000      1.172
+++ ChangeLog   25 Feb 2002 18:08:45 -0000      1.173
@@ -1,3 +1,9 @@
+2002-02-25  Jason R. Mastaler  <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
+
+       * tmda-rfilter (main): Support local mail delivery when the
+       ok,accept,deliver action contains an option specifying delivery
+       instructions.
+       
 2002-02-23  Jason R. Mastaler  <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
 
        * tmda-inject (inject_message): Send mail with Util.sendmail().

Index: tmda-rfilter
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-rfilter,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- tmda-rfilter        24 Feb 2002 03:35:31 -0000      1.17
+++ tmda-rfilter        25 Feb 2002 18:08:45 -0000      1.18
@@ -105,6 +105,7 @@
 
 
 from TMDA import Defaults
+from TMDA import Deliver
 from TMDA import Cookie
 from TMDA import Errors
 from TMDA import FilterParser
@@ -577,8 +578,14 @@
         logit('%s (%s)' % ('DROP', matching_line), disposal_time)
         mta.stop()
     elif action in ('accept','deliver','ok'):
-        logit('%s (%s)' % ('OK', matching_line), disposal_time)
-        mta.deliver(message)
+        if option:
+            msg = Deliver.Deliver(message_headers, message_body, option)
+            logit('%s %s (%s)' % ('DELIVER', msg.get_instructions()[1],
+                                  matching_line), disposal_time)
+            msg.deliver()
+        else:
+            logit('%s (%s)' % ('OK', matching_line), disposal_time)
+            mta.deliver(message)
     elif action == 'confirm':
         # bouncegen does logging
         bouncegen('request')

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



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