module documentation
(source)

Support for aliases(5) configuration files.
Author
Jp Calderone
Class ​Address​Alias An alias which translates one email address into another.
Class ​Alias​Base The default base class for aliases.
Class ​Alias​Group An alias which points to multiple destination aliases.
Class ​File​Alias An alias which translates an address to a file.
Class ​File​Wrapper A message receiver which delivers a message to a file.
Class ​Message​Wrapper A message receiver which delivers a message to a child process.
Class ​Multi​Wrapper A message receiver which delivers a single message to multiple other message receivers.
Class ​Process​Alias An alias which is handled by the execution of a program.
Class ​Process​Alias​Protocol A process protocol which errbacks a deferred when the associated process ends.
Class ​Process​Alias​Timeout An error indicating that a timeout occurred while waiting for a process to complete.
Function handle Parse a line from an aliases file.
Function load​Alias​File Load a file containing email aliases.
def handle(result, line, filename, lineNo): (source)
Parse a line from an aliases file.
Parameters
result:dict mapping bytes to list of bytesA dictionary mapping username to aliases to which the results of parsing the line are added.
line:bytesA line from an aliases file.
filename:bytesThe full or relative path to the aliases file.
line​No:intThe position of the line within the aliases file.
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.

Parameters
domains:dict mapping bytes to IDomain providerA mapping of domain name to domain object.
filename:bytes or NoneThe full or relative path to a file from which to load aliases. If omitted, the fp parameter must be specified.
fp:file-like object or NoneThe file from which to load aliases. If specified, the filename parameter is ignored.
Returns
dict mapping bytes to AliasGroupA mapping from username to group of aliases.