module documentation
(source)

Support for aliases(5) configuration files.

AuthorJp Calderone
Function handle Parse a line from an aliases file.
Function loadAliasFile Load a file containing email aliases.
Class AliasBase The default base class for aliases.
Class AddressAlias An alias which translates one email address into another.
Class FileWrapper A message receiver which delivers a message to a file.
Class FileAlias An alias which translates an address to a file.
Class ProcessAliasTimeout An error indicating that a timeout occurred while waiting for a process to complete.
Class MessageWrapper A message receiver which delivers a message to a child process.
Class ProcessAliasProtocol A process protocol which errbacks a deferred when the associated process ends.
Class ProcessAlias An alias which is handled by the execution of a program.
Class MultiWrapper A message receiver which delivers a single message to multiple other message receivers.
Class AliasGroup An alias which points to multiple destination aliases.
def handle(result, line, filename, lineNo): (source)

Parse a line from an aliases file.

ParametersresultA dictionary mapping username to aliases to which the results of parsing the line are added. (type: dict mapping bytes to list of bytes)
lineA line from an aliases file. (type: bytes)
filenameThe full or relative path to the aliases file. (type: bytes)
lineNoThe position of the line within the aliases file. (type: int)
def loadAliasFile(domains, filename=None, fp=None): (source)

Load a file containing email aliases.

Lines in the file should be formatted like so:

     username: alias1, alias2, ..., aliasN

Aliases beginning with a | will be treated as programs, will be run, and the message will be written to their stdin.

Aliases beginning with a : will be treated as a file containing additional aliases for the username.

Aliases beginning with a / will be treated as the full pathname to a file to which the message will be appended.

Aliases without a host part will be assumed to be addresses on localhost.

If a username is specified multiple times, the aliases for each are joined together as if they had all been on one line.

Lines beginning with a space or a tab are continuations of the previous line.

Lines beginning with a # are comments.

ParametersdomainsA mapping of domain name to domain object. (type: dict mapping bytes to IDomain provider)
filenameThe full or relative path to a file from which to load aliases. If omitted, the fp parameter must be specified. (type: bytes or None)
fpThe file from which to load aliases. If specified, the filename parameter is ignored. (type: file-like object or None)
ReturnsA mapping from username to group of aliases. (type: dict mapping bytes to AliasGroup)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.