On 05/20/2010 03:25 PM, Michael Niehren wrote:
Hi together,

i am currently using dovecot 1.2.10 with the sieve-plugin and use a
sieve-filter to sort the SPAM-Mail's directly into a Junk-Folder:

require "fileinto";
# rule:[junkfilter]
if header :contains "X-Spam-Flag" "YES" {
   fileinto "Junk";
}


My problem is now, if i try to retrieve the Mails via POP3, i did not get the
SPAM-Mail's in the Junk-Folder, only the normal ones, that are not filtered
over the sieve plugin.

Could anyone tell me how to solve that issue ?

best regards
   Michael



Hello Michael,

I don't know if there are any other new ways of doing this, but a while ago i had that same need. I solved it by creating a wrapper and using

NOTE: This is for maildir only

mail_executable = /usr/local/bin/pop-wrapper.sh

That wrapper basically copies all the messages from the Spam maildir into the Inbox maildir, executing /usr/lib/dovecot/pop3 afterwards.

a simplistic approach would be something like

#!/bin/sh
for i in `/usr/bin/find Maildir/.Spam -type f -iregex ".*/new/.*" -o -iregex ".*/cur/.*"` ; do mv $i Maildir/new/ ; done
exec /usr/lib/dovecot/pop3


Regards,

Hugo Monteiro.

--
fct.unl.pt:~# cat .signature

Hugo Monteiro
Email    : hugo.monte...@fct.unl.pt
Telefone : +351 212948300 Ext.15307
Web      : http://hmonteiro.net

Divisão de Informática
Faculdade de Ciências e Tecnologia da
                   Universidade Nova de Lisboa
Quinta da Torre   2829-516 Caparica   Portugal
Telefone: +351 212948596   Fax: +351 212948548
www.fct.unl.pt                ap...@fct.unl.pt

fct.unl.pt:~# _

Reply via email to