Mercurial > libervia-backend
diff libervia/backend/plugins/plugin_comp_email_gateway/__init__.py @ 4377:448d701187b8
component email gateway: Add basic disco policy:
rel 460
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 26 Jun 2025 17:01:41 +0200 |
parents | f43cbceba2a0 |
children |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_comp_email_gateway/__init__.py Sun Jun 08 17:16:58 2025 +0200 +++ b/libervia/backend/plugins/plugin_comp_email_gateway/__init__.py Thu Jun 26 17:01:41 2025 +0200 @@ -1090,7 +1090,49 @@ class EmailGatewayHandler(XMPPHandler): def getDiscoInfo(self, requestor, target, nodeIdentifier=""): - return [] + return [ + data_form.Form( + "result", + formNamespace="urn:xmpp:data-policy:0", + fields=( + data_form.Field( + "list-single", + "auth_data", + "plain" + ), + data_form.Field( + "list-single", + "data-transmission", + "encrypted" + + ), + data_form.Field( + "text-single", + "encryption_algorithm", + "TLS" + + ), + data_form.Field( + "text-single", + "data_retention", + "0", + + ), + ), + ), + data_form.Form( + "result", + formNamespace="urn:xmpp:data-policy:identity:gateway:smtp:0", + fields=( + data_form.Field( + "text-multi", + "extra_info", + "This gateway acts as a relay to external IMAP/SMTP servers. Data policies depend entirely on the external server chosen by the user. This gateway does not store or process user data.", + + ), + ), + ), + ] def getDiscoItems(self, requestor, target, nodeIdentifier=""): return []