Support for aliases(5) configuration files.
Author | |
Jp Calderone |
Class |
|
An alias which translates one email address into another. |
Class |
|
The default base class for aliases. |
Class |
|
An alias which points to multiple destination aliases. |
Class |
|
An alias which translates an address to a file. |
Class |
|
A message receiver which delivers a message to a file. |
Class |
|
A message receiver which delivers a message to a child process. |
Class |
|
A message receiver which delivers a single message to multiple other message receivers. |
Class |
|
An alias which is handled by the execution of a program. |
Class |
|
A process protocol which errbacks a deferred when the associated process ends. |
Exception |
|
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 |
Load a file containing email aliases. |
Parse a line from an aliases file.
Parameters | |
result:dict mapping bytes to list of bytes | A dictionary mapping username to aliases to which the results of parsing the line are added. |
line:bytes | A line from an aliases file. |
filename:bytes | The full or relative path to the aliases file. |
lineint | The position of the line within the aliases file. |
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 provider | A mapping of domain name to domain object. |
filename:bytes or None | The 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 None | The file from which to load aliases. If specified, the filename parameter is ignored. |
Returns | |
dict mapping bytes to AliasGroup | A mapping from username to group of aliases. |