server-debian/poste-io/@reboot.sh

31 lines
640 B
Bash
Raw Normal View History

2023-07-18 16:20:48 +02:00
#!/usr/bin/zsh
# clear port 25 for landing
# lsof -i :25
pkill sendmail
# stop and remove old container
docker stop mailserver
docker rm `docker ps -a -q`
docker container rm -f `docker ps -a -q`
docker container prune
# update container
docker pull analogic/poste.io
# start
docker run \
--detach \
--restart always \
--name 'mailserver' \
--hostname 'mx.dym.sh' \
--publish 25:25 \
--publish 143:143 \
--publish 587:587 \
--publish 993:993 \
--publish 4190:4190 \
--publish 12080:80 \
--publish 12443:443 \
--volume /etc/localtime:/etc/localtime:ro \
--volume /var/mail/data:/data \
--tty analogic/poste.io