ยง2024-10-28

 sudo diff /opt/haraka/plugins/wildduck/node_modules/zone-mta/config/default.js  /opt/haraka/plugins/wildduck/node_modules/zone-mta/config/default.js.backup
16,17c16
<         // mongo: 'mongodb://127.0.0.1:27017/zone-mta',
< 	mongo: 'mongodb://siteRootAdmin:b23258585@redisMongo03.yushei.com.tw:27017,redisMongo04.yushei.com.tw:27017,redisMongo05.yushei.com.tw:27017/zone-mta?authSource=admin&replicaSet=ys20220318',
---
>         mongo: 'mongodb://127.0.0.1:27017/zone-mta',
$ sudo 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
$ cat /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"