<snip> > Way 2 is to modify scripts/post to log something. At the end of the > main() function following: > > inq = get_switchboard(mm_cfg.INQUEUE_DIR) > inq.enqueue(sys.stdin.read(), > listname=listname, > tolist=1, _plaintext=1) > > add > > print >> sys.stderr, _('post to %(listname)s received and queued') > > > This will write the 'post to %(listname)s received and queued' message > with the listname filled in to both the error and post logs for every > post. This again will tell you if the post got to the post script. > > <snip>
OK, I added this code, but I get this: Oct 26 16:18:41 2007 post(17996): post to %(listname)s received and queued in the error log (it doesn't replace the listname with the variable) and nothing in the post log. Did I do something wrong? def main(): # TBD: If you've configured your list or aliases so poorly as to get # either of these first two errors, there's little that can be done to # save your messages. They will be lost. Minimal testing of new lists # should avoid either of these problems. try: listname = sys.argv[1] except IndexError: print >> sys.stderr, _('post script got no listname.') sys.exit(1) # Make sure the list exists if not Utils.list_exists(listname): print >> sys.stderr, _('post script, list not found: %(listname)s') sys.exit(1) # Immediately queue the message for the incoming qrunner to process. The # advantage to this approach is that messages should never get lost -- # some MTAs have a hard limit to the time a filter prog can run. Postfix # is a good example; if the limit is hit, the proc is SIGKILL'd giving us # no chance to save the message. inq = get_switchboard(mm_cfg.INQUEUE_DIR) inq.enqueue(sys.stdin.read(), listname=listname, tolist=1, _plaintext=1) print >> sys.stderr, _('post to %(listname)s received and queued') Anne ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp