• 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

Issue Plesk-API: How to set Mail Service Prefs?

ChrisH

Basic Pleskian
Hi,
following this documentation it should be able to de/activate Webmail and Greylisting with the API:
Mail Service Preferences

So this should work:
<packet> <mail> <set_prefs> <filter> <site-id>1</site-id> </filter> <prefs> <greylisting>true</greylisting> <webmail>none</webmail> <mailservice>true</mailservice> </prefs> </set_prefs> </mail> </packet>

But I get an error:
Parser error: Request is invalid. Error in line 13: Element 'webmail': This element is not expected. Expected is one of ( mailservice, ip_address, mail-provider, webmail-certificate ).

Anybody any ideas? It it an bug?

Thanks in advance!
Cheers Chris.
 
Indeed, <webmail>none</webmail> only works alone like:

<packet>
<mail>
<set_prefs>
<filter>
<site-id>1</site-id>
</filter>
<prefs>
<webmail>none</webmail>
</prefs>
</set_prefs>
</mail>
</packet>

and after that, you may run:

<packet>
<mail>
<set_prefs>
<filter>
<site-id>1</site-id>
</filter>
<prefs>
<greylisting>true</greylisting>
<mailservice>true</mailservice>
</prefs>
</set_prefs>
</mail>
</packet>

You can submit request to Reports and I will forward it to developers for consideration.
 
Thank you IgorG for your answer. You are right, webmail alone will work. But have you tried to change greylisting? It doesn't work at all - even alone.
I will submit an request. Thanks again.
 
Back
Top