[prev in list] [next in list] [prev in thread] [next in thread]
List: tmda-cvs
Subject: CVS: tmda/TMDA ChangeLog,1.48,1.49 Cookie.py,1.6,1.7 Defaults.py,1.41,1.42
From: "Jason R. Mastaler" <jasonrm () users ! sourceforge ! net>
Date: 2001-08-24 22:01:25
[Download RAW message or body]
Update of /cvsroot/tmda/tmda/TMDA
In directory usw-pr-cvs1:/tmp/cvs-serv28783/TMDA
Modified Files:
ChangeLog Cookie.py Defaults.py
Log Message:
For a message sent to local@domain, confirm-*.HMAC is now just
appended to local so that when the confirmed message is released, it
will be processed by the same dot-qmail file that called tmda-filter
in the first place.
Code was also added to use the address that the message was originally
sent to (original envelope recipient) as a base instead of RECIPIENT
from the environment (which is munged under a qmail virtualdomain).
Unfortunately, qmail provides no easy method of obtaining this
information, so the control/virtualdomains file has to be parsed.
The templates were also modified to send confirmation messages with a
"From:" header that matches the original recipient for added
flexibility.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- ChangeLog 2001/08/24 15:30:36 1.48
+++ ChangeLog 2001/08/24 22:01:23 1.49
@@ -1,5 +1,14 @@
2001-08-24 Jason R. Mastaler <jasonrm@nightshade.la.mastaler.com>
+ * Defaults.py (QMAILVIRTUALDOMAINS): New variable to toggle qmail
+ virtualdomains support.
+
+ (VIRTUALDOMAINS): New variable pointing to qmail's virtualdomains
+ control file.
+
+ * Cookie.py (make_confirm_address): New function to create full
+ confirmation-style addresses (both 'accept' and 'done).
+
* Defaults.py (TMDA_VERSION): Begin 0.33 development.
2001-08-21 Jason R. Mastaler <jasonrm@nightshade.la.mastaler.com>
Index: Cookie.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Cookie.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Cookie.py 2001/08/20 19:40:54 1.6
+++ Cookie.py 2001/08/24 22:01:23 1.7
@@ -31,6 +31,15 @@
return timestamp + '.' + process_id + '.' + chmac
+def make_confirm_address(address,time,pid,keyword):
+ """Return a full confirmation-style e-mail address."""
+ confirm_cookie = make_confirm_cookie(time,pid,keyword)
+ (username, hostname) = string.split(address,'@')
+ confirm_address = username + '-confirm-' + keyword + '.' + \
+ confirm_cookie + '@' + hostname
+ return confirm_address
+
+
def datemac(time):
"""Expects time as a string, and returns an HMAC in hex."""
datemac = HMAC.new(Defaults.CRYPT_KEY,time).digest()[:3]
Index: Defaults.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Defaults.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- Defaults.py 2001/08/24 15:30:36 1.41
+++ Defaults.py 2001/08/24 22:01:23 1.42
@@ -79,6 +79,25 @@
if not vars().has_key('DATADIR'):
DATADIR = os.path.expanduser("~/.tmda/")
+# QMAILVIRTUALDOMAINS
+# Set this variable to 0 if want to turn off TMDA's virtualdomains
+# support. This should obviously only be done if you are not running
+# any virtualdomains, but it will improve performance.
+# Default is 1 (turned on)
+if not vars().has_key('QMAILVIRTUALDOMAINS'):
+ QMAILVIRTUALDOMAINS = 1
+
+# VIRTUALDOMAINS
+# virtualdomains defaults to /var/qmail/crontrol/virtualdomains, but
+# this lets you override it in case it is installed elsewhere. Used
+# for virtualdomain processing in tmda-filter.
+if not vars().has_key('VIRTUALDOMAINS'):
+ VIRTUALDOMAINS = "/var/qmail/control/virtualdomains"
+if QMAILVIRTUALDOMAINS:
+ if not os.path.exists(VIRTUALDOMAINS):
+ print "file not found:",VIRTUALDOMAINS
+ sys.exit(ERR_CONFIG)
+
# CONFIRM_ACCEPT_NOTIFY
# Set this variable to 0 if you do not want to generate confirmation
# acceptance notices.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic