Cleanup.
[mailman.git] / src / mailman / pipeline / docs / after-delivery.txt
blobeef153c7d3c256e1f9cc5bc7cedd9b71f4711b60
1 ==============
2 After delivery
3 ==============
5 After a message is delivered, or more correctly, after it has been processed
6 by the rest of the handlers in the incoming queue pipeline, a couple of
7 bookkeeping pieces of information are updated.
9     >>> import datetime
10     >>> mlist = create_list('_xtest@example.com')
11     >>> post_time = datetime.datetime.now() - datetime.timedelta(minutes=10)
12     >>> mlist.last_post_time = post_time
13     >>> mlist.post_id = 10
15 Processing a message with this handler updates the last_post_time and post_id
16 attributes.
18     >>> msg = message_from_string("""\
19     ... From: aperson@example.com
20     ...
21     ... Something interesting.
22     ... """)
24     >>> handler = config.handlers['after-delivery']
25     >>> handler.process(mlist, msg, {})
26     >>> mlist.last_post_time > post_time
27     True
28     >>> mlist.post_id
29     11