[Mailman-Users] Disappearing message
Anne Ramey
anne.ramey at ncmail.net
Fri Oct 26 22:22:00 CEST 2007
<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
More information about the Mailman-Users
mailing list