拉取docker镜像

docker pull zixia/simple-mail-forwarder

设置环境变量

export SMF_CONFIG='testi@testo.com:test@test.com:test'

启动容器

docker run -d -e SMF_CONFIG -p 25:25 zixia/simple-mail-forwarder

域名解析配置

A记录 mail.test.com 到 xxx.xxx.xxx.xxx
MX记录 test.com 到 mail.test.com
TXT记录 test.com 记录值:v=spf1 ip4:xxx.xxx.xxx.xxx -all