You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ponymail.apache.org by Humbedooh <gi...@git.apache.org> on 2016/06/01 05:16:41 UTC

[GitHub] incubator-ponymail pull request: add a synch ponymail with imap tool

Github user Humbedooh commented on a diff in the pull request:

    https://github.com/apache/incubator-ponymail/pull/36#discussion_r65303038
  
    --- Diff: tools/archiver.py ---
    @@ -282,23 +290,17 @@ def archive_message(self, mlist, msg):
                                 body = body.encode('utf-8')
                         except:
                             body = None
    -        if body:
    -            attachments, contents = self.msgfiles(msg)
    -            private = False
    -            if hasattr(mlist, 'archive_public') and mlist.archive_public == True:
    -                private = False
    -            elif hasattr(mlist, 'archive_public') and mlist.archive_public == False:
    -                private = True
    -            elif hasattr(mlist, 'archive_policy') and mlist.archive_policy is not ArchivePolicy.public:
    -                private = True
    +
    +        attachments, contents = self.msgfiles(msg)
    +        irt = ""
    +        if body or attachments:
                 pmid = mid
                 try:
    -                mid = "%s@%s@%s" % (hashlib.sha224(body if type(body) is bytes else body.encode('ascii', 'ignore')).hexdigest(), uid_mdate, lid)
    +                mid = "%s@%s" % (hashlib.sha224(msg.as_bytes()).hexdigest(), lid)
    --- End diff --
    
    This should be OPTIONAL, or it will break existing installations. I would suggest you make it a configuration directive that can be enabled (and possibly is enabled by default in new installations, but remains off in the old ones)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---