View Single Post
  #1  
Old 30th November 2011, 11:23
eko_taas eko_taas is offline
Member
 
Join Date: Feb 2011
Posts: 92
Thanks: 2
Thanked 12 Times in 10 Posts
Default How to detele dublicate (received) emails from postfix

Due some server-error, my postfix fetched many times (from same source) and now I would like to delete identical emails (e.g same time and body). For some reason IDs seems to be different (this email has been fetcged 26 times), below header from 1st and last:

Quote:
Return-Path: <getmail@server1.example.com>
Delivered-To: user1@example.com
Received: from localhost (localhost.localdomain [127.0.0.1])
by server1.example.com (Postfix) with ESMTP id 5AE324CC5AC
for <user1@example.com>; Fri, 18 Nov 2011 08:56:23 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at server1.example.com
Received: from server1.example.com ([127.0.0.1])
by localhost (server1.example.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id tTYZkRaRG1pF for <user1@example.com>;
Fri, 18 Nov 2011 08:56:05 +0000 (GMT)
Received: by server1.example.com (Postfix, from userid 5001)
id 4F8F04C547A; Sat, 12 Nov 2011 08:16:24 +0000 (GMT)
Delivered-To: unknown
Received: from mail.ISPexample.tld (193.229.0.46) by server1.example.com with
IMAP4-SSL; 12 Nov 2011 08:16:24 -0000
Received: via tmail-2006i.2007-sau for userabc.350; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from emh02.mail.ISPxyz.tld (emh02.mail.ISPxyz.tld [123.456.5.108])
by be55.mail.ISPxyz.tld (Postfix) with ESMTP id C734C2E0D2
for <userabc@be55.mail.ISPxyz.tld>; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from response.sourceforge.com (response.sourceforge.com [74.116.233.70])
by emh02.mail.ISPxyz.tld (Postfix) with ESMTP id 5789F2BD45
for <name1.name2@ISPnamenet.tld>; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from mail5.elabs10.com (10.10.10.55) by response.sourceforge.com (PowerMTA(TM) v3.5r15) id h4q7vc0vd5c0 for <name1.name2@ISPnamenet.tld>; Wed, 20 Jul 2011 01:16:53 -0700 (envelope-from <newsletter@response.sourceforge.com>)
To: <name1.name2@ISPnamenet.tld>
Subject: =?utf-8?Q?10=20Tips=20for=20Better=20Web=20Security,=20a nd=20more!?=
Date: Wed, 20 Jul 2011 01:16:47 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=resources.sourceforge.com; s=s2010001400a; h=Reply-To:From; bh=GIx7hL3KMBzl1APSoi0ypf+chsk=; b=NVHki4frNys+a1JYZTWcnSrj7rHi/HUE/GyomZc1G47GQmnApqwbsYCZZlfJ/owaCWAbouRqRmIqOnXJ2DcxdA==
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2010001400a; d=resources.sourceforge.com; b=Roi2JOoglA4l2N/rOSxhxEqbEZfXDaf7+a/EwfOypSTmx64gadcGzReXXzGb1Kf+kPv8cobIJpjwzwM2LyjLu g==; h=Reply-To:From
X-EmailAdvisor: 995842
X-Delivery: Custom 2010001400
Reply-To: sourceforge@resources.sourceforge.com
List-Unsubscribe: <mailto:unsubscribe-6640@elabs10.com?subject=name1.name2@ISPnamenet.tl d>
Content-description: ee00d316c2name1.name2@ISPnamenet.tld...f8!rynof10.pbz!
X-Complaints-To: abuse@elabs10.com
Message-Id: <20110720081728.EE00D316C266@elabs10.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_c1c7d966a30506ff37acc82fb2f01676"
From: "=?utf-8?Q?SourceForge=20Resource=20Newsletter?=" <sourceforge@resources.sourceforge.com>

- - - -

Return-Path: <getmail@server1.example.com>
Delivered-To: user1@example.com
Received: from localhost (localhost.localdomain [127.0.0.1])
by server1.example.com (Postfix) with ESMTP id A48174C005B
for <user1@example.com>; Wed, 20 Jul 2011 08:25:20 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at server1.example.com
Received: from server1.example.com ([127.0.0.1])
by localhost (server1.example.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id RCWLDFown5Ye for <user1@example.com>;
Wed, 20 Jul 2011 08:25:02 +0000 (GMT)
Received: by server1.example.com (Postfix, from userid 5001)
id EBBB14C005E; Wed, 20 Jul 2011 08:25:01 +0000 (GMT)
Delivered-To: unknown
Received: from mail.ISPexample.tld (193.229.0.46) by server1.example.com with
IMAP4-SSL; 20 Jul 2011 08:25:01 -0000
Received: via tmail-2006i.2007-sau for userabc.350; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from emh02.mail.ISPxyz.tld (emh02.mail.ISPxyz.tld [123.456.5.108])
by be55.mail.ISPxyz.tld (Postfix) with ESMTP id C734C2E0D2
for <userabc@be55.mail.ISPxyz.tld>; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from response.sourceforge.com (response.sourceforge.com [74.116.233.70])
by emh02.mail.ISPxyz.tld (Postfix) with ESMTP id 5789F2BD45
for <name1.name2@ISPnamenet.tld>; Wed, 20 Jul 2011 11:21:04 +0300 (EEST)
Received: from mail5.elabs10.com (10.10.10.55) by response.sourceforge.com (PowerMTA(TM) v3.5r15) id h4q7vc0vd5c0 for <name1.name2@ISPnamenet.tld>; Wed, 20 Jul 2011 01:16:53 -0700 (envelope-from <newsletter@response.sourceforge.com>)
To: <name1.name2@ISPnamenet.tld>
Subject: =?utf-8?Q?10=20Tips=20for=20Better=20Web=20Security,=20a nd=20more!?=
Date: Wed, 20 Jul 2011 01:16:47 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=resources.sourceforge.com; s=s2010001400a; h=Reply-To:From; bh=GIx7hL3KMBzl1APSoi0ypf+chsk=; b=NVHki4frNys+a1JYZTWcnSrj7rHi/HUE/GyomZc1G47GQmnApqwbsYCZZlfJ/owaCWAbouRqRmIqOnXJ2DcxdA==
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2010001400a; d=resources.sourceforge.com; b=Roi2JOoglA4l2N/rOSxhxEqbEZfXDaf7+a/EwfOypSTmx64gadcGzReXXzGb1Kf+kPv8cobIJpjwzwM2LyjLu g==; h=Reply-To:From
X-EmailAdvisor: 995842
X-Delivery: Custom 2010001400
Reply-To: sourceforge@resources.sourceforge.com
List-Unsubscribe: <mailto:unsubscribe-6640@elabs10.com?subject=name1.name2@ISPnamenet.tl d>
Content-description: ee00d316c2name1.name2@ISPnamenet.tld...f8!rynof10.pbz!
X-Complaints-To: abuse@elabs10.com
Message-Id: <20110720081728.EE00D316C266@elabs10.com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="=_c1c7d966a30506ff37acc82fb2f01676"
From: "=?utf-8?Q?SourceForge=20Resource=20Newsletter?=" <sourceforge@resources.sourceforge.com>
tried to google (again for a hint, but found posts only abour dublicate sendings.

Anyone with nice shell-command to help newbee to clean up this, pls
Reply With Quote
Sponsored Links