Mail service is not being disabled upon subscription suspension

Created:

2016-11-16 13:24:09 UTC

Modified:

2017-08-16 16:17:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mail service is not being disabled upon subscription suspension

Applicable to:

  • Plesk 11.x for Linux

Symptoms

Subscription was suspended, however mail users on the subscription are still able to login/send/receive mail.

Cause

This is a software issue, which will be fixed in the future updates.

Resolution

In order to work around the issue, you may create an event handler for the "domain status changed" event and put there a script that disables the mail service on domain suspension:

cat fix_suspend.sh

#!/bin/bash
##
## $1 - domain name $2 - new status $3 - old status
if [ $2 == 2 ]
then
/usr/local/psa/bin/mail --off $1
exit 0
fi
if [ $3 == 2 ] && [ $2 == 0 ]
then
/usr/local/psa/bin/mail --on $1
else
echo 'Nothing to do'
fi

The event handler should have the following options:

Default domain, status updated  lowest (0)      root    /root/fix_suspend.sh <old_domain_name> <new_status> <old_status>
Have more questions? Submit a request
Please sign in to leave a comment.