This module contains a simple Relay class that blackholes messages, usually most useful for testing.

class slimta.relay.blackhole.BlackholeRelay

Bases: slimta.relay.Relay

Implements a Relay that simply blackholes messages. Relay policies may be added with add_policy(), but they will never be executed or applied for messages handled by this class.

attempt(envelope, attempts)

Overrides the Relay attempt() method to silently discard attempted messages. The Queue will see the attempt as a successful delivery.

  • envelopeEnvelope to attempt delivery for.

  • attempts – Number of times the envelope has attempted delivery.