Dovecot

From coopzone
Revision as of 15:22, 25 November 2020 by Cooperd (talk | contribs)
Jump to navigation Jump to search

1. Create a maildir called newsletters

2. Entered this to define the namespace in dovecot.conf

namespace public {
  separator = /
  prefix = newsletters/
  list = yes
  subscriptions = yes
  location = maildir:/home/public/newsletters
}

3. quota3 = maildir:Public quota:ns=newsletters/

4. quota3_rule = *:storage=100M

sample virus/spam text


X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

Public folders method 2

 

  • Login to GCSX

  Check if the user already has permissions to the folder:   This example looking at folder "folder1" for user derek.cooper  

doveadm acl debug -u derek.cooper@the.domain.com Folders.Public.folder1

 

doveadm(derek.cooper@the.domain.com): Info: Per-user private flags in mailbox: \Seen
doveadm(derek.cooper@the.domain.com): Info: User derek.cooper@the.domain.com has rights: post
doveadm(derek.cooper@the.domain.com): Error: User derek.cooper@the.domain.com is missing 'lookup' right
doveadm(derek.cooper@the.domain.com): Info: Mailbox Folders.Public.folder1 is NOT visible in LIST

  The last line shows the folder cannot be LISTED by the user.  

  • add the user to the public folder access control list

  Again adding the user derek.cooper to the "folder1" folder  

vi /mail/public/.Public.folder1/dovecot-acl

  And add the users full login account:  

owner lrwstipekxa
anyone p
user=michael.powell@the.domain.com lrwste
user=chris.martin@the.domain.com lrwste
user=james.stocks@the.domain.com lrwste
user=michael.powell@the.domain.com lrwste
user=paul.clewer@the.domain.com lrwste
user=paul.davies@the.domain.com lrwste
user=derek.cooper@the.domain.com lrwste

 

  • Remove the old list index file to force the new permissions to be active

 

rm -f /mail/public/dovecot-acl-list

 

  • Check the users permissions for the folder again.

 

doveadm acl debug -u derek.cooper@the.domain.com Folders.Public.folder1

 

doveadm(derek.cooper@the.domain.com): Info: Per-user private flags in mailbox: \Seen
doveadm(derek.cooper@the.domain.com): Info: User derek.cooper@the.domain.com has rights: lookup read write write-seen write-deleted expunge
doveadm(derek.cooper@the.domain.com): Info: Mailbox found from dovecot-acl-list
doveadm(derek.cooper@the.domain.com): Info: Mailbox is in public namespace
doveadm(derek.cooper@the.domain.com): Info: Mailbox Folders.Public.folder1 is visible in LIST

  This time not the last line says the folder is visible.  

  • Now add the folder to the users subscriptions file:

 

vi /mail/the.domain.com/derek.cooper/Maildir/subscriptions

  Then add the Folders. and Folders.Public.folder1 lines (note the case)  

Sent
Trash
Drafts
Folders.
Folders.Public.folder1
Folders.Public.folder2
test2
Sent Messages
Queue

 

  • Get the user to login out, wait a few mins, then log back in. They should now see the folder in the mailbox list.