gnu-social/docker/mail/rootfs/usr/bin/new-domain.sh

17 lines
241 B
Bash
Raw Normal View History

#!/bin/sh
USAGE="Usage: $0 DOMAIN";
if [ -z "$1" ]
then
echo "$USAGE";
exit 1;
fi
2020-10-31 17:19:13 +00:00
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."