# HG changeset patch # User Goffi # Date 1750950101 -7200 # Node ID 448d701187b8d83d3388a383f7e21b765436ffd7 # Parent 7ac28a270b7fc9aefb664fee62b754d45e844d7c component email gateway: Add basic disco policy: rel 460 diff -r 7ac28a270b7f -r 448d701187b8 libervia/backend/plugins/plugin_comp_email_gateway/__init__.py --- 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 []