Differences

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

Link to this comparison view

Both sides previous revision Previous revision
fuss:dovecot [2018/07/29 21:10]
office [Enable NOTIFY]
fuss:dovecot [2020/03/28 19:43] (current)
office [Enable METADATA Capability]
Line 142: Line 142:
 </​code>​ </​code>​
  
 +====== Create Public Broadcast Mailbox for All Users ======
  
 +Sometimes it is useful to have a public mailbox that is accessible by all users where messages can be placed that are of public interest. For instance, company news, mail orders, server settings, or various notifications could be stored inside the mail server itself and conveniently accessed by all users.
 +
 +The following example creates a public mailbox in ''​mbox''​ format at ''/​var/​mail/​public/''​ whilst retaining "​Seen"​ flags for each user under their home directory at ''​~/​.support''​. "​Mailboxes"​ (containing several mails/​messages) can then be placed under ''/​var/​mail/​public''​ and offered to users as read-only. Furthermore,​ the configuration makes sure that each user becomes subscribed to the mailbox whenever the users check their E-Mail.
 +
 +In effect, this "​trick"​ can be used to avoid mailing lists whenever the message to be sent to all users is not urgent enough to appear as a new E-Mail and having a long-standing reference is desirable (similar to documentation).
 +
 +Edit ''​dovecot.conf''​ or ''​10-mail.conf''​ under Debian-based distributions and add a public mailbox:
 +<​code>​
 +# Public mailbox
 +namespace {
 +  type = public
 +  prefix = Support/
 +  location = mbox:/​var/​mail/​public/:​INDEX=~/​.support
 +  subscriptions = yes
 +  list = children
 +
 +  mailbox "​News"​ {
 +      auto = subscribe
 +  }
 +
 +  mailbox "Mail Orders"​ {
 +     auto = subscribe
 +  }
 +}
 +
 +</​code>​
 +where:
 +  * ''​Support/''​ is the name of the top-level folder that will appear in every user mailbox,
 +  * all ''​mailbox''​ sections define mailboxes in mbox format that will appear underneath the ''​Support/''​ top-level folder.
 +
 +Following the example above, for the mailboxes ''​News''​ and ''​Mail Orders''​ two mbox files would have to be created under ''/​var/​mail/​public''​ named ''​News''​ and ''​Mail Orders'':​
 +<code bash>
 +touch /​var/​mail/​public/​{News,"​Mail Orders"​}
 +</​code>​
 +
 +
 +The standard mbox format is a concatenation of raw E-Mail data separated by a single line:
 +<​code>​
 +From address@host Sat Jan 01 12:00:00 2000
 +</​code>​
 +that describes when the mail was stored. All other standard E-Mail header fields (ie: ''​Subject'',​ ''​To'',​ ''​From''​) do not need to be modified such that mails can be added to the mailboxes easily by hand. 
 +
 +For example, the ''/​var/​mail/​public/​News''​ file could be formatted with the following contents:
 +<​code>​
 +From support@localhost Sat Jan 01 12:00:00 2000
 +From: "​admin"​ <​admin@server.tld>​
 +Subject: New Backup Server
 +To: support@server.tld
 +
 +We have a new backup server!
 +
 +Cheers,
 +admin
 +
 +From support@localhost Sat Jan 01 12:00:00 2000
 +From: "​admin"​ <​admin@server.tld>​
 +Subject: The Server is Down!
 +To: support@server.tld
 +
 +The backup server does not work anymore, please do not use it.
 +
 +Cheers,
 +admin
 +</​code>​
 +
 +and will appear as two separate mails under the ''​Support/​News''​ IMAP folder.
 +
 +The ''/​var/​mail/​public''​ folder can be shared via Samba and the files edited conveniently in order to add mails.

fuss/dovecot.txt ยท Last modified: 2020/03/28 19:43 by office

Access website using Tor Access website using i2p


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy and plagiarism pages.