Correction : etc/dovecot/dovecot.conf.m4
[lhc/ateliers.git] / etc / dovecot / dovecot.conf.m4
index 0ecacf5..c4e58b3 100644 (file)
@@ -2,8 +2,8 @@ auth_mechanisms = plain
 auth_ssl_require_client_cert = no
        # NOTE: ne marche pas avec l'auth SASL depuis postfix qui ne fournit pas de certificat utilisateurice
 auth_ssl_username_from_cert = yes
-auth_verbose = yes
-auth_debug = yes
+auth_verbose = no
+auth_debug = no
 disable_plaintext_auth = yes
 first_valid_uid = 1000
 lda_mailbox_autocreate = no
@@ -15,47 +15,94 @@ local_name imap.LOCAL_DOMAINNAME {
        ssl_cert = </etc/dovecot/LOCAL_DOMAINNAME/imap/x509/crt+crl.self-signed.pem
        ssl_key  = </etc/dovecot/LOCAL_DOMAINNAME/imap/x509/key.pem
  }
+local_name imap.chatperche.org {
+       ssl_ca   = </etc/dovecot/chatperche.org/imap/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/chatperche.org/imap/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/chatperche.org/imap/x509/key.pem
+ }
 local_name imap.cyclocoop.org {
        ssl_ca   = </etc/dovecot/cyclocoop.org/imap/x509/crt+crl.self-signed.pem
        ssl_cert = </etc/dovecot/cyclocoop.org/imap/x509/crt+crl.self-signed.pem
        ssl_key  = </etc/dovecot/cyclocoop.org/imap/x509/key.pem
  }
-mail_debug = yes
+local_name imap.lesjantesdunord.org {
+       ssl_ca   = </etc/dovecot/lesjantesdunord.org/imap/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/lesjantesdunord.org/imap/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/lesjantesdunord.org/imap/x509/key.pem
+ }
+local_name imap.ptitvelo.net {
+       ssl_ca   = </etc/dovecot/ptitvelo.net/imap/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/ptitvelo.net/imap/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/ptitvelo.net/imap/x509/key.pem
+ }
+local_name imap.veli-velo.org {
+       ssl_ca   = </etc/dovecot/veli-velo.org/imap/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/veli-velo.org/imap/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/veli-velo.org/imap/x509/key.pem
+ }
+local_name imap.wiklou.org {
+       ssl_ca   = </etc/dovecot/wiklou.org/imap/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/wiklou.org/imap/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/wiklou.org/imap/x509/key.pem
+ }
+local_name pop.LOCAL_DOMAINNAME {
+       ssl_ca   = </etc/dovecot/LOCAL_DOMAINNAME/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/LOCAL_DOMAINNAME/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/LOCAL_DOMAINNAME/pop/x509/key.pem
+ }
+local_name pop.chatperche.org {
+       ssl_ca   = </etc/dovecot/chatperche.org/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/chatperche.org/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/chatperche.org/pop/x509/key.pem
+ }
+local_name pop.cyclocoop.org {
+       ssl_ca   = </etc/dovecot/cyclocoop.org/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/cyclocoop.org/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/cyclocoop.org/pop/x509/key.pem
+ }
+local_name pop.lesjantesdunord.org {
+       ssl_ca   = </etc/dovecot/lesjantesdunord.org/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/lesjantesdunord.org/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/lesjantesdunord.org/pop/x509/key.pem
+ }
+local_name pop.ptitvelo.net {
+       ssl_ca   = </etc/dovecot/ptitvelo.net/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/ptitvelo.net/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/ptitvelo.net/pop/x509/key.pem
+ }
+local_name pop.veli-velo.org {
+       ssl_ca   = </etc/dovecot/veli-velo.org/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/veli-velo.org/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/veli-velo.org/pop/x509/key.pem
+ }
+local_name pop.wiklou.org {
+       ssl_ca   = </etc/dovecot/wiklou.org/pop/x509/crt+crl.self-signed.pem
+       ssl_cert = </etc/dovecot/wiklou.org/pop/x509/crt+crl.self-signed.pem
+       ssl_key  = </etc/dovecot/wiklou.org/pop/x509/key.pem
+ }
+mail_debug = no
 mail_home = /home/mail/data/%d/%n
 mail_location = maildir:/home/mail/data/%d/%n/Maildir:INDEX=/var/lib/dovecot-index/%d/%n:CONTROL=/var/lib/dovecot-control/%d/%n
        # NOTE: INDEX et CONTROL sont sur une partition sans quota comme le demande la doc
        # VOIR: http://wiki2.dovecot.org/Quota/FS
 namespace inbox {
+ # NOTE: ici car protocol sieve {namespace inbox{}} n'a pas l'air de fonctionner
        inbox = yes
        location = 
-       mailbox Drafts {
-               special_use = \Drafts
-        }
-       mailbox Junk {
-               special_use = \Junk
-        }
-       mailbox Sent {
-               special_use = \Sent
-        }
-       mailbox "Sent Messages" {
-               special_use = \Sent
-        }
-       mailbox Trash {
-               special_use = \Trash
-        }
+       list = yes
        prefix = 
-       separator = .
+       separator = +
  }
 namespace {
        #list = children
        list = yes
        location = maildir:/home/mail/data/%%d/%%n/Maildir:INDEX=/var/lib/dovecot-index/%d/%n/Shared/%%n:CONTROL=/var/lib/dovecot-control/%d/%n/Shared/%%n
-       prefix = Shared.%%n.
-       separator = .
+       prefix = Partages+%%n+
+       separator = +
        subscriptions = yes
        type = shared
  }
