On 11.2.2010, at 19.39, Veikko Wexi Skurnik wrote:
I've been trying to figure this out and no luck... I still think that one possibility could be a Sieve script that would discard messages based on a message-ID cache like the procmail recipe does. Does dovecot's deliver have some sort of message-ID cache that could be used to removed the duplicates? Or if anyone has any ideas how to do this, I'm open to suggestions =)
There is kind of a duplicate cache, but it's only used for outgoing messages. If you wanted to remove duplicates based on message-id and without code changes, the only way would be to do it before deliver is called.
But you also mentioned that the duplicates happen because of Postfix's address expansion. Maybe you could solve it on Postfix side?