To set this up, first create an app using your identity provider's management interface. You will need to provide Webmail's Redirect URI. Then configure Webmail's OIDC settings page. Enable OIDC, enter your provider's Issuer URL, the app's Client ID and Secret, and any other settings that are necessary.
Webmail needs to know which MDaemon account each account on the identity provider will sign in to. Configure the identity provider to send the user's MDaemon email address as a claim (making sure users cannot set or change the value themselves, or they'll be able to get into someone else's email). Or configure Webmail with the unique identifier of each user (for example, using the "sub" or "oid" claim) and which MDaemon account to sign in to.