2020-10-27 20:21:10 +09:00
|
|
|
#!/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
|
2020-10-27 20:21:10 +09:00
|
|
|
postmap /etc/mail/domains
|
|
|
|
mkdir "/var/mail/$1"
|
|
|
|
chown vmail:vmail "/var/mail/$1"
|
|
|
|
postfix reload
|
|
|
|
|
|
|
|
echo "Domain added."
|