Plesk

De Sn4kY
Aller à : navigation, rechercher

Lister les redirections emails

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) --batch psa -e "SELECT CONCAT_WS('@',mail.mail_name,domains.name) AS adresse ,mail_redir.address AS redirection FROM domains,mail,mail_redir WHERE domains.id=mail.dom_id AND mn_id=mail.id ORDER BY domains.name ASC,mail.mail_name ASC;" | sed 's/\t/\t->\t/g'

Lister les domaines par IP

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin -Dpsa -e"SELECT dom.id, dom.name, ia.ipAddressId, iad.ip_address FROM domains dom LEFT JOIN DomainServices d ON (dom.id = d.dom_id AND d.type = 'web') LEFT JOIN IpAddressesCollections ia ON ia.ipCollectionId = d.ipCollectionId LEFT JOIN IP_Addresses iad ON iad.id = ia.ipAddressId WHERE iad.ip_address='<THE.IP.ADDRESS.HERE>'"

Lister les domaines par version/handler PHP

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) psa -e "select dom_id,www_root,php_handler_id from hosting where php_handler_id LIKE '%5.2%';"