소스 검색

Add EmailLog.bounced_mailbox_id

Son NK 5 년 전
부모
커밋
0f09ef681c
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      app/models.py

+ 6 - 0
app/models.py

@@ -923,6 +923,12 @@ class EmailLog(db.Model, ModelMixin):
         db.ForeignKey("refused_email.id", ondelete="SET NULL"), nullable=True
         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")
     refused_email = db.relationship("RefusedEmail")
     forward = db.relationship(Contact)
     forward = db.relationship(Contact)