Need help deduplicating messages fetched with getmail into dovecot mailbox

Gabriel Kaufmann mailings at typoworx.com
Thu Jan 10 13:42:09 EET 2019


Hello everyone,

I'm using getmail to fetch some external mails from POP3 into a dovecot
mailbox (providing IMAP). Getmail seems to have some serious problems
keeping track of mails already fetched. I have every Mail exactly twice
in my Mailbox delivered by Dovecot. Of course they are not in the
original external POP3 Inbox.

I hope I'm in right place here. I think the problem is not dovecot
related, but getmail. As there is a huge number of user complains about
getmail (and obviously no alternative?!) I hope to find some help here
for a workaround.

I noticed getmail can be configured for some kind of filtering to sort
out Mails for local delivery to dovecot.
http://pyropus.ca/software/getmail/configuration.html#filter-examples

Does anyone know how to query the message-id (given by mail-headers)
with doveadm?

My first test was this:

> doveadm fetch -u my-mailbox at domain.net "mailbox date.sent" message-id
> "<369408722.286104911.1547114312259.Foo.root at someone.org>"

But then I noticed this is only ment to be used with dovecot internal
GUID - I think... Is it possible to query for the mail message-id also?
Is it posible to reconfigure indexing to include this propery from the
original message-file? I made a small perl-script to extract it using
Perl-Lib Email::Simple.

> To: my-mailbox at domain.net
> *Message-ID: <369408722.286104911.1547114312259.Foo.root at someone.org>*
> Subject: Some test

I also already tried the doveadm deduplicate, but this also doesn't work
as it is also basing on the internal GUID of dovecot and every
duplicate-message seems to have a new, unique GUID.

> doveadm deduplicate -u gabriel.kaufmann at gmx.net mailbox-guid

May be anyone know a better solution.

-- 
Best regards

Gabriel Kaufmann

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190110/51672b8f/attachment.html>


More information about the dovecot mailing list