This module provides the Alias class. The data are read from/stored in the alias table. This table is used by Postfix to rewrite recipient addresses.
Creates a new Alias instance. Alias instances provides the __len__() method. So the existence of an alias in the database can be tested with a simple if condition.
Parameters: |
|
---|
Adds the destinations to the destinations of the alias. This method returns a set of all addresses which successfully were stored into the database.
If one of the e-mail addresses in destinations is the same as the alias address, it will be silently discarded. Destination addresses, that are already assigned to the alias, will be also ignored.
When the optional warnings list is given, all ignored addresses will be appended to it.
Parameters: |
|
---|---|
Return type: | set |
Raises VirtualMailManager.errors.AliasError: | |
if the additional destinations will exceed the expansion_limit or if the alias already exceeds its expansion_limit. |
See also
VirtualMailManager.ext.postconf – to read actual values of Postfix configuration parameters.
Deletes the given destination address from the alias.
Parameters: | destination (VirtualMailManager.EmailAddress.EmailAddress) – a destination address of the alias |
---|---|
Return type: | None |
Raises VirtualMailManager.errors.AliasError: | |
if the destination wasn’t assigned to the alias or the alias doesn’t exist. |
Deletes the alias with all its destinations.
Return type: | None |
---|---|
Raises VirtualMailManager.errors.AliasError: | |
if the alias doesn’t exist. |
Returns an iterator for all destinations (EmailAddress instances) of the alias.
Return type: | listiterator |
---|---|
Raises VirtualMailManager.errors.AliasError: | |
if the alias doesn’t exist. |