- Server operating system version
- CentOS 7
- Plesk version and microupdate number
- 18.0.44.3
I'm trying to populate a list of all domains (and aliases) that have the mail service enabled in a script.
Though it's possible to walk through domains and domain aliases using
It's easy to do this for domain aliases:
However, there's no
Where and how can I find the mail service on/off state for all regular domains in the Plesk database?
Though it's possible to walk through domains and domain aliases using
plesk bin domain --info example.com | grep -E 'Mail service:\s*On'
, this is slow and inefficient compared to finding these in the database directly.It's easy to do this for domain aliases:
Code:
/usr/sbin/plesk db -Ns --execute="SELECT name FROM domain_aliases WHERE mail='true' ORDER BY name ASC;"
However, there's no
mail
column in the domains
table.Where and how can I find the mail service on/off state for all regular domains in the Plesk database?