Files
SocialPub/tools/pasture/peers/mailpit.sh
T

15 lines
808 B
Bash
Raw Normal View History

# Mailpit 1.31.4 as mailpit.test: the pasture's mail server. PrivaPub sends to it on pasture-mailpit:1025 (plain SMTP, any
# login accepted, appsettings.Pasture.json's EmailConfiguration), and the scenarios read what arrived through its API
# (https://mailpit.test:6443/api/v1/...). Nothing leaves the pasture.
MAILPIT_IMAGE=${MAILPIT_IMAGE:-docker.io/axllent/mailpit:v1.31.4}
mailpit_up() {
podman run -d --replace --name pasture-mailpit --label pasture=1 --network $net \
-e MP_SMTP_AUTH_ACCEPT_ANY=1 -e MP_SMTP_AUTH_ALLOW_INSECURE=1 -e MP_MAX_MESSAGES=5000 \
$MAILPIT_IMAGE >/dev/null
for _ in $(seq 1 60); do
site mailpit.test -s -o /dev/null -w '%{http_code}' https://mailpit.test:6443/api/v1/info 2>/dev/null | grep -q 200 && break
sleep 1
done
echo "mailpit: https://mailpit.test:6443"
}