• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved how to obtain the SSL/TLS certificate used for mail?

I've found "something"

In the database there is something thatmight be what i'm looking for

SELECT * FROM `Parameters` WHERE parameter='mail_certificate_id'

what the field 'id' in that table refers to?

Can i connect to database from an extension? maybe calling the command line?
 
This Query shows the information i need.

SELECT d.name,ds.type,c.name
FROM domains d
LEFT JOIN DomainServices ds ON ds.dom_id=d.id AND ds.type='mail'
LEFT JOIN Parameters p ON p.id=ds.parameters_id AND p.parameter='mail_certificate_id'
LEFT JOIN certificates c ON c.id=p.value

Is there any way to execute queries in database from an extension?

Thanks.
 
I have no idea because I always secure and select certificate from the plesk panel itself
 

Attachments

  • ssl.jpg
    ssl.jpg
    33.5 KB · Views: 2
If someone needs it, this is how you can make a database query from an extension

$data= pm_Bootstrap::getDbAdapter()->query("SELECT * FROM table")->fetchAll();
 
Back
Top