Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8BBFF200C8A for ; Sun, 4 Jun 2017 16:02:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8A544160BE3; Sun, 4 Jun 2017 14:02:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D6AFC160BB7 for ; Sun, 4 Jun 2017 16:02:05 +0200 (CEST) Received: (qmail 57134 invoked by uid 500); 4 Jun 2017 14:02:05 -0000 Mailing-List: contact commits-help@ponymail.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ponymail.incubator.apache.org Delivered-To: mailing list commits@ponymail.incubator.apache.org Received: (qmail 57125 invoked by uid 99); 4 Jun 2017 14:02:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2017 14:02:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 97459CD9B3 for ; Sun, 4 Jun 2017 14:02:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mqs1eXf13fen for ; Sun, 4 Jun 2017 14:02:04 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id EDF9A5F27B for ; Sun, 4 Jun 2017 14:02:02 +0000 (UTC) Received: (qmail 57114 invoked by uid 99); 4 Jun 2017 14:02:02 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2017 14:02:02 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 074C8DFFB3; Sun, 4 Jun 2017 14:02:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: humbedooh@apache.org To: commits@ponymail.incubator.apache.org Date: Sun, 04 Jun 2017 14:02:01 -0000 Message-Id: <6519d76adaff4d1288ec66aa1dfe0db5@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] incubator-ponymail git commit: be more comprehensive in generating IDs archived-at: Sun, 04 Jun 2017 14:02:06 -0000 Repository: incubator-ponymail Updated Branches: refs/heads/master 767d8f8c1 -> c58b23127 be more comprehensive in generating IDs Include whatever metadata we can in generating IDs to lessen the risk of theoretical ID collisions. Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/8b7ede85 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/8b7ede85 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/8b7ede85 Branch: refs/heads/master Commit: 8b7ede85f03bd738d42e8e87f2302e4c8ddb0ad3 Parents: 767d8f8 Author: Daniel Gruno Authored: Sun Jun 4 15:21:23 2017 +0200 Committer: Daniel Gruno Committed: Sun Jun 4 15:21:23 2017 +0200 ---------------------------------------------------------------------- CHANGELOG.md | 1 + tools/archiver.py | 3 +++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/8b7ede85/CHANGELOG.md ---------------------------------------------------------------------- diff --git a/CHANGELOG.md b/CHANGELOG.md index 275b0df..be595de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## CHANGES in 0.10: +- more comprehensive ID generation mechanisms - private messages are now included in downloads if the user has access to them (#169, #108) - mbox export now generates valid From_ line (#190) - mbox export now escapes 'From ' lines in body text (#188) http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/8b7ede85/tools/archiver.py ---------------------------------------------------------------------- diff --git a/tools/archiver.py b/tools/archiver.py index 141a431..41933f7 100755 --- a/tools/archiver.py +++ b/tools/archiver.py @@ -324,6 +324,9 @@ class Archiver(object): xbody += bytes(lid, encoding='ascii') xbody += bytes(mdatestring, encoding='ascii') mid = "%s@%s" % (hashlib.sha224(xbody).hexdigest(), lid) + if attachments: + for a in attachments: + xbody += bytes(a['hash'], encoding = 'ascii') else: # Or revert to the old way? mid = "%s@%s@%s" % (hashlib.sha224(body if type(body) is bytes else body.encode('ascii', 'ignore')).hexdigest(), uid_mdate, lid)