Applicable to:
- Plesk Obsidian for Windows
Symptoms
-
Unable to create or see existing mailboxes on Plesk with Smartermail:
PLESK_ERROR: Error: No HTTP resource was found that matches the request URI
at getMailName(jdoe, example.com)(SmarterMail::Local::Provider::getMailName line 218)
at Unable to execute console command: '--add-mailbox'(vconsoleapp::start line 95)
at Unable to execute command: '"C:\Program Files (x86)\Plesk\admin\bin\mailmng" --add-mailbox "--domain-name=example.com" "--mailname=jdoe" "--password=*"'(vconsoleapp::run line 117) -
SmarterMail Build 7817 is used
Request to "http://localhost:9998/api/v1/settings/sysadmin/list-usernames/example.com" entry point failed with 404 HTTP error.
Response body:
CONFIG_TEXT: {"message":"No HTTP resource was found that matches the request URI"}
Check with this PowerShell script
CONFIG_TEXT: $authHeaders = New-Object "System.collections.Generic.Dictionary[[String],[String]]"
$authHeaders.Add("Content-Type", "application/json")
# "$" in password have to be "escaped" with () \ $authBody = "{
n "username
": "admin
",n
"password":
"PASSWORD-HERE
" `n}"
$response = Invoke-RestMethod "http://localhost:9998/api/v1/auth/authenticate-user" -Method 'POST' -Headers $authHeaders -Body $authBody
# SM Access Token
$smailAuthRes = $response.accessToken
# Message Traffic Statistics Example
$statHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$statHeaders.Add("Authorization", "Bearer $smailAuthRes")
# This results in the error
Invoke-RestMethod "http://localhost:9998/api/v1/settings/sysadmin/list-usernames/example.com" -Method 'GET' -Headers $statHeaders
# This one return some data about example.com
Invoke-RestMethod "http://localhost:9998/api/v1/settings/sysadmin/domain/example.com" -Method 'GET' -Headers $statHeaders
Cause
SmarterMail Build 7817 breaks API backward compatibility.
PPS-11209
Resolution
SmarterMail expects to provide a permanent fix by the end of June.
As a workaround, there's a custom SmarterMail build available here.
Follow the instruction to install it:
-
Connect to the server via RDP
-
Access Internet Information Server manager (IIS)
-
In IIS manager stop the SmarterMail IIS site and its application pool.
-
Open Windows system services
-
Stop the SmarterMail system service and wait 15-30 seconds for it to drop out of memory.
-
Note the current SmarterMail installation directory, then uninstall SmarterMail.
-
Install the new build of SmarterMail to the same directory used previously.
-
While the installer is finishing up (copying new files) go ahead and start the SmarterMail application pool and IIS site.
For additional information, refer to https://portal.smartertools.com/kb/root.aspx
Comments
6 comments
How come plesk isn't using the latest API? you've had years to update Plesk to use the modern api and not legacy which is no longer supported.
Here is the fix:
https://www.smartertools.com/downloads/SmarterMail/CustomBuilds/100.0.7822.21605-SML-3273/SmarterMail_7822.exe
When you fix this issue?
The issue has not resolved, several account sends error 500 when I enter to properties and if the I remove the account and I create again send error:
"%plesk_bin%\mailmng.exe" --add-mailbox --domain-name=domainame.com --mailname=mailboxuser
User mailboxuser@domainname.com does not exist
at (SmarterMail::Common::MailName::MailName line 21)
at getMailName(mailboxuser, domainname.com)(SmarterMail::Local::Provider::getMailName line 218)
at Unable to execute console command: '--add-mailbox'(vconsoleapp::start line 95)
at Unable to execute command: '"mailmng.exe" --add-mailbox "--domain-name=domainame.com" "--mailname=mailboxuser"'(vconsoleapp::run line 117)
Victor your issue is not related
Firstly make sure you’re using the new custom build from my link above
If you still get the error open cmd on plesk server and run: plesk repair mail domain.com
Hello Christofer, yes I've installed the custom build, however some accounts has the issue, after the install of new build some account was fixed but other no
Please sign in to leave a comment.