Skip to content

Commit

Permalink
Mailhog: Allow to configure storage engine for Mailhog
Browse files Browse the repository at this point in the history
  • Loading branch information
frlan committed Jan 13, 2022
1 parent a875a4f commit 5432201
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/batou_ext/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ class Mailhog(batou.component.Component):
http_auth_enable = batou.component.Attribute("literal", default=False)
http_basic_auth = None

# Either memory or maildir
# mongodb is not yet supported
storage_engine = batou.component.Attribute(str, default='memory')

provide_as = None # (optional) str to self.provide()

def configure(self):
Expand Down Expand Up @@ -146,6 +150,7 @@ def configure(self):
MH_SMTP_BIND_ADDR={{component.address.listen}}
MH_API_BIND_ADDR={{component.address_ui.listen}}
MH_UI_BIND_ADDR={{component.address_ui.listen}}
MH_STORAGE={{component.storage_engine}}
""")))
self.envfile = self._

Expand Down

0 comments on commit 5432201

Please sign in to comment.