1 """
2 Implements a handler that puts every message it receives into
3 the run/queue directory. It is intended as a debug tool so you
4 can inspect messages the server is receiving using mutt or
5 the lamson queue command.
6 """
7
8 from lamson.routing import route_like, stateless, nolocking
9 from lamson import queue, handlers
10 import logging
11
12 @route_like(handlers.log.START)
13 @stateless
14 @nolocking
15 -def START(message, to=None, host=None):
16 """
17 @stateless and routes however handlers.log.START routes (everything).
18 Has @nolocking, but that's alright since it's just writing to a maildir.
19 """
20 q = queue.Queue('run/queue')
21 q.push(message)
22