Root package for relaying messages to their next destination. A relay could be another SMTP hop, or it could be implemented as a final delivery mechanism.
- exception slimta.relay.PermanentRelayError(msg[, reply=None])¶
Base exception for all relay errors that indicate a message will not be successfully delivered no matter how many times delivery is attempted.
- exception slimta.relay.TransientRelayError(msg[, reply=None])¶
Base exception for all relay errors that indicate the message may be successful if tried again later.
- class slimta.relay.Relay¶
RelayPolicyto be executed each time the relay attempts delivery for a message.
RelayPolicyobject to execute.
- attempt(envelope, attempts)¶
This method must be overridden by sub-classes in order to be passed in to the
The result of a successful relay attempt is either
Replyobject. The result of a failing relay attempt is either a
If the result applies to the entire
envelopeand all its recipients, implementations may return the successful result or raise the failure. If the result is different per-recipient, then implementations may return a dictionary where the key is a recipient from
recipientsand the value is the relay result (successful or failing).