Add the relay concept to the model

This commit is contained in:
kaiyou
2017-09-10 20:30:03 +02:00
parent 64ded60b5e
commit b5c55d10d3
2 changed files with 43 additions and 0 deletions

View File

@@ -116,6 +116,20 @@ class Alternative(Base):
return self.name
class Relay(Base):
""" Relayed mail domain.
The domain is either relayed publicly or through a specified SMTP host.
"""
__tablename__ = "relay"
name = db.Column(db.String(80), primary_key=True, nullable=False)
smtp = db.Column(db.String(80), nullable=True)
def __str__(self):
return self.name
class Email(object):
""" Abstraction for an email address (localpart and domain).
"""