Correction : dovecot : fait que POP3 récupère tout l'arborescence IMAP.
authorJulien Moutinho <julm+heureux-cyclage@autogeree.net>
Wed, 2 Oct 2013 01:41:46 +0000 (03:41 +0200)
committerroot <root@ateliers.heureux-cyclage.org>
Wed, 2 Oct 2013 01:42:09 +0000 (03:42 +0200)
etc/dovecot/autoconfig.xml
etc/dovecot/dovecot.conf.m4
etc/dovecot/pop3/INBOX/dovecot-virtual [new file with mode: 0644]
etc/sv/dovecot/local.sh

index e0e9f48..1476982 100644 (file)
@@ -11,9 +11,8 @@
                        <username>%EMAILADDRESS%</username>
                        <authentication>password-cleartext</authentication>
                 </incomingServer>
-               <!--
                <incomingServer type="pop3">
-                       <hostname>pop3.%EMAILDOMAIN%</hostname>
+                       <hostname>pop.%EMAILDOMAIN%</hostname>
                        <port>995</port>
                        <socketType>SSL</socketType>
                        <username>%EMAILADDRESS%</username>
@@ -23,7 +22,6 @@
                                <downloadOnBiff>true</downloadOnBiff>
                         </pop3>
                 </incomingServer>
-                -->
                <outgoingServer type="smtp">
                        <hostname>smtp.%EMAILDOMAIN%</hostname>
                        <port>465</port>
index 418a1e1..425df3f 100644 (file)
@@ -35,27 +35,6 @@ 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 {
-       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
-        }
-       prefix = 
-       separator = +
- }
 namespace {
        #list = children
        list = yes
@@ -65,7 +44,7 @@ namespace {
        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 {
@@ -119,6 +98,28 @@ plugin {
  }
 protocol imap {
        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 {
        auth_socket_path = /var/run/dovecot/auth-userdb
@@ -126,20 +127,52 @@ 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 = yes
        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
diff --git a/etc/dovecot/pop3/INBOX/dovecot-virtual b/etc/dovecot/pop3/INBOX/dovecot-virtual
new file mode 100644 (file)
index 0000000..20271d5
--- /dev/null
@@ -0,0 +1,3 @@
+all
+all+*
+  all
index 4ca3b65..f5d2a05 100644 (file)
@@ -30,6 +30,8 @@ for dir in \
  /etc/dovecot/acl/global.d \
  ~mail/data \
  ~mail/log \
+ /etc/dovecot/pop3 \
+ /etc/dovecot/pop3/INBOX \
  /etc/dovecot/sieve \
  /etc/dovecot/sieve/after.d \
  /etc/dovecot/sieve/before.d \
@@ -70,4 +72,7 @@ sudo install -m 644 -o root -g root /dev/stdin \
 sudo install -m 640 -o root -g postfix \
  "$tool"/etc/dovecot/transport \
         /etc/dovecot/transport
+sudo install -m 644 -o root -g root \
+ "$tool"/etc/dovecot/pop3/INBOX/dovecot-virtual \
+        /etc/dovecot/pop3/INBOX/dovecot-virtual
 sudo postmap hash:/etc/dovecot/transport