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-11-01 02:19:13 +09: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."