Sunday, February 13, 2022

How To Install Postal SMTP Server On Ubuntu 20.04 ( Docker Version )

 in This Tutorial you will learn "  How To Install Postal SMTP Server On Ubuntu 20.04 ( Docker Version )

Postal is a free, open source mail server written in Ruby and JavaScript. It is a feature-rich mail server application that can be used as an alternative to Sendgrid, Mailchimp, Mailgun and other similar SMTP servers.
Homepage - https://docs.postalserver.io/   | Github - https://github.com/postalserver/postal
_________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
_________________________________________________________________________________________
lsb_release -d ; hostname -I ; hostname

apt-get install apt-transport-https ca-certificates curl software-properties-common git curl jq -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
  "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

apt-get update -y ; apt-get install docker-ce docker-ce-cli containerd.io -y
curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

git clone https://postalserver.io/start/install /opt/postal/install
sudo ln -s /opt/postal/install/bin/postal /usr/bin/postal

docker run -d \
   --name postal-mariadb \
   -p 127.0.0.1:3306:3306 \
   --restart always \
   -e MARIADB_DATABASE=postal \
   -e MARIADB_ROOT_PASSWORD=postalpassword \
   mariadb

docker run -d \
   --name postal-rabbitmq \
   -p 127.0.0.1:5672:5672 \
   --restart always \
   -e RABBITMQ_DEFAULT_USER=postal \
   -e RABBITMQ_DEFAULT_PASS=password \
   -e RABBITMQ_DEFAULT_VHOST=postalvhost \
   rabbitmq:3.8

postal bootstrap ubuntu.example.com
nano /opt/postal/config/postal.yml
postal initialize
postal make-user                                                                           | admin@example.com/admin@example.com
postal start
postal status

docker run -d \
   --name postal-caddy \
   --restart always \
   --network host \
   -v /opt/postal/config/Caddyfile:/etc/caddy/Caddyfile \
   -v /opt/postal/caddy-data:/data \
   caddy
http://127.0.0.1:5000
__________________________________________________________________________________________


No comments:

Post a Comment