chapps.signals module
Signal handlers and custom exceptions
In order to shut down gracefully, we want to provide a signal handler when a service (handler) loop starts. Also, CHAPPS raises a few different custom exceptions, which are defined here.
- class chapps.signals.SignalHandlerFactory[source]
Bases:
objectA class for containing classmethods to create signal handlers
- classmethod signal_handler(loop=None)[source]
Returns a signal-checking, exiting closure
- Parameters
loop – Deprecated
- Return type
callable- Returns
a closure that looks for
SIGTERMorSIGINTand raisesSystemExitif it finds either one.
- exception chapps.signals.CHAPPSException[source]
Bases:
ExceptionParent class for CHAPPS exceptions
- exception chapps.signals.CallableExhausted[source]
Bases:
chapps.signals.CHAPPSExceptionA special exception for use during testing
- exception chapps.signals.NotAnEmailAddressException[source]
Bases:
chapps.signals.CHAPPSExceptionAn email address contained no at-signs
- exception chapps.signals.TooManyAtsException[source]
Bases:
chapps.signals.CHAPPSExceptionAn email address had too many at-signs in it
- exception chapps.signals.ConfigurationError[source]
Bases:
chapps.signals.CHAPPSExceptionThere was an error in the setting of configuration elements
- exception chapps.signals.OutboundPolicyException[source]
Bases:
chapps.signals.CHAPPSExceptionParent of exceptions which occur during outbound mail processing
- exception chapps.signals.NullSenderException[source]
Bases:
chapps.signals.OutboundPolicyExceptionNo sender address exists in the current policy request
- exception chapps.signals.AuthenticationFailureException[source]
Bases:
chapps.signals.OutboundPolicyExceptionLack of user-identifier being treated as authentication failure
- exception chapps.signals.InboundPolicyException[source]
Bases:
chapps.signals.CHAPPSExceptionParent of exceptions arising during inbound email processing
- exception chapps.signals.NoRecipientsException[source]
Bases:
chapps.signals.InboundPolicyExceptionThis is raised if the recipient field is somehow empty
- exception chapps.signals.NoSuchDomainException[source]
Bases:
chapps.signals.CHAPPSExceptionA domain operation was attempted against a nonexistent Domain
- exception chapps.signals.HELOWLException[source]
Bases:
chapps.signals.CHAPPSExceptionHELO Whitelisting exceptions
- exception chapps.signals.AddressDoesNotMatchDNS[source]
Bases:
chapps.signals.HELOWLExceptionA supplied IP address in the HELO Whitelist doesn’t match the A record
- exception chapps.signals.NameDoesNotMatchPTR[source]
Bases:
chapps.signals.HELOWLExceptionThe IP address obtained for the HELO name has a PTR record which does not match the name supplied