[ mailman-Bugs-1635915 ] Variables in the template postauth.txt are not substituted

SourceForge.net noreply at sourceforge.net
Tue Jan 16 18:18:56 CET 2007


Bugs item #1635915, was opened at 2007-01-15 06:31
Message generated for change (Comment added) made by msapiro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1635915&group_id=103

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 2.1 (stable)
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Jussi Hirvi (jhirvi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Variables in the template postauth.txt are not substituted

Initial Comment:
The template file postauth.txt contains: 

> As list administrator, your authorization is requested for thefollowing 
> mailing list posting:
> List:    %(listname)s@%(hostname)s    From:    %(sender)s    Subject: 
> %(subject)s    Reason:  %(reason)s
> 
> At your convenience, visit:
> %(admindb_url)s
> to approve or deny the request.

When an email is sent to the administrator, the variables are of course supposed to be substituted with their respective values. THis didn't happen, however. I cannot think of another explanation than a bug. My Mailman version is 2.1.8. In this case, I'm using Finnish versions of the templates (modified by me), but that shouldn't affect this, I think. 


----------------------------------------------------------------------

>Comment By: Mark Sapiro (msapiro)
Date: 2007-01-16 09:18

Message:
Logged In: YES 
user_id=1123998
Originator: NO

I am closing this per the submitter's comment.

Note that you should not edit /templates/fi/postauth.txt as your changes
will be lost in an upgrade. If you want a modified version of this template
to apply sitewide, it should be put in templates/site/fi/postauth.txt. See
<http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.048.htp> for
more information.

----------------------------------------------------------------------

Comment By: Jussi Hirvi (jhirvi)
Date: 2007-01-16 00:57

Message:
Logged In: YES 
user_id=1692540
Originator: YES

I think I found the error in my /templates/fi/postauth.txt, just as you
suspected! One s (for string, I guess) was missing.   I have not tested,
but I'm reasonably sure this was what caused the error. 

I feel kind of stupid... but I'm glad this was solved! 

----------------------------------------------------------------------

Comment By: Mark Sapiro (msapiro)
Date: 2007-01-15 08:57

Message:
Logged In: YES 
user_id=1123998
Originator: NO

Perhaps the 'bug' is in your modified template. It seems to me that your
modification of the template is the most likely cause of this.

Have you changed the substitution strings %(listname)s, %(hostname)s, etc.
in any way? If you change anything in these strings, they will cease to
work.

Please check for

lists/<listname>/fi/postauth.txt
templates/<list.host_name>/fi/postauth.txt
templates/site/fi/postauth.txt
templates/fi/postauth.txt

The first of these that exists is the Finnish template that will be used.
Review that template, and if you can't find a problem there, I don't know
where it can be unless somehow the call to
 Utils.maketext('postauth.txt', d, raw=1, mlist=mlist),
in Mailman/Handlers/Hold.py has been changed.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1635915&group_id=103


More information about the Mailman-coders mailing list