docker部署poste mail服务

实验环境

cat /etc/redhat-release && uname -a

CentOS Linux release 7.8.2003 (Core)

Linux centos7-1 3.10.0-1127.el7.系统运维工程师x86_64

systemctl stop firewalld && systemctl disable firewalld

echo SELINUX=dlinux系统isabled > /etc/sysconfig/selinux

cp -pv /etccentos关机命令/sysctl.conf /etc/sylinux必学的60个命令sctl.conf.bak

echo net.ipv4.tcp_syncookies = 1 >> /etc/sysctl.conf

echo net.ipv4.tcp_tw_reuse = 1 >> /etc/sysctl.conf

echo net.ipv4.tcp_tw_recycle = 1 &gcentos7关闭防火墙t;> /etc/sysctl.conf

echo net.ipv4.tcp_fin_timeout = 10 >&linux常用命令gt; /etc/linux删除文件命令sysctl.conf

echo net.ipv4.ip_forward = 1 >> /etc/sysctl.conf

sysctl -p

软件安装

yum installinux系统l -y yum-utils docker-ce-18.06.2.ce dolinuxcker-ce-cli-18.06.2.celinux系统安装 containerd.centos7安装教程io openssl

sycentos查看系统版本stemctl daemon-reload

syslinuxtemctl start docker && systemctl enable docker

docker --version

Docker version 18.06.2-ce, build 6d37f41

docker pull analogdockeric/poste.io

dock系统运维工作内容er run -itd

-p 80:80 -linux操作系统基础知识p 8443:443 -p 25:25 -p 110:110 -p 143:143 -p 465:465 -p 587:dockers什么品牌587 -p 993:993 -p 995:995 -p 4190:41系统/运维90

--restart=always --user roocentos7t:root

-e TZ=Asia/Shanghai -linux必学的60个命令h "test.com"

-v /usr/local/maildocker菜鸟教程/mail-data:系统运维工作内容/data

--namdocker菜鸟教程e mail analinuxlogic/poste.io

mkdir -pv /usr/local/mail/mail-data/pki 由于没有证书所以需要私签证书

cd /usr/local/mail/mail-data/pki/

openssl genrsa -des3 -out serdockersver.key 2048

Enter pascentos安装s phrase for server.key:

Verifying - Enter pass phrase for server.key: 第一次申请证书需linux必学的60个命令要输入验证

openssl req -new -key serv系统运维工程师er.key -out server.csr

cp -pv server.key server.key.org

opecentos安装nssl rsa -in servelinux必学的60个命令r.key.org -out server.key 取消证书验证

openssl x509 -recentos7q -sha256 -days 365 -in server.csr -signkey server.key -outdockerfile server.crt

ll /usrdocker常用命令/local/mail/mail-data/pki/

secentos查看系统版本rvlinux删除文件命令er.crt

server.csr

servdockerser.key

docker locentos关机命令gs -f mail 查系统运维工程师看容器日志

Poste.io administration availabcentos7网络配置le at https://172.17.0.2:443 or http://172docker镜像.17.0.2:80

do系统运维工作内容cker exec -i系统运维工作内容t mail /bin/bash 进入容器日志

dockerlinux常用命令 save analogi系统/运维c/poste.io > postemail_images.tar.gz 备centos7安装教程份镜像

docke load -i postemail_images.tar.gz 还原镜像

docker export mail > postmail_docker.tar.gz 备份容器

docker import postmail_docker.tar.gz 还原容器

邮箱前台

​​https://serverilinux必学的60个命令p:8443/webmail/​​


                                            docker部署poste mail服务


                                            docker部署poste mail服务


                                            docker部署poste mail服务


                                            docker部署poste mail服务

用户名 admin@testdockerhub.com

验证 root1docker23456

邮箱管理后台

​​hlinuxttps://serverip:8443/admcentos7关闭防火墙in/login​​​​


                                            docker部署poste mail服务

用户名 admin@test.com

验证 root123456

netstat -tuplna

tcp6centos安装 0 0 :::993 ::centos7关闭防火墙:* LISTEN 9373/docker-proxy

tcp6 0 0 :::995 :::* LISTEN 9362/docker-proxy

tcp6 0 0 :::docker587 :::* LISTEN 9384系统运维工程师/docker-proxy

tcp6 0 0 :::110 :::* LISTEN 9417/docker-proxy

tcp6 0 0 :::143 :::* LISTEN 9406/dockerlinux删除文件命令-proxy

tcp6 0 0 :::80 :::* LISTEN 9428/dockecentos7重置root密码r-prdockersoxy

tcp6 0 0 :::465 :::* LISTEN 9395/docker-proxy

tcp6 0 0 :::25 :::* LISTEN 9439/docker-proxycentos7配置ip地址

tcp6 0 0 :::8443 :::* LISTEN 9340/docker-proxy

tcp6 0 0 :::4190 :::* LISTEN 9351linux系统安装/docker-proxy