Das folgende Python-Skript löst das Problem:
import mailbox inbox_2 = mailbox.mbox('inbox_2_file') inbox_1 = mailbox.mbox('inbox_1_file') inbox_diff = mailbox.mbox('inbox_diff_file', create=True) inbox_2_ids = [] for message in inbox_2: inbox_2_ids.append(message.get('Message-ID')) for message in inbox_1: if message.get('Message-ID') not in inbox_2_ids: inbox_diff.add(message) inbox_diff.flush()