From: martin f. krafft Date: Wed, 29 Aug 2007 14:15:27 +0000 (+0200) Subject: replace existing x-tickle-delivered header X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/39c4720c11712d9bf5bb99bc91eb73539b9067c1?hp=84b9aa9ec86b40cfaabb816bccf1511a06e95661 replace existing x-tickle-delivered header --- diff --git a/bin/process-tickler b/bin/process-tickler index 0c3839f..d7af9b6 100755 --- a/bin/process-tickler +++ b/bin/process-tickler @@ -24,7 +24,10 @@ msgids = dict() def move_to_inbox(key): msg = tmd.get_message(key) print >>sys.stdout, 'I: move message %s to inbox' % key - msg.add_header('X-Tickle-Delivered', time.strftime('%c')) + if msg.has_key('X-Tickle-Delivered'): + msg.replace_header('X-Tickle-Delivered', time.strftime('%c')) + else: + msg.add_header('X-Tickle-Delivered', time.strftime('%c')) imd.add(msg) tmd.discard(key)