Dear Listmember, I use http://www.courier-mta.org/reformail.html for "Detecting duplicate messages" ### The -D option implements a simple way to delete duplicate messages in incoming mail. filename is a file that will be approximately 'len' bytes long. This file will be used by reformail to save message IDs seen in recent mail. reformail reads the message on standard input. If the message has a Message-ID: header that's already in the cache file, reformail terminates with the exit code set to 0. Otherwise, reformail terminates with the exit code set to 1. ### ### my entry in mailfilter `reformail -D 8192 $HOME/.msg.cache` if ($RETURNCODE == 0) { /^From: *!.*/ FROM1=${MATCH2} /^Subject: *!.*/ log "$FROM (${FROM1}) => Not Delivered duplicate MSG-ID. Subject ${MATCH2}\n" exit } ### Is there a similar feature in sieve or can I still use the upper setup? Another question is about to add this header line in every mail. xfilter "${REFORMAIL} -a\"Lines: $LINES\"" Thanks for your help. BR Aleks
On Fri, 2011-09-16 at 00:02 +0200, Aleksandar Lazic wrote:> "Detecting duplicate messages"..> Is there a similar feature in sieveNo.> or can I still use the upper setup?I think so.> Another question is about to add this header line in every mail. > > xfilter "${REFORMAIL} -a\"Lines: $LINES\""What do you need it for? But nope, I don't think there's a way to do that with Sieve either. There's an extension to add headers, but it's not implemented yet. And I don't think there's a way to get the number of header lines.