Add EmailLog.bounced_mailbox_id

This commit is contained in:
Son NK 2020-05-10 18:34:57 +02:00
parent 5b71b34f9e
commit 0f09ef681c
1 changed files with 6 additions and 0 deletions

View File

@ -923,6 +923,12 @@ class EmailLog(db.Model, ModelMixin):
db.ForeignKey("refused_email.id", ondelete="SET NULL"), nullable=True
)
# in case of bounce, record on what mailbox the email has been bounced
# useful when an alias has several mailboxes
bounced_mailbox_id = db.Column(
db.ForeignKey("mailbox.id", ondelete="cascade"), nullable=True
)
refused_email = db.relationship("RefusedEmail")
forward = db.relationship(Contact)