Browse Source

new: [smtp-stub] new charm

matomo
Boris Gallet 1 year ago
committed by Valentin Lab
parent
commit
50b7d74894
  1. 18
      smtp-stub/hooks/smtp_server-relation-joined
  2. 11
      smtp-stub/metadata.yml

18
smtp-stub/hooks/smtp_server-relation-joined

@ -0,0 +1,18 @@
#!/bin/bash
OPTS=(
host
port
connection-security
auth-method
)
for var in "${OPTS[@]}"; do
value=$(options-get "$var") && relation-set "$var" "$value" || exit 1
case "$var:$value" in
auth-method:password)
login=$(options-get "login") && relation-set login "$login" || exit 1
password=$(options-get "password") && relation-set password "$password" || exit 1
;;
esac
done

11
smtp-stub/metadata.yml

@ -0,0 +1,11 @@
type: stub
provides:
smtp-server:
default-options:
port: 25
connection-security: none # "none", "starttls", "ssl/tls"
auth-method: plain # "none", "password"
user:
password:
Loading…
Cancel
Save