3 messages in net.sourceforge.lists.courier-maildrop[maildropl] filtering duplicate messages
FromSent OnAttachments
Sergiy ZhukNov 24, 2005 1:29 am 
Ingo ReinhartNov 24, 2005 2:01 am 
Sergiy ZhukNov 30, 2005 2:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] filtering duplicate messagesActions...
From:Sergiy Zhuk (ser@yahoo-inc.com)
Date:Nov 24, 2005 1:29:52 am
List:net.sourceforge.lists.courier-maildrop

hi

I've setup a global duplicate message id filter using reformail like this:

EXT_REF="/usr/local/courier/bin/reformail" DUPE_CACHE_FILE=".msgid.cache"

if ( $RMDUPE eq 'ON' ) { `$EXT_REF -D 8192 $DUPE_CACHE_FILE` if ( $RETURNCODE == 0 ) exit }

It works fine, but if we enable duplicate message id check and local message delivery fails with a temp. error code for any reason, courier will retry the delivery multiple times. Problem is our filter has already seen that message Id and saved it in the cache file, and that means the message will be ignored on the next delivery even if it was never actually delivered.

There're several cases when the local delivery can fail:

- User has a broken .mailfilter, e.g. delivering to a non-existent folder. We can work around that by using exception{} or use 'cc |maildrop' and check the return code, then save in Inbox if the delivery has failed.

- User mailbox is over quota We don't know if it is until we attempt to deliver the message and then it's too late.

- a system error has occured multiple scenarios possible, e.g. nfs mount went bad (network problem), we've hit some system limit, like number of processes is too high for us to fork() or too many open files, or not enough memory or whatever.

Ideally, we would be caching Message-Id only after the successful delivery, but maildrop won't let you take control after the fact. Another workaround would be saving duplicates in a separate folder, but then we need to make sure users checks that folder periodically, since we'll also save messages that couldn't be delivered the first time there.

Am I missing something obvious or should maildrop support the duplicate removal feature natively, i.e. have an option to allow updating message-id cache after the successful delivery and also allow an internal read-only check of that cache file before the delivery ? Maildrop knows if the message was delivered successfully, it also supports quotas, seems like the best place to deal with dupes...

thanks