Home > Computers > mail > courier > 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

  1. Set an ACL of `lrasiw` on the INBOX
  2. Set an ACL of `lrasiw` on the Sent folder
  3. Set an ACL of lra to the Trash folder

I've put that in a script, you might find it useful :

    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 # 

contact : @ychaouche yacinechaouche at yahoocom


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