Re: [Dovecot] Dovecot and duplicates
On 10.2.2010 1:54, Gabriel Millerd wrote:
On Wed, Feb 10, 2010 at 5:14 AM, Veikko "Wexi" Skurnik
mailto:wexi@wexin.net> wrote: I'm having a problem setting up duplicate filtering on my mail server. I've set up the mail server with Postfix and Dovecot with virtual LDAP users, ClamAV virus scanning. The problem is that some of the virtual users use multiple e-mail addresses and postfix delivers emails sent to a user as many times as the user has email address entries in LDAP. I was wondering what would be the smartest way to get rid of these duplicates, they have identical message ID:s and a simple procmail recipe does the trick, however as I'm using dovecots deliver, procmail isn't the answer. Is it possible to use Sieve to do this, I've been googling around *a lot* and haven't found anything that would solve the problem...
i would assume that there is a postfix mechanism for consolidating these once it has normalized / expanded the rcpts for the message.
-- Gabriel Millerd
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 =)
Wexi
--
- Veikko "Wexi" Skurnik: +358(44)5288338 *
- wexi@wexin.net Wexi@IRCNet *
- Näyttämönkatu 4 B 12 33720 Tampere *
- "Kosminen balanssi ei saa järkkyä" *
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?
On 11.2.2010 7:45, Timo Sirainen wrote:
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?
That's one approach I've been thinking of, just haven't had luck getting it to work. Is it possible to use procmail as a before-queue filter only (eliminate the duplicates) and then let postfix hand the messages over to dovecot for delivery? It might be that I've been doing something wrong in Postfix's master.cf when trying this idea...
Wexi
--
- Veikko "Wexi" Skurnik: +358(44)5288338 *
- wexi@wexin.net Wexi@IRCNet *
- Näyttämönkatu 4 B 12 33720 Tampere *
- "Kosminen balanssi ei saa järkkyä" *
participants (2)
-
Timo Sirainen
-
Veikko "Wexi" Skurnik