Update of /cvsroot/tmda/tmda/bin
In directory usw-pr-cvs1:/tmp/cvs-serv17071/bin
Modified Files:
ChangeLog tmda-filter tmda-inject
Log Message:
Add two new tmdarc settings to specify default actions for incoming
and outgoing messages:
ACTION_INCOMING (default of 'confirm') and ACTION_OUTGOING (default of
'dated'). ACTION_OUTGOING replaces COOKIE_TYPE.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/ChangeLog,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- ChangeLog 2001/11/09 01:28:44 1.100
+++ ChangeLog 2001/11/14 18:26:46 1.101
@@ -1,3 +1,12 @@
+2001-11-14 Jason R. Mastaler <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
+
+ * tmda-filter (main): Consult ACTION_INCOMING to decide how to
+ dispose of messages by default rather than always requesting
+ confirmation.
+
+ * tmda-inject (main): Use ACTION_OUTGOING instead of COOKIE_TYPE
+ to specify the default tagging type.
+
2001-11-08 Jason R. Mastaler <jasonrm@xxxxxxxxxxxxxxxxxxxxxxxxxx>
* tmda-filter (send_cc): Replaces bounce_cc.
Index: tmda-filter
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-filter,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- tmda-filter 2001/11/09 01:28:44 1.78
+++ tmda-filter 2001/11/14 18:26:46 1.79
@@ -528,20 +528,33 @@
if cookie_type == 'confirm' and cookie_value:
verify_confirm_cookie(cookie_value)
# Dated tag?
- if cookie_type == 'dated' and cookie_value:
+ elif cookie_type == 'dated' and cookie_value:
verify_dated_cookie(cookie_value)
# Sender tag?
- if cookie_type == 'sender' and cookie_value:
+ elif cookie_type == 'sender' and cookie_value:
sender_address = globals().get('envelope_sender')
verify_sender_cookie(sender_address,cookie_value)
# Keyword tag?
- if cookie_type == 'keyword' and cookie_value:
+ elif cookie_type == 'keyword' and cookie_value:
verify_keyword_cookie(cookie_value)
# If the message gets this far (i.e, was not sent to a tagged
- # address and it didn't match the filter file), then we bounce it
- # for confirmation.
- bouncegen('request')
+ # address and it didn't match the filter file), then we consult
+ # Defaults.ACTION_INCOMING.
+ default_action = string.lower(Defaults.ACTION_INCOMING)
+ if default_action in ('bounce','reject'):
+ logit('%s %s' % ('BOUNCE', 'action_incoming'), disposal_time)
+ print 'Message rejected by recipient.'
+ mta.bounce()
+ elif default_action in ('drop','exit','stop'):
+ logit('%s %s' % ('DROP', 'action_incoming'), disposal_time)
+ mta.stop()
+ elif default_action in ('accept','deliver','ok'):
+ logit('%s %s' % ('OK', 'action_incoming'), disposal_time)
+ mta.deliver(message)
+ else:
+ # bouncegen does logging
+ bouncegen('request')
# This is the end my friend.
Index: tmda-inject
===================================================================
RCS file: /cvsroot/tmda/tmda/bin/tmda-inject,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- tmda-inject 2001/11/09 01:28:44 1.29
+++ tmda-inject 2001/11/14 18:26:46 1.30
@@ -212,7 +212,7 @@
pass
else:
(action, action_option, matching_line) =
outfilter.firstmatch(address)
- if not action:action = Defaults.COOKIE_TYPE
+ if not action:action = string.lower(Defaults.ACTION_OUTGOING)
# The message is sent to each recipient separately so that
# everyone gets the correct tag. Make sure your MUA
# generates its own Message-ID: and Date: headers so they
_______________________________________________
tmda-cvs mailing list
http://libertine.org/lists/listinfo/tmda-cvs
|