gnu-social/docker/mail/rootfs/usr/bin/new-domain.sh
2021-09-14 13:10:13 +01:00

17 lines
241 B
Bash

#!/bin/sh
USAGE="Usage: $0 DOMAIN";
if [ -z "$1" ]
then
echo "$USAGE";
exit 1;
fi
echo "$1 #OK" >> /etc/mail/domains
postmap /etc/mail/domains
mkdir "/var/mail/$1"
chown vmail:vmail "/var/mail/$1"
postfix reload
echo "Domain added."