- Plesk Onyx for Linux
It is impossible to delete the IP address via Tools & Settings > IP Addresses > 203.0.113.2 > Remove:
PLESK_ERROR: Error: The IP address
203.0.113.2is already used for hosting.
There are no domains assigned to this IP address
Previously, there were domains on this IP address, but they were switched to Forwarding or No Hosting hosting type in Domains > example.com > Hosting Settings
In Tools & Settings > Mail Server Settings > Outgoing mail mode is set to Send from domain IP addresses.
It is a Plesk bug #PPPM-8945 which is going to be fixed in the future updates.
Until a fix becomes available, use the following workarounds to switch mail to another IP address:
For one subscription:
Connect to the server via SSH
Execute the following command for the affected subscription:
# plesk bin subscription -u example.com -ip <new-ip-address> -mail-service-ip <new-ip-address>
For multiple subscriptions:
- Connect to the server via SSH
Get ID from the old IP address:
# plesk db -Ne "select id from IP_Addresses where ip_address='<old-ip-address>'"
Create a list with the subscriptions assigned to the old IP address:
# plesk db -Nse "SELECT d.name FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and ipac.ipAddressId = 2 GROUP BY d.name ASC" > subscriptions.list
ipac.ipAddressId = 2with the id from the previous command
Change affected subscriptions with the new IP address:
# cat subscriptions.list | while read i; do plesk bin subscription -u $i -ip <new-ip-address> -mail-service-ip <new-ip-address> ; done