An options list parser for twistd mail.

Instance Variable synopsis A description of options for use in the usage message. (type: bytes)
Instance Variable optParameters Information about supported parameters. See Options for details. (type: list of list of (0) bytes, (1) bytes, (2) object, (3) bytes, (4) NoneType or callable which takes bytes and returns object)
Instance Variable optFlags Information about supported flags. See Options for details. (type: list of list of (0) bytes, (1) bytes or NoneType, (2) bytes)
Instance Variable compData Metadata for the shell tab completion system. (type: Completions)
Instance Variable longdesc A long description of the plugin for use in the usage message. (type: bytes)
Instance Variable service The email service. (type: MailService)
Instance Variable last_domain The most recently specified domain. (type: IDomain provider or NoneType)
Method __init__ Parse options and create a mail service.
Method addEndpoint Add an endpoint to a service.
Method opt_pop3 Add a POP3 port listener on the specified endpoint.
Method opt_smtp Add an SMTP port listener on the specified endpoint.
Method opt_default Make the most recently specified domain the default domain.
Method opt_maildirdbmdomain Generate an SMTP/POP3 virtual domain.
Method opt_user Add a user and password to the last specified domain.
Method opt_bounce_to_postmaster Send undeliverable messages to the postmaster.
Method opt_aliases Specify an aliases(5) file to use for the last specified domain.
Method postOptions Check the validity of the specified set of options and configure authentication.
Instance Variable _protoDefaults A mapping of default service to port. (type: dict mapping bytes to int)
Method _getEndpoints Return a list of endpoints for the specified service, constructing defaults if necessary.

Inherited from AuthOptionMixin:

Class Variable supportedInterfaces An iterable object that returns credential interfaces which this application is able to support.
Class Variable authOutput A writeable object to which this options class will send all help-related output. Default: sys.stdout
Method supportsInterface Returns whether a particular credentials interface is supported.
Method supportsCheckerFactory Returns whether a checker factory will provide at least one of the credentials interfaces that we care about.
Method addChecker Supply a supplied credentials checker to the Options class.
Method opt_auth Specify an authentication method for the server.
Method opt_help_auth Show all authentication methods available.
Method opt_help_auth_type Show help for a particular authentication type.
Method _checkerFactoriesForOptHelpAuth Return a list of which authTypes will be displayed by --help-auth. This makes it a lot easier to test this module.

Inherited from AuthOptionMixin:

Class Variable supportedInterfaces An iterable object that returns credential interfaces which this application is able to support.
Class Variable authOutput A writeable object to which this options class will send all help-related output. Default: sys.stdout
Method supportsInterface Returns whether a particular credentials interface is supported.
Method supportsCheckerFactory Returns whether a checker factory will provide at least one of the credentials interfaces that we care about.
Method addChecker Supply a supplied credentials checker to the Options class.
Method opt_auth Specify an authentication method for the server.
Method opt_help_auth Show all authentication methods available.
Method opt_help_auth_type Show help for a particular authentication type.
Method _checkerFactoriesForOptHelpAuth Return a list of which authTypes will be displayed by --help-auth. This makes it a lot easier to test this module.
synopsis =
A description of options for use in the usage message. (type: bytes)
optParameters =
Information about supported parameters. See Options for details. (type: list of list of (0) bytes, (1) bytes, (2) object, (3) bytes, (4) NoneType or callable which takes bytes and returns object)
optFlags =
Information about supported flags. See Options for details. (type: list of list of (0) bytes, (1) bytes or NoneType, (2) bytes)
_protoDefaults =
A mapping of default service to port. (type: dict mapping bytes to int)
compData =
Metadata for the shell tab completion system. (type: Completions)
longdesc =
A long description of the plugin for use in the usage message. (type: bytes)
service =
The email service. (type: MailService)
last_domain =
The most recently specified domain. (type: IDomain provider or NoneType)
def __init__(self): (source)

Parse options and create a mail service.

def addEndpoint(self, service, description, certificate=None): (source)

Add an endpoint to a service.

ParametersserviceA service, either b'smtp' or b'pop3'. (type: bytes)
descriptionAn endpoint description string or a TCP port number. (type: bytes)
certificateThe name of a file containing an SSL certificate. (type: bytes or NoneType)
def opt_pop3(self, description): (source)

Add a POP3 port listener on the specified endpoint.

You can listen on multiple ports by specifying multiple --pop3 options. For backwards compatibility, a bare TCP port number can be specified, but this is deprecated. [SSL Example: ssl:8995:privateKey=mycert.pem] [default: tcp:8110]

def opt_smtp(self, description): (source)

Add an SMTP port listener on the specified endpoint.

You can listen on multiple ports by specifying multiple --smtp options. For backwards compatibility, a bare TCP port number can be specified, but this is deprecated. [SSL Example: ssl:8465:privateKey=mycert.pem] [default: tcp:8025]

def opt_default(self): (source)

Make the most recently specified domain the default domain.

def opt_maildirdbmdomain(self, domain): (source)

Generate an SMTP/POP3 virtual domain.

This option requires an argument of the form 'NAME=PATH' where NAME is the DNS domain name for which email will be accepted and where PATH is a the filesystem path to a Maildir folder. [Example: 'example.com=/tmp/example.com']

def opt_user(self, user_pass): (source)

Add a user and password to the last specified domain.

def opt_bounce_to_postmaster(self): (source)

Send undeliverable messages to the postmaster.

def opt_aliases(self, filename): (source)

Specify an aliases(5) file to use for the last specified domain.

def _getEndpoints(self, reactor, service): (source)

Return a list of endpoints for the specified service, constructing defaults if necessary.

If no endpoints were configured for the service and the protocol was not explicitly disabled with a --no-* option, a default endpoint for the service is created.

ParametersreactorIf any endpoints are created, the reactor with which they are created. (type: IReactorTCP provider)
serviceThe type of service for which to retrieve endpoints, either b'pop3' or b'smtp'. (type: bytes)
ReturnsThe endpoints for the specified service as configured by the command line parameters. (type: list of IStreamServerEndpoint provider)
def postOptions(self): (source)

Check the validity of the specified set of options and configure authentication.

RaisesUsageErrorWhen the set of options is invalid.
API Documentation for Twisted, generated by pydoctor at 2016-04-04 15:02:49.