Differences

This shows you the differences between two versions of the page.

Link to this comparison view

courierreadonly [2016/06/29 17:25] (current)
yassine chaouche created
Line 1: Line 1:
 +\\
 +[[index|Home]] > [[Computers|Computers]] > [[mail]] > [[courier|courier]] > [[courierreadonly|courierreadonly]] | [[About]]
  
 +It's not trivial to figure out the right ACL to put, and not trivial to figure out on what folders you need ACLs to be changed. Not putting the right ACLs will show weired behaviour on some mail clients like roundcube, for exampe you might delete a message, the message seems to have disappeared,​ but if you browse to another folder (say, Sent) and get back to the Inbox the message reappears. So the inbox is still in read-only but we don't want this disappearing/​reappearing confusion.
 +
 +=== I eventually figured that the right thing to do is ===
 +
 +  - Set an ACL of `lrasiw` on the INBOX 
 +  - Set an ACL of `lrasiw` on the Sent folder
 +  - Set an ACL of lra to the Trash folder
 +
 +I've put that in a script, you might find it useful : 
 +
 +<​code>​
 +    root@messagerie[CHROOT][10.10.10.19] ~/​SCRIPTS/​MAIL # cat readonly.single
 +    if [ "​$#"​ -ne 1 ]
 +    then
 +        echo "usage : $0 boite@domain.com"​
 +        exit 1
 +    fi
 +    ​
 +    email="​$1"​
 +    inbox="​${1%@*}"​
 +    dst="/​var/​vmail/​domain/​$inbox"​
 +    ​
 +    set -x
 +    maildiracl -set "​$dst"​ "​INBOX"​ owner lrasiw
 +    maildiracl -set "​$dst"​ "​INBOX.Sent"​ owner lrasiw
 +    maildiracl -set "​$dst"​ "​INBOX.Trash"​ owner lra
 +    root@messagerie[CHROOT][10.10.10.19] ~/​SCRIPTS/​MAIL # cat fullaccess.single
 +    if [ "​$#"​ -ne 1 ]
 +    then
 +        echo "usage : $0 boite@domain.com"​
 +        exit 1
 +    fi
 +    ​
 +    email="​$1"​
 +    inbox="​${1%@*}"​
 +    dst="/​var/​vmail/​domain/​$inbox"​
 +    ​
 +    set -x
 +    maildiracl -set "​$dst"​ "​INBOX"​ owner aceilrstwx
 +    maildiracl -set "​$dst"​ "​INBOX.Sent"​ owner aceilrstwx
 +    maildiracl -set "​$dst"​ "​INBOX.Trash"​ owner aceilrstwx
 +    root@messagerie[CHROOT][10.10.10.19] ~/​SCRIPTS/​MAIL # 
 +</​code>​
 +
 +----
 +
 +contact : [[http://​twitter.com/​ychaouche|@ychaouche]] yacinechaouche at yahoocom

QR Code
QR Code I eventually figured that the right thing to do is (generated for current page)