Re: Avoiding duplicate messages
Charles Cazabon <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Norman Walsh <[email protected]> wrote: > > I like the fact that getmail will download all the mail that it hasn’t > seen, even if I’ve “read” it on a mobile device. This is precisely the > behavior that I want. > > But it appears that moving mail between folders causes them to appear > to be unseen. That's correct. > My less-than-entirely-satisfactory workaround is to *not* have getmail > retrieve messages from the folder that I moved the message into. I'm curious why that's not satisfactory. That is exactly what I would expect you to do in this case; retrieve mail only from INBOX or whatever, or only from the archive folder(s) you move messages to, or similar. If you retrieve from both folders, getmail will (if run before you move the message) retrieve it from both places. > This is fine, except now if I move it to that folder *before* it gets > downloaded in the first place, it never gets downloaded, which is, > from my point of view, also bad. > > Assuming my description is clear, is there a better solution? I don't know about "better", but there is a more complex solution. You can use getmail's message-filtering functionality to prevent delivering the same message twice; the filter checks the *content* of the message (probably a hash/signature) and exits with an appropriate return code to tell getmail not to continue with message delivery if it's one that's been seen before. Otherwise, it adds the message to the filter's state file that keeps track of previously-delivered messages. You can also do duplicate suppression with an appropriate MDA, and have getmail use that for delivery. Charles -- ----------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ -----------------------------------------------------------------------