Search Our Database
Linux SmarterMail | WebDAV Authentication (HTTP 401)
Introduction
SmarterMail CalDAV and CardDAV clients use WebDAV to synchronize calendars and contacts.
This guide shows how to generate and compare an HTTP Basic Base64 value, test it against the WebDAV endpoint, and read the result in SmarterMail logs.
Prerequisites
- Email address and password, or WebDAV credential (a WebDAV application password needed when two-factor authentication is enabled).
- The correct HTTPS WebDAV URL from the mailbox’s SmarterMail,
- WebDAV service access enabled for that mailbox.
- Windows PowerShell or a Linux terminal with curl for testing.
- SmarterMail administrator access is required to inspect SmarterMail troubleshooting logs.
Important notes
Impact: The PROPFIND tests only check / read WebDAV properties, this does not modify calendar or contact data. Enabling WebDAV or changing a password is a separate administrative action.
Security: Base64 is reversible, not encryption. Use HTTPS. Never share a real password, decoded credential pair, or generated Basic header in a public ticket or screenshot. Commands containing real credentials can remain in shell history.
Tip: Enable detailed logs. Log in to SmarterMail as a System Administrator > Navigate to Manage > Troubleshooting > Protocol Logging, ensure WebDAV is set to Detailed
How HTTP Basic authentication works
SmarterMail makes calendars and contacts available to compatible clients through CalDAV and CardDAV, which use WebDAV methods over HTTP(S). When the connection uses HTTP Basic authentication, a client submits a mailbox identifier and credential user@example.com:WEB_DAV_CREDENTIAL to access the service (WebDAV). It then sends Authorization: Basic <Base64-value> over HTTPS. When two-factor authentication is configured, SmarterMail require a WebDAV-specific application password instead of the email password.
Step-by-step guide
Step 1: Generate the Base64 value.
Windows PowerShell:
Linux:
or
Step 2: (Optional) Decode to confirm the input.
To check that the encoded bytes represent the intended username/password string, decode the example value locally. Do not print or share decoded production passwords.
Windows PowerShell:
Linux:
Expected decoded text: user@example.com:password.
Step 3: Confirm the correct WebDAV credentials and URL.
Use the mailbox’s email address and the password applicable to WebDAV.
If two-factor authentication is configured, check WebDAV application password.
Confirm that the mailbox has WebDAV enabled and copy its actual WebDAV URL example https://mail.example.com/webdav/ from SmarterMail.
Step 4: Testing :Send a read-only PROPFIND request using the generated value.
Replace the example URL with the mailbox’s real HTTPS WebDAV URL. Paste only the Base64 text at the prompt.
Windows PowerShell:
try {
“Authorization: Basic $auth” | curl.exe -sS `
-X PROPFIND -H ‘@-‘ -H ‘Depth: 0’ `
-H ‘Content-Type: application/xml’ `
–data-binary ‘<d:propfind xmlns:d=”DAV:”><d:allprop/></d:propfind>’ `
-o NUL -w ‘HTTP %{http_code} TLS_VERIFY %{ssl_verify_result}\n’ `
‘https://mail.example.com/webdav/’
} finally {
Remove-Variable auth -ErrorAction SilentlyContinue
}
Linux (Bash):
printf ‘Authorization: Basic %s\n’ “$auth” | curl -sS \
-X PROPFIND -H ‘@-‘ -H ‘Depth: 0’ \
-H ‘Content-Type: application/xml’ \
–data-binary ‘<d:propfind xmlns:d=”DAV:”><d:allprop/></d:propfind>’ \
-o /dev/null -w ‘HTTP %{http_code} TLS_VERIFY %{ssl_verify_result}\n’ \
‘https://mail.example.com/webdav/’
unset auth
Expected result: a successfully processed PROPFIND commonly returns HTTP 207. The TLS_VERIFY 0 value generally indicates that curl’s certificate verification succeeded; it does not establish that authentication succeeded. Do not use –insecure to bypass TLS verification. The PowerShell prompt may display the pasted Base64 value: use a trusted workstation.
Step 5: Check WebDAV log.
In SmarterMail, open Manage > Troubleshooting > View Logs, select the WebDAV log, and compare the test time and mailbox with the corresponding server-side result.
| Result | What it indicates |
|---|---|
| HTTP 207 Multi-Status | WebDAV processed the request. |
| HTTP 401 Unauthorized | Check the username, WebDAV password/application password |
| “WebDAV not enabled” in log | Service access was rejected; have the system administrator review the mailbox’s WebDAV setting. |
| HTTP 000 / TLS error | Check connectivity, DNS, endpoint, or certificate problems |
Conclusion
Generate and compare the Base64 value, test it with PROPFIND, then use the WebDAV log to distinguish if the access issue from password errors, server configurations, or client / User Agent issues.
References
Through technology, we learn. Through sharing, we connect.
Explore more guides at https://kb.ipserverone.com/
For technical support / service enquiries, please reach out to support@ipserverone.com for assistance.