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

31 lines
628 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
2023-10-20 13:40:58 +02:00
docker rm mailserver
docker container rm -f mailserver
2023-07-18 16:20:48 +02:00
docker container prune
# update container
docker pull analogic/poste.io
# start
docker run \
--detach \
--restart always \
--name 'mailserver' \
2023-10-20 13:40:58 +02:00
--hostname 'mail.dym.sh' \
2023-07-18 16:20:48 +02:00
--publish 25:25 \
--publish 143:143 \
--publish 587:587 \
--publish 993:993 \
--publish 4190:4190 \
2023-10-20 13:40:58 +02:00
--publish 11080:80 \
--publish 11443:443 \
2023-07-18 16:20:48 +02:00
--volume /etc/localtime:/etc/localtime:ro \
--volume /var/mail/data:/data \
--tty analogic/poste.io