Browse Source

"use_ssl" instead of "ssl" param for mail reply

Guénaël Muller 7 years ago
parent
commit
abcc2e8c42

+ 1 - 1
tracim/development.ini.base View File

@@ -221,7 +221,7 @@ email.reply.imap.port = 993
221 221
 email.reply.imap.user = your_imap_user
222 222
 email.reply.imap.password = your_imap_password
223 223
 email.reply.imap.folder = INBOX
224
-email.reply.imap.ssl = true
224
+email.reply.imap.use_ssl = true
225 225
 # Token for communication between mail fetcher and tracim controller
226 226
 email.reply.token = mysecuretoken
227 227
 # Delay in seconds between each check

+ 2 - 2
tracim/tracim/config/app_cfg.py View File

@@ -379,8 +379,8 @@ class CFG(object):
379 379
         self.EMAIL_REPLY_TOKEN = tg.config.get(
380 380
             'email.reply.token',
381 381
         )
382
-        self.EMAIL_REPLY_IMAP_SSL = asbool(tg.config.get(
383
-            'email.reply.imap.ssl',
382
+        self.EMAIL_REPLY_IMAP_USE_SSL = asbool(tg.config.get(
383
+            'email.reply.imap.use_ssl',
384 384
         ))
385 385
 
386 386
         self.TRACKER_JS_PATH = tg.config.get(

+ 1 - 1
tracim/tracim/lib/daemons.py View File

@@ -171,7 +171,7 @@ class MailFetcherDaemon(Daemon):
171 171
             port=cfg.EMAIL_REPLY_IMAP_PORT,
172 172
             user=cfg.EMAIL_REPLY_IMAP_USER,
173 173
             password=cfg.EMAIL_REPLY_IMAP_PASSWORD,
174
-            ssl=cfg.EMAIL_REPLY_IMAP_SSL,
174
+            use_ssl=cfg.EMAIL_REPLY_IMAP_USE_SSL,
175 175
             folder=cfg.EMAIL_REPLY_IMAP_FOLDER,
176 176
             delay=cfg.EMAIL_REPLY_CHECK_HEARTBEAT,
177 177
             # FIXME - G.M - 2017-11-15 - proper tracim url formatting

+ 4 - 4
tracim/tracim/lib/email_fetcher.py View File

@@ -176,7 +176,7 @@ class MailFetcher(object):
176 176
                  port: str,
177 177
                  user: str,
178 178
                  password: str,
179
-                 ssl: bool,
179
+                 use_ssl: bool,
180 180
                  folder: str,
181 181
                  delay: int,
182 182
                  endpoint: str,
@@ -190,7 +190,7 @@ class MailFetcher(object):
190 190
         :param port: imap connection port
191 191
         :param user: user login of mailbox
192 192
         :param password: user password of mailbox
193
-        :param ssl: use imap over ssl connection
193
+        :param use_ssl: use imap over ssl connection
194 194
         :param folder: mail folder where new mail are fetched
195 195
         :param delay: seconds to wait before fetching new mail again
196 196
         :param endpoint: tracim http endpoint where decoded mail are send.
@@ -201,7 +201,7 @@ class MailFetcher(object):
201 201
         self.port = port
202 202
         self.user = user
203 203
         self.password = password
204
-        self.ssl = ssl
204
+        self.use_ssl = use_ssl
205 205
         self.folder = folder
206 206
         self.delay = delay
207 207
         self.endpoint = endpoint
@@ -236,7 +236,7 @@ class MailFetcher(object):
236 236
         # TODO - G.M - 2017-11-23 Support for predefined SSLContext ?
237 237
         # without ssl_context param, tracim use default security configuration
238 238
         # which is great in most case.
239
-        if self.ssl:
239
+        if self.use_ssl:
240 240
             self._connection = imaplib.IMAP4_SSL(self.host, self.port)
241 241
         else:
242 242
             self._connection = imaplib.IMAP4(self.host, self.port)