class documentation

An email service.

Method __init__ Initialize the mail service.
Method addDomain Add a domain for which the service will accept email.
Method defaultPortal Return the portal for the default domain.
Method getESMTPFactory Create an ESMTP protocol factory.
Method getPOP3Factory Create a POP3 protocol factory.
Method getSMTPFactory Create an SMTP protocol factory.
Method lookupPortal Find the portal for a domain.
Method requestAvatar Return a message delivery for an authenticated SMTP user.
Method setQueue Set the queue for outgoing emails.
Instance Variable aliases A mapping of domain name to alias.
Instance Variable domains A mapping of supported domain name to domain object.
Instance Variable monitor A service to monitor changes to files.
Instance Variable portals A mapping of domain name to authentication portal.
Instance Variable queue A queue for outgoing messages.
Instance Variable smtpPortal A portal for authentication for the SMTP server.

Inherited from MultiService:

Method __iter__ Get an iterator over all child services.
Method addService Add a child service.
Method getServiceNamed Get the child service with a given name.
Method privilegedStartService Do preparation work for starting the service.
Method removeService Remove a child service.
Method startService Start the service.
Method stopService Stop the service.
Instance Variable namedServices Undocumented
Instance Variable parent An IServiceCollection which is the parent or None.
Instance Variable services Undocumented

Inherited from Service (via MultiService):

Method __getstate__ Undocumented
Method disownServiceParent Use this API to remove an IService from an IServiceCollection.
Method setName Set the name of the service.
Method setServiceParent Set the parent of the service. This method is responsible for setting the parent attribute on this service (the child service).
Instance Variable name A str which is the name of the service or None.
Instance Variable running A boolean which indicates whether the service is running.
def __init__(self): (source)

Initialize the mail service.

def addDomain(self, name, domain): (source)

Add a domain for which the service will accept email.

Parameters
name:bytesA domain name.
domain:IDomain providerA domain object.
def defaultPortal(self): (source)

Return the portal for the default domain.

The default domain is named ''.

Returns
PortalThe portal for the default domain.
def getESMTPFactory(self): (source)

Create an ESMTP protocol factory.

Returns
ESMTPFactoryAn ESMTP protocol factory.
def getPOP3Factory(self): (source)

Create a POP3 protocol factory.

Returns
POP3FactoryA POP3 protocol factory.
def getSMTPFactory(self): (source)

Create an SMTP protocol factory.

Returns
SMTPFactoryAn SMTP protocol factory.
def lookupPortal(self, name): (source)

Find the portal for a domain.

Parameters
name:bytesA domain name.
Returns
PortalA portal.
def requestAvatar(self, avatarId, mind, *interfaces): (source)

Return a message delivery for an authenticated SMTP user.

Parameters
avatarId:bytesA string which identifies an authenticated user.
mind:NoneUnused.
*interfaces:n-tuple of zope.interface.InterfaceA group of interfaces one of which the avatar must support.
Returns
3-tuple of (1) IMessageDelivery, (2) ESMTPDomainDelivery, (3) no-argument callableA tuple of the supported interface, a message delivery, and a logout function.
Raises
NotImplementedErrorWhen the given interfaces do not include IMessageDelivery.
def setQueue(self, queue): (source)

Set the queue for outgoing emails.

Parameters
queue:QueueA queue for outgoing messages.
aliases: None or dict of bytes -> IAlias provider = (source)

A mapping of domain name to alias.

domains: dict of bytes -> IDomain provider = (source)

A mapping of supported domain name to domain object.

A service to monitor changes to files.

A mapping of domain name to authentication portal.

A queue for outgoing messages.

smtpPortal: Portal = (source)

A portal for authentication for the SMTP server.