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 -- Michael Niehren __ _ powered by / / (_)__ __ ____ __ / /__/ / _ \/ // /\ \/ / /____/_/_//_/\_,_/ /_/\_\
Eduardo M KALINOWSKI
2010-May-20 14:29 UTC
[Dovecot] POP3 Problem with SPAM-Mail's over sieve
On Qui, 20 Mai 2010, 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 ?POP3 has no concept of folders, so only mails in INBOX are accessible. In the wiki there's a "Virtual INBOX por POP with all folders" solution, but the net effect is displaying all e-mails from all folders in the INBOX, so you might save a few processor cycles and simply not filter mails in folders in the first place. -- Some assembly required. Eduardo M KALINOWSKI eduardo at kalinowski.com.br
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.monteiro at 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 apoio at fct.unl.pt fct.unl.pt:~# _