-mail_plugins = $mail_plugins acl quota
+mail_plugins = $mail_plugins acl quota virtual
 #mail_privileged_group = mail
 #mail_access_groups = mail
 passdb {
@@ -64,31 +111,72 @@ passdb {
  }
 plugin {
        acl = vfile:/etc/dovecot/acl/global.d
+       acl_anyone = allow
        acl_shared_dict = file:/home/mail/acl/%d/shared.db
-       quota = fs:user
+       #antispam_allow_append_to_spam = yes
+        # NOTE: pour offlineimap
+       antispam_backend = pipe
+       #antispam_crm_args = -u;/home/mail/data/%d/.crm114;/usr/share/crm114/mailfilter.crm
+       antispam_crm_args = -u;/home/mail/crm114;/usr/share/crm114/mailfilter.crm
+       antispam_crm_binary = /usr/bin/crm
+       antispam_debug_target = syslog
+       #antispam_crm_env = HOME=%h;USER=%u
+       antispam_ham_keywords = NonJunk
+       antispam_pipe_program = /usr/bin/crm
+       antispam_pipe_program_args = -u;/home/mail/crm114;/usr/share/crm114/mailfilter.crm;--stats_only;--force
+       antispam_pipe_program_notspam_arg = --learnnonspam
+       antispam_pipe_program_spam_arg = --learnspam
+       antispam_pipe_program_unlearn_spam_args = --unlearn;--learnspam
+       antispam_pipe_program_unlearn_notspam_args = --unlearn;--learnnonspam
+       antispam_pipe_tmpdir = /home/mail/crm114/tmp
+       antispam_signature = X-CRM114-CacheID
+       antispam_signature_missing = move
+       antispam_spam = Junk
+       antispam_spam_keywords = Junk
+       antispam_trash = Trash
+       antispam_unsure = Unsure
+       antispam_verbose_debug = 0
+       quota = maildir:User quota
+       quota_rule = *:storage=256M
+       quota_rule2 = Trash:storage=+64M
        recipient_delimiter = +
        sieve            = /home/mail/data/%d/%n/sieve
        sieve_after      = /etc/dovecot/sieve/after.d/
        sieve_before     = /etc/dovecot/sieve/before.d/
        sieve_dir        = /home/mail/data/%d/%n/sieve.d/
+       #sieve_extensions = +spamtest +spamtestplus
        sieve_global_dir = /etc/dovecot/sieve/global.d/
        sieve_max_script_size = 1M
        sieve_quota_max_scripts = 0
        sieve_quota_max_storage = 10M
+       sieve_spamtest_max_value = 10
+       sieve_spamtest_status_header = X-Spam-Score
+       sieve_spamtest_status_type = strlen
        sieve_user_log   = /home/mail/log/%d/sieve.%n.log
  }
 protocol imap {
-       mail_plugins = $mail_plugins imap_acl imap_quota
- }
-service imap-login {
-       inet_listener imap {
-               address = 127.0.0.1
-               port    = 143
-               ssl     = no
-        }
-       inet_listener imaps {
-               port = 993
-               ssl  = yes
+       mail_plugins = $mail_plugins antispam imap_acl imap_quota
+       namespace inbox {
+               inbox = yes
+               location = 
+               list = yes
+               mailbox Drafts {
+                       special_use = \Drafts
+                }
+               mailbox Junk {
+                       special_use = \Junk
+                }
+               mailbox Sent {
+                       special_use = \Sent
+                }
+               mailbox "Sent Messages" {
+                       special_use = \Sent
+                }
+               mailbox Trash {
+                       special_use = \Trash
+                }
+               prefix = 
+               separator = +
         }
  }
 protocol lda {
@@ -97,18 +185,55 @@ protocol lda {
        info_log_path =
        log_path =
        mail_plugins = $mail_plugins sieve
+       namespace inbox {
+               inbox = yes
+               location = 
+               list = yes
+               prefix = 
+               separator = +
+        }
        postmaster_address = postmaster+dovecot+lda@LOCAL_DOMAINNAME
        syslog_facility = mail
  }
 protocol lmtp {
-       postmaster_address = postmaster+dovecot+lmtp@LOCAL_DOMAINNAME
-       mail_plugins = $mail_plugins sieve
        #info_log_path = /tmp/dovecot-lmtp.log
+       mail_plugins = $mail_plugins sieve
+       namespace inbox {
+               inbox = yes
+               location = 
+               list = yes
+               prefix = 
+               separator = +
+        }
+       postmaster_address = postmaster+dovecot+lmtp@LOCAL_DOMAINNAME
  }
 protocol pop3 {
+       namespace all {
+        # NOTE: utilisĂ© par /etc/dovecot/pop3/INBOX/dovecot-virtual
+               hidden = yes
+               list = no
+               location = 
+               prefix = all+
+               separator = +
+        }
+       namespace inbox {
+        # NOTE: virtual namespace for the virtual INBOX. Use a global directory for dovecot-virtual files.
+               inbox = yes
+               hidden = yes
+               list = no
+               location = virtual:/etc/dovecot/pop3:INDEX=/var/lib/dovecot-index/%d/%n/POP3:LAYOUT=fs
+               prefix = pop3+
+               separator = +
+        }
+       pop3_client_workarounds =
+       pop3_fast_size_lookups = yes
+       pop3_lock_session = no
+       pop3_no_flag_updates = yes
+       pop3_uidl_format = %g
+        # NOTE: use GUIDs to avoid accidental POP3 UIDL changes instead of IMAP UIDs.
  }
 protocol sieve {
-       mail_debug = yes
+       mail_debug = no
        #mail_max_userip_connections = 10
        #managesieve_implementation_string = Dovecot Pigeonhole
        managesieve_max_compile_errors = 5
@@ -146,9 +271,26 @@ service imap {
                # You may need to increase this limit if you have huge mailboxes.
        process_limit = 1024
  }
+service imap-login {
+       inet_listener imap {
+               address = 127.0.0.1
+               port    = 143
+               ssl     = no
+        }
+       inet_listener imaps {
+               port = 993
+               ssl  = yes
+        }
+ }
 service pop3 {
        process_limit = 1024
  }
+service pop3-login {
+       inet_listener pop3s {
+               port = 995
+               ssl  = yes
+        }
+ }
 ssl = required
 ssl_ca   = </etc/dovecot/LOCAL_DOMAINNAME/imap/x509/crt+crl.self-signed.pem
 ssl_cert = </etc/dovecot/LOCAL_DOMAINNAME/imap/x509/crt+crl.self-signed.pem