nullmailer: Re: Using nullmailer-smtpd for localhost:25


--> -->
 
 
<type 'exceptions.NameError'>
Python 2.7.5: /usr/bin/python2
Fri Aug 1 09:51:05 2014

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/runpy.py in _run_module_as_main(mod_name='__main__', alter_argv=0)
    160         sys.argv[0] = fname
    161     return _run_code(code, main_globals, None,
=>  162                      "__main__", fname, loader, pkg_name)
    163 
    164 def run_module(mod_name, init_globals=None,
fname = 'index.cgi/__main__.py', loader = <zipimporter object "index.cgi">, pkg_name = ''
 /usr/lib/python2.7/runpy.py in _run_code(code=<code object <module> at 0xe9cc2d58, file "index.cgi/__main__.py", line 1>, run_globals={'__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': 'index.cgi/__main__.py', '__loader__': <zipimporter object "index.cgi">, '__name__': '__main__', '__package__': '', 'main': <module 'main' from 'index.cgi/main.py'>}, init_globals=None, mod_name='__main__', mod_fname='index.cgi/__main__.py', mod_loader=<zipimporter object "index.cgi">, pkg_name='')
     70                        __loader__ = mod_loader,
     71                        __package__ = pkg_name)
=>   72     exec code in run_globals
     73     return run_globals
     74 
code = <code object <module> at 0xe9cc2d58, file "index.cgi/__main__.py", line 1>, run_globals = {'__builtins__': <module '__builtin__' (built-in)>, '__doc__': None, '__file__': 'index.cgi/__main__.py', '__loader__': <zipimporter object "index.cgi">, '__name__': '__main__', '__package__': '', 'main': <module 'main' from 'index.cgi/main.py'>}
 /big/dom/xuntroubled/www/lists/index.cgi/__main__.py in ()
      1 import main
=>    2 main.main()
 /big/dom/xuntroubled/www/lists/index.cgi/main.py in main()
    186 
    187         if path is not None:
    188                 main_path(ctxt, path)
    189         else:
=>  190                 main_form(ctxt)
 /big/dom/xuntroubled/www/lists/index.cgi/main.py in main_form(ctxt={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'})
    157         except ImportError:
    158                 die(ctxt, "Invalid command")
=>  159         module.do(ctxt)
    160 
    161 def main():
 /big/dom/xuntroubled/www/lists/index.cgi/commands/showmsg.py in do(ctxt={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'})
     16         ctxt['threadlen'] = len(ctxt[MESSAGES])
     17         write('<div class=msg>')
=>   18         write(html('msg-pager') % ctxt)
     19         write('<hr>')
     20         sub_showmsg(ctxt, ctxt[MSGNUM])
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in __getitem__(self={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'}, key='iif(msgnum>1, "%(format_timestamp(archive.index[...subjlink(msgnum-1))s, %(msgauthlink(msgnum-1))s")')
    266                         return self.dict[key]
    267                 except KeyError:
=>  268                         return self.eval(key)
    269         def __setitem__(self, key, val):
    270                 self.dict[key] = val
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in eval(self={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'}, body='iif(msgnum>1, "%(format_timestamp(archive.index[...subjlink(msgnum-1))s, %(msgauthlink(msgnum-1))s")')
    259                 self.stack.append(self.dict.copy())
    260         def eval(self, body):
=>  261                 return eval(body, self.globals, self.dict)
    262         def execute(self, body):
    263                 exec(body, self.globals, self.dict)
 /big/dom/xuntroubled/www/lists/<string> in ()
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in iif(cond=True, truestr='%(format_timestamp(archive.index[msgnum-1]))s %(msgsubjlink(msgnum-1))s, %(msgauthlink(msgnum-1))s', falsestr='')
     32         global ctxt
     33         if cond:
=>   34                 return truestr % ctxt
     35         return falsestr % ctxt
     36 
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in __getitem__(self={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'}, key='format_timestamp(archive.index[msgnum-1])')
    266                         return self.dict[key]
    267                 except KeyError:
=>  268                         return self.eval(key)
    269         def __setitem__(self, key, val):
    270                 self.dict[key] = val
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in eval(self={'REDIRECT_QUERY_STRING': 'list=nullmailer&cmd=s...UFHwQAAH1kAdc', 'listdesc': 'The NullMailer MTA'}, body='format_timestamp(archive.index[msgnum-1])')
    259                 self.stack.append(self.dict.copy())
    260         def eval(self, body):
=>  261                 return eval(body, self.globals, self.dict)
    262         def execute(self, body):
    263                 exec(body, self.globals, self.dict)
 /big/dom/xuntroubled/www/lists/<string> in ()
 /big/dom/xuntroubled/www/lists/index.cgi/context.py in (msg={'author': u'Bruce Guenter', 'authorid': 'dhiiojllgdeohbnjihne', 'date': '14 Mar 2013 16:15:11 -0000', 'month': 201303, 'msgnum': 734, 'subject': u'Re: Multiple Admin Addresses', 'threadid': 'eblfdghhlfaeeljgahjc', 'timestamp': 1363277711.0})
    211         'cmdlink': cmdlink,
    212         'config': config,
=>  213         'format_timestamp': lambda msg:format_timestamp(ctxt, msg),
    214         'iif': iif,
    215         'isogmtime': isogmtime,

<type 'exceptions.NameError'>: global name 'format_timestamp' is not defined
      args = ("global name 'format_timestamp' is not defined",)
      message = "global name 'format_timestamp' is not defined"