Add possibility to enable pop3 protocol for Dovecot.

fix #17
This commit is contained in:
Antoine Nguyen
2016-01-26 13:48:30 +01:00
parent 020da3ea06
commit 6e3a2ab620
2 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,9 @@ config_dir = /etc/dovecot
user = vmail user = vmail
home_dir = /srv/vmail home_dir = /srv/vmail
mailboxes_owner = vmail mailboxes_owner = vmail
# Enable extra procotols (in addition to imap and lmtp)
# Example: pop3
extra_protocols =
# Replace localhost with your domain # Replace localhost with your domain
postmaster_address = postmaster@localhost postmaster_address = postmaster@localhost

View File

@@ -32,7 +32,10 @@ class Dovecot(base.Installer):
def get_packages(self): def get_packages(self):
"""Additional packages.""" """Additional packages."""
return self.packages + ["dovecot-{}".format(self.db_driver)] packages = ["dovecot-{}".format(self.db_driver)]
if "pop3" in self.config.get("dovecot", "extra_protocols"):
packages += ["dovecot-pop3d"]
return self.packages + packages
def install_packages(self): def install_packages(self):
"""Preconfigure Dovecot if needed.""" """Preconfigure Dovecot if needed."""