Package lamson :: Package handlers :: Module forward
[hide private]
[frames] | no frames]

Module forward

source code

Implements a forwarding handler that will take anything it receives and forwards it to the relay host. It is intended to use with the lamson.routing.RoutingBase.UNDELIVERABLE_QUEUE if you want mail that Lamson doesn't understand to be delivered like normal. The Router will dump any mail that doesn't match into that queue if you set it, and then you can load this handler into a special queue receiver to have it forwarded on.

BE VERY CAREFUL WITH THIS. It should only be used in testing scenarios as it can turn your server into an open relay if you're not careful. You are probably better off writing your own version of this that knows a list of allowed hosts your machine answers to and only forwards those.

Functions [hide private]
 
START(message, to=None, host=None)
Forwards every mail it gets to the relay.
source code
Function Details [hide private]

START(message, to=None, host=None)

source code 

Forwards every mail it gets to the relay. BE CAREFULE WITH THIS.

Decorators:
  • @route("(to)@(host)", to= ".+", host= ".+")
  • @stateless