rattail.bouncer.handler

Email Bounce Handlers

class rattail.bouncer.handler.BounceHandler(config, config_key)[source]

Default implementation for email bounce handlers.

handle_bounce_file(path, **kwargs)[source]

Fully “handle” the given email message file, acting on it as needed, depending on whether or not it is actually considered to be a bounce etc.

msgdir(bounce)[source]

Returns the absolute path of the folder in which the bounce’s message file resides. Note that the bounce must already have been persisted to the database. The structure of the path returned is as follows:

/{root_msgdir}/{uuid[:2]}/{uuid[2:]}
  • {root_msgdir} - Value returned by root_msgdir().

  • {uuid[:2]} - First two characters of bounce UUID.

  • {uuid[2:]} - All UUID characters after the first two.

Note

While it is likely that the folder returned by this method already exists, this method does not guarantee any such thing.

property root_msgdir

The absolute path of the root folder in which messages are stored.

Simple representation of a link, to be shown in the Tailbone UI to assist with processing email bounces.

rattail.bouncer.handler.get_handler(config, key)[source]

Return a bounce handler instance as specified by configuration.