Part of twisted.mail View Source
Author | Jp Calderone |
Function | handle | Parse a line from an aliases file. |
Function | loadAliasFile | Load a file containing email aliases. |
Interface | IAlias | An interface for 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. |
Parameters | result | A dictionary mapping username to aliases to which the results of parsing
the line are added. (type: dict mapping bytes
to list
of bytes ) |
line | A line from an aliases file. (type: bytes ) | |
filename | The full or relative path to the aliases file. (type: bytes ) | |
lineNo | The position of the line within the aliases file. (type: int ) |
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 | A mapping of domain name to domain object. (type: dict mapping bytes
to IDomain
provider) |
filename | The full or relative path to a file from which to load aliases. If omitted,
the fp parameter must be specified. (type: bytes
or NoneType ) | |
fp | The file from which to load aliases. If specified, the
filename parameter is ignored. (type: file-like object or NoneType ) | |
Returns | A mapping from username to group of aliases. (type: dict mapping bytes
to AliasGroup ) |