BTW, this is for TMDA 1.1.3. Sorry for not specifying that in the last e-mail.

-Jared

On Mar 25, 2004, at 12:23 PM, Jared wrote:

I recently decided to add a dated address to my error message templates so I can provide a working address for the person to use if something is going wrong. I enabled DATED_TEMPLATE_VARS and tested it. Well, to my surprise, when someone confirms a message and it results in an error, the dated address is the confirmation address tagged with the dated stuff. So the address is:

[EMAIL PROTECTED]

rather than:

[EMAIL PROTECTED]

I'm not even sure if the first address would work properly for letting the e-mails through (I don't know exactly how TMDA would parse that up).

So, rather than just complaining about something like I usually do, I decided to get my hands dirty. I offer the following patch for anyone interested.

Just apply it to tmda-rfilter in tmda/bin.

-Jared

--- bin/tmda-rfilter Mon Mar 1 20:26:42 2004
+++ tmda-rfilter Thu Mar 25 11:32:23 2004
@@ -663,6 +663,8 @@
now = time.time()
recipient_address = globals().get('recipient_address')
recipient_local, recipient_domain = recipient_address.split('@', 1)
+ recipient_local_raw = recipient_local.split(Defaults.RECIPIENT_DELIMITER, 1)[0]
+ recipient_address_raw = recipient_local_raw + '@' + recipient_domain
envelope_sender = globals().get('envelope_sender')
x_primary_address = globals().get('x_primary_address')
confirm_append_address = Util.confirm_append_address(x_primary_address,
@@ -679,10 +681,10 @@
dated_expire_date = time.asctime(time.gmtime
(now +
Util.seconds(Defaults.DATED_TIMEOUT)))
- dated_recipient_address = Cookie.make_dated_address(recipient_address)
+ dated_recipient_address = Cookie.make_dated_address(recipient_address_raw)
# Optional 'sender' address variables.
if Defaults.SENDER_TEMPLATE_VARS:
- sender_recipient_address = Cookie.make_sender_address(recipient_address,
+ sender_recipient_address = Cookie.make_sender_address(recipient_address_raw,
envelope_sender)
if mode == 'accept': # confirmation acceptance notices
# assume we are being passed a templatefile
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users


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

Reply via email to