Plesk – Apagar el servicio de mail por dominio


Útil comando, tengo que buscar más información sobre el. Uso? Imaginad que queremos apagar el servicio de mail de un dominio pero por el panel web de plesk es imposible:

# /etc/init.d/psa stopall
# /etc/init.d/mysql start
# /usr/local/psa/bin/domain -u -mail_service false

SUCCESS: Update of domain '' complete.

Y hay por gente que se ha hecho un script para hacerlo automático:

# This script finds all sites in Plesk that have the mail enabled, then disables them.
SiteList=`egrep 'Server(Name)' /var/www/vhosts/*/conf/httpd.include|
awk '{print $3}'|grep -v www.*|
grep -v '^.*\..*\..*$'|sed 's/:80//'|
sed 's/:443//'|sort -u`;
for Site in $SiteList
Result=`/usr/local/psa/bin/domain -i $Site | grep 'Mail service' | awk '{print $3}'`;
if [ $Result == On ]; then
Command=`/usr/local/psa/bin/domain -u $Site -mail_service false`
echo "Turning Off Mail Service: $Site";

Leave a Reply

Your email address will not be published. Required fields are marked *