Include IMAP Junk folder to pop3 clients.

Robert Schetterer rs at sys4.de
Mon Jul 18 19:00:51 UTC 2016


Am 18.07.2016 um 19:10 schrieb Lefteris Tsintjelis:
> Hi,
> 
> I would like to include all new mails of Junk box (I have a global sieve
> filtering set) folder to pop3 clients. Is this possible? This is my
> current configuration.
> 
> # 2.2.25 (7be1766): /usr/local/etc/dovecot/dovecot.conf
> # Pigeonhole version 0.4.15 (97b3da0)
> # OS: FreeBSD 9.3-RELEASE-p43 amd64
> auth_default_realm = example.com
> auth_failure_delay = 30 secs
> auth_mechanisms = plain login
> disable_plaintext_auth = no
> info_log_path = /var/log/dovmaillog
> lmtp_rcpt_check_quota = yes
> log_path = /var/log/dovmessages
> login_greeting = NO UBE/UCE - Trespassers will be pursued.
> mail_gid = mail
> mail_home = /home/vmail/%d/%u
> mail_max_userip_connections = 30
> mail_uid = vmail
> mailbox_list_index = yes
> managesieve_notify_capability = mailto
> managesieve_sieve_capability = fileinto reject envelope
> encoded-character vacation subaddress comparator-i;ascii-numeric
> relational regex imap4flags copy include variables body enotify
> environment mailbox date index ihave duplicate mime foreverypart
> extracttext
> namespace inbox {
>   inbox = yes
>   location =
>   mailbox Archive {
>     auto = create
>     special_use = \Archive
>   }
>   mailbox Drafts {
>     auto = create
>     special_use = \Drafts
>   }
>   mailbox Junk {
>     auto = create
>     special_use = \Junk
>   }
>   mailbox Sent {
>     auto = create
>     special_use = \Sent
>   }
>   mailbox Trash {
>     auto = create
>     autoexpunge = 30 days
>     special_use = \Trash
>   }
>   prefix =
> }
> passdb {
>   args = /usr/local/etc/dovecot/local.ext
>   driver = sql
> }
> plugin {
>   antispam_backend = dspam
>   antispam_dspam_args = --deliver=;--source=error;--signature=%%s;--user;%u
>   antispam_dspam_binary = /usr/local/bin/dspam
>   antispam_dspam_result_header = X-DSPAM-Result
>   antispam_signature = X-DSPAM-Signature
>   antispam_signature_missing = move
>   antispam_spam = Junk
>   antispam_trash = Trash
>   quota = maildir
>   sieve = /home/vmail/.sieve/%d/%u/.user.sieve
>   sieve_dir = /home/vmail/.sieve/%d/%u/.sieve
>   sieve_global_dir = /home/vmail/.sieve/global
>   sieve_global_path = /home/vmail/.sieve/global.sieve
>   sieve_max_script_size = 512K
> }
> protocols = imap pop3 lmtp sieve
> sendmail_path = /usr/local/sbin/sendmail
> service auth {
>   unix_listener /var/spool/postfix/private/dovauth {
>     group = wheel
>     mode = 0666
>     user = postfix
>   }
> }
> service imap-login {
>   chroot = login
>   client_limit = 256
>   executable = /usr/local/libexec/dovecot/imap-login
>   inet_listener imap {
>     address = *
>     port = 143
>   }
>   inet_listener imaps {
>     address = *
>     port = 993
>   }
>   process_limit = 128
>   process_min_avail = 2
>   service_count = 1
> }
> service imap {
>   executable = /usr/local/libexec/dovecot/imap
> }
> service lmtp {
>   unix_listener /var/spool/postfix/private/dovlmtp {
>     group = wheel
>     mode = 0666
>     user = postfix
>   }
> }
> service managesieve-login {
>   inet_listener sieve {
>     port = 4190
>   }
> }
> service pop3-login {
>   chroot = login
>   client_limit = 256
>   executable = /usr/local/libexec/dovecot/pop3-login
>   inet_listener pop3 {
>     address = *
>     port = 110
>   }
>   inet_listener pop3s {
>     address = *
>     port = 995
>   }
>   process_limit = 128
>   process_min_avail = 2
>   service_count = 1
> }
> service pop3 {
>   executable = /usr/local/libexec/dovecot/pop3
> }
> ssl_cert = </etc/ssl/certs/server.pem
> ssl_key = </etc/ssl/private/server.pem
> userdb {
>   driver = prefetch
> }
> userdb {
>   args = /usr/local/etc/dovecot/local.ext
>   driver = sql
> }
> protocol lmtp {
>   mail_plugins = quota mail_log notify sieve quota
> }
> protocol lda {
>   auth_socket_path = /var/spool/postfix/private/dovauth
>   mail_plugins = quota mail_log notify sieve quota
> }
> protocol sieve {
>   mail_max_userip_connections = 10
>   managesieve_implementation_string = Dovecot Pigeonhole
>   managesieve_logout_format = bytes=%i/%o
>   managesieve_max_compile_errors = 5
>   managesieve_max_line_length = 65536
> }
> protocol imap {
>   imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
>   imap_max_line_length = 64 k
>   mail_plugins = quota mail_log notify imap_quota antispam
> }
> protocol pop3 {
>   pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
>   pop3_uidl_format = %08Xu%08Xv
> }

you need the virtual plugin see

http://wiki.dovecot.org/Plugins/Virtual

https://sys4.de/de/blog/2013/02/11/dovecot-virtual-setup-mit-globaler-sieve-spamfilter-regel-fur-pop3-nutzer/





Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG, 80333 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


More information about the dovecot mailing list