comparison 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
comparison
equal deleted inserted replaced
4376:7ac28a270b7f 4377:448d701187b8
1088 1088
1089 @implementer(iwokkel.IDisco) 1089 @implementer(iwokkel.IDisco)
1090 class EmailGatewayHandler(XMPPHandler): 1090 class EmailGatewayHandler(XMPPHandler):
1091 1091
1092 def getDiscoInfo(self, requestor, target, nodeIdentifier=""): 1092 def getDiscoInfo(self, requestor, target, nodeIdentifier=""):
1093 return [] 1093 return [
1094 data_form.Form(
1095 "result",
1096 formNamespace="urn:xmpp:data-policy:0",
1097 fields=(
1098 data_form.Field(
1099 "list-single",
1100 "auth_data",
1101 "plain"
1102 ),
1103 data_form.Field(
1104 "list-single",
1105 "data-transmission",
1106 "encrypted"
1107
1108 ),
1109 data_form.Field(
1110 "text-single",
1111 "encryption_algorithm",
1112 "TLS"
1113
1114 ),
1115 data_form.Field(
1116 "text-single",
1117 "data_retention",
1118 "0",
1119
1120 ),
1121 ),
1122 ),
1123 data_form.Form(
1124 "result",
1125 formNamespace="urn:xmpp:data-policy:identity:gateway:smtp:0",
1126 fields=(
1127 data_form.Field(
1128 "text-multi",
1129 "extra_info",
1130 "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.",
1131
1132 ),
1133 ),
1134 ),
1135 ]
1094 1136
1095 def getDiscoItems(self, requestor, target, nodeIdentifier=""): 1137 def getDiscoItems(self, requestor, target, nodeIdentifier=""):
1096 return [] 1138 return []