""" from __future__ import absolute_import import re from gevent import Timeout from gevent import subprocess from slimta.smtp.reply import Reply from slimta.relay import Relay, PermanentRelayError, TransientRelayError from slimta import logging __all__ = ['PipeRelay', 'MaildropRelay', 'DovecotLdaRelay'] log = logging.getSubprocessLogger(__name__) class PipeRelay(Relay): """When delivery attempts are made on this object, it will create a new subprocess and pipe envelope data to it. Delivery success or failure depends on the return code of the sub-process and error messages are pulled from standard error output. To facilitate passing the |Envelope| metadata, the process's command-line arguments can be populated with macros replaced using :py:meth:`str.format` with corresponding keywords: * ``{sender}``: The sender address. * ``{recipient}``: The first address in the recipient last. * ``{message_id}``: The ``Message-Id`` header.
def setUp(self): self.log = getSubprocessLogger('test')