Parcourir la source

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

Guénaël Muller il y a 7 ans
Parent
révision
abcc2e8c42

+ 1 - 1
tracim/development.ini.base Voir le fichier

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

+ 2 - 2
tracim/tracim/config/app_cfg.py Voir le fichier

379
         self.EMAIL_REPLY_TOKEN = tg.config.get(
379
         self.EMAIL_REPLY_TOKEN = tg.config.get(
380
             'email.reply.token',
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
         self.TRACKER_JS_PATH = tg.config.get(
386
         self.TRACKER_JS_PATH = tg.config.get(

+ 1 - 1
tracim/tracim/lib/daemons.py Voir le fichier

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

+ 4 - 4
tracim/tracim/lib/email_fetcher.py Voir le fichier

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