DNS Records
Type | Name | Value | Priority | TTL |
---|---|---|---|---|
A | @ | ip | - | Automatic |
MX | @ | this.com | 10 | Automatic |
Node
$ curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get install -y nodejs
$ node -v
v8.16.0
Forsaken Mail
$ git clone https://github.com/denghongcai/forsaken-mail
$ cd forsaken-mail
$ npm install
pm2
$ npm install -g pm2
$ pm2 start /root/forsaken-mail/bin/www
[PM2] Starting /root/forsaken-mail/bin/www in fork_mode (1 instance)
[PM2] Done.
┌──────┬────┬──────┬────────┬───┬─────┬───────────┐
│ Name │ id │ mode │ status │ ↺ │ cpu │ memory │
├──────┼────┼──────┼────────┼───┼─────┼───────────┤
│ www │ 0 │ fork │ online │ 0 │ 0% │ 24.9 MB │
└──────┴────┴──────┴────────┴───┴─────┴───────────┘
Use `pm2 show <id|name>` to get more details about an app
$ pm2 startup
$ pm2 save
vhost.conf
location / {
proxy_pass http://127.0.0.1:3000;
}
$ service nginx restart
firewall
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3000 -j ACCEPT
$ iptables-restore < /etc/iptables.up.rules
Test
http(s)://this.com:3000
更新 2019-05-05