Merge pull request #99 from modoboa/feature/automx

Added automx support.
This commit is contained in:
Antoine Nguyen
2017-03-17 09:12:35 +01:00
committed by GitHub
15 changed files with 287 additions and 58 deletions

15
run.py
View File

@@ -21,8 +21,8 @@ def main():
help="Enable debug output")
parser.add_argument("--force", action="store_true", default=False,
help="Force installation")
parser.add_argument("hostname", type=str,
help="The hostname of your future mail server")
parser.add_argument("domain", type=str,
help="The main domain of your future mail server")
args = parser.parse_args()
if args.debug:
@@ -33,10 +33,10 @@ def main():
config.readfp(fp)
if not config.has_section("general"):
config.add_section("general")
config.set("general", "hostname", args.hostname)
config.set("general", "domain", args.domain)
utils.printcolor(
"Your mail server {} will be installed with the following components:"
.format(args.hostname), utils.BLUE)
"Your mail server will be installed with the following components:",
utils.BLUE)
components = []
for section in config.sections():
if section in ["general", "database", "mysql", "postgres",
@@ -62,11 +62,14 @@ def main():
ssl_backend.create()
scripts.install("amavis", config)
scripts.install("modoboa", config)
scripts.install("automx", config)
scripts.install("uwsgi", config)
scripts.install("nginx", config)
scripts.install("postfix", config)
scripts.install("dovecot", config)
utils.printcolor(
"Congratulations! You can enjoy Modoboa at https://{} (admin:password)"
.format(args.hostname),
.format(config.get("general", "hostname")),
utils.GREEN)
if __name__ == "__main__":