ยง2024-10-01

  1. zonemta, zone-mta.service
$ systemctl cat zone-mta.service 
# /etc/systemd/system/zone-mta.service
[Unit]
Description=Zone Mail Transport Agent
Conflicts=sendmail.service exim.service postfix.service
After=mongod.service redis.service

[Service]
Environment="NODE_ENV=production"
WorkingDirectory=/opt/zone-mta
ExecStart=/usr/bin/node index.js --config="/etc/zone-mta/zonemta.toml"
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
Restart=always
SyslogIdentifier=zone-mta

[Install]
WantedBy=multi-user.target
  1. /etc/zone-mta/zonemta.toml
user="wildduck"
group="wildduck"
# This is the main config file

name="ZoneMTA"

# Process identifier
ident="zone-mta"

# Run as the following user. Only use this if the application starts up as root
#user="zonemta"
#group="zonemta"

[log]
# Logging options
# @include "log.toml"

[dbs]
# MongoDB and Redis connection options
# @include "dbs-{env}.toml"

[queue]
# @include "queue.toml"

[dns]
# @include "dns.toml"

[api]
port=12080

[smtpInterfaces]
# @include "interfaces/*.toml"

[plugins]
# @include "plugins/*.toml"

[pools]
# @include "pools.toml"

[zones]
# @include "zones/*.toml"

[domainConfig]
# @include "domains.toml"