| 1 |
'\" t |
| 2 |
.\"<!-- Copyright 1998 - 2018 Double Precision, Inc. See COPYING for --> |
| 3 |
.\"<!-- distribution information. --> |
| 4 |
.\" Title: maildirmake |
| 5 |
.\" Author: Sam Varshavchik |
| 6 |
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| 7 |
.\" Date: 04/08/2022 |
| 8 |
.\" Manual: Double Precision, Inc. |
| 9 |
.\" Source: Courier Mail Server |
| 10 |
.\" Language: English |
| 11 |
.\" |
| 12 |
.TH "MAILDIRMAKE" "1" "04/08/2022" "Courier Mail Server" "Double Precision, Inc\&." |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" * Define some portability stuff |
| 15 |
.\" ----------------------------------------------------------------- |
| 16 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 17 |
.\" http://bugs.debian.org/507673 |
| 18 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 19 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 |
.ie \n(.g .ds Aq \(aq |
| 21 |
.el .ds Aq ' |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" * set default formatting |
| 24 |
.\" ----------------------------------------------------------------- |
| 25 |
.\" disable hyphenation |
| 26 |
.nh |
| 27 |
.\" disable justification (adjust text to left margin only) |
| 28 |
.ad l |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.\" * MAIN CONTENT STARTS HERE * |
| 31 |
.\" ----------------------------------------------------------------- |
| 32 |
.SH "NAME" |
| 33 |
maildirmake \- create maildirs and maildir folders |
| 34 |
.SH "SYNOPSIS" |
| 35 |
.HP \w'\fBmaildirmake\fR\ 'u |
| 36 |
\fBmaildirmake\fR [options...] {\fImaildir\fR} |
| 37 |
.SH "DESCRIPTION" |
| 38 |
.PP |
| 39 |
The |
| 40 |
\fBmaildirmake\fR |
| 41 |
command creates maildirs, and maildir folders and performs some routine maintenance on them\&. This documentation describes the |
| 42 |
\fBmaildirmake\fR |
| 43 |
command from the |
| 44 |
Courier |
| 45 |
mail server, which creates an extended form of maildirs that implements additional extensions beyond the basic maildir properties that were first implemented in the Qmail mail server\&. |
| 46 |
.SH "OPTIONS" |
| 47 |
.PP |
| 48 |
\-S |
| 49 |
.RS 4 |
| 50 |
create a "sharable" maildir\&. A sharable maildir has slightly different permissions which allows creation of publicly\-shared folders\&. |
| 51 |
.RE |
| 52 |
.PP |
| 53 |
\-q \fIquota\fR |
| 54 |
.RS 4 |
| 55 |
install a quota on the maildir\&. See |
| 56 |
\m[blue]\fB\fBmaildirquota\fR(7)\fR\m[]\&\s-2\u[1]\d\s+2 |
| 57 |
for more information\&. The specified maildir gets automatically created if it does not exist; otherwise the existing maildir\*(Aqs quota gets updated\&. |
| 58 |
\fIquota\fR |
| 59 |
may be: |
| 60 |
.PP |
| 61 |
\fI####S\fR |
| 62 |
.RS 4 |
| 63 |
Specifies the quota in the total number of bytes for all messages\&. |
| 64 |
\(lq10000000S\(rq |
| 65 |
specifies a quota of ten million bytes\&. |
| 66 |
.RE |
| 67 |
.PP |
| 68 |
\fI####C\fR |
| 69 |
.RS 4 |
| 70 |
Specifies the quota in the total number of messages in the maildir\&. |
| 71 |
\(lq10000S\(rq |
| 72 |
specifies a quota of ten thousand messages\&. |
| 73 |
.RE |
| 74 |
.RE |
| 75 |
.PP |
| 76 |
\-f \fIfolder\fR |
| 77 |
.RS 4 |
| 78 |
do not create a maildir, but create a folder in an existing maildir\&. |
| 79 |
.RE |
| 80 |
.PP |
| 81 |
\-F \fIfolder\fR |
| 82 |
.RS 4 |
| 83 |
Like the |
| 84 |
\-f |
| 85 |
option, except that the folder\*(Aqs name is given using the system locale\*(Aqs character set\&. Non\-Latin characters in the folder\*(Aqs name must be given to the |
| 86 |
\-f |
| 87 |
option using IMAP\*(Aqs UTF8 encoding\&. The |
| 88 |
\-F |
| 89 |
option takes the folder name specified using the console\*(Aqs character set\&. |
| 90 |
.RE |
| 91 |
.PP |
| 92 |
\-s \fImode\fR |
| 93 |
.RS 4 |
| 94 |
create a publicly accessible folder in an existing sharable maildir\&. First, use the |
| 95 |
\fB\-S\fR |
| 96 |
option to create a sharable maildir\&. Then, run |
| 97 |
\fBmaildirmake\fR |
| 98 |
again with the |
| 99 |
\fB\-s\fR |
| 100 |
option to create publicly accessible folders\&. |
| 101 |
\fImode\fR |
| 102 |
is a comma\-separated list of the following keywords: |
| 103 |
read |
| 104 |
\- readonly folder, only you can write messages to this folder; |
| 105 |
write |
| 106 |
\- anyone can read and write messages to this folder; |
| 107 |
group |
| 108 |
\- only allow members of your own system group to access messages in this folder (instead of everyone)\&. |
| 109 |
.RE |
| 110 |
.PP |
| 111 |
\-\-add \fIname\fR=\fIpathname\fR, \-\-del \fIname\fR |
| 112 |
.RS 4 |
| 113 |
create or delete the directories and links needed to access shared folders\&. See below for more information\&. |
| 114 |
.RE |
| 115 |
.PP |
| 116 |
\-\-checkutf8 \fImaildir\fR \fImaildirfilter\fR |
| 117 |
.RS 4 |
| 118 |
Perform a sanity check to verify that a pre\-unicode format maildir can be converted to a unicode\-format maildir\&. See |
| 119 |
\(lqConverting pre\-unicode format maildirs\(rq, below, for more information\&. |
| 120 |
.RE |
| 121 |
.PP |
| 122 |
\-\-convutf8 \fImaildir\fR \fImaildirfilter\fR |
| 123 |
.RS 4 |
| 124 |
Convert a pre\-unicode format maildir can be converted to a unicode\-format maildir\&. See |
| 125 |
\(lqConverting pre\-unicode format maildirs\(rq, below, for more information\&. |
| 126 |
.RE |
| 127 |
.SS "FOLDERS" |
| 128 |
.PP |
| 129 |
This |
| 130 |
\fBmaildirmake\fR |
| 131 |
command supports enhanced maildirs that contain folders\&. |
| 132 |
.PP |
| 133 |
By itself, |
| 134 |
\fBmaildirmake\fR |
| 135 |
makes a new subdirectory |
| 136 |
\fImaildir\fR, and creates all the necessary structures\&. The |
| 137 |
\fB\-f\fR |
| 138 |
option creates a new "folder" within an existing |
| 139 |
\fImaildir\fR\&. |
| 140 |
\fImaildir\fR |
| 141 |
must already exist, and the |
| 142 |
\fBmaildirmake\fR |
| 143 |
command will create a new folder in the maildir\&. |
| 144 |
.PP |
| 145 |
Folders are simply subdirectories inside the main maildir whose names start with a period, and which are themselves maildirs\&. For example, the command "\fBmaildirmake \-f Drafts mail/Maildir\fR" creates |
| 146 |
mail/Maildir/\&.Drafts, that has the usual |
| 147 |
tmp, |
| 148 |
new |
| 149 |
and |
| 150 |
cur\&. You MUST use the |
| 151 |
\fB\-f\fR |
| 152 |
option, instead of specifying |
| 153 |
mail/Maildir/\&.Drafts |
| 154 |
directly, in order to correctly initialize certain enhanced maildir features\&. |
| 155 |
.PP |
| 156 |
Folders cannot be created directly within other folders\&. Running |
| 157 |
\fBmaildirmake \-f Urgent mail/Maildir/\&.Drafts\fR |
| 158 |
will not work\&. Instead, the period character is designated as a hierarchy separator, run |
| 159 |
\fBmaildirmake \-f Drafts\&.Urgent mail/Maildir\fR |
| 160 |
instead\&. This creates |
| 161 |
mail/Maildir/\&.Drafts\&.Urgent, and all mail software that supports enhanced maildirs will interpret it as a subfolder Urgent of the Drafts folder\&. |
| 162 |
.SS "SHARED FOLDERS" |
| 163 |
.PP |
| 164 |
This is another extension to the Maildir format that allows folders to be shared between multiple clients\&. |
| 165 |
.if n \{\ |
| 166 |
.sp |
| 167 |
.\} |
| 168 |
.RS 4 |
| 169 |
.nr an-no-space-flag 1 |
| 170 |
.nr an-break-flag 1 |
| 171 |
.br |
| 172 |
.ps +1 |
| 173 |
\fBNote\fR |
| 174 |
.ps -1 |
| 175 |
.br |
| 176 |
.PP |
| 177 |
The |
| 178 |
Courier |
| 179 |
IMAP server implements two types of shared folders: filesystem permission\-based shared folders, as well as virtual shared folders based on IMAP access control lists\&. Use the |
| 180 |
\fBmaildirmake\fR |
| 181 |
command to implement shared folders based on filesystem permissions\&. The |
| 182 |
\m[blue]\fB\fBmaildiracl\fR(1)\fR\m[]\&\s-2\u[2]\d\s+2 |
| 183 |
command manages access control lists, which are used by virtual shared folders\&. |
| 184 |
.PP |
| 185 |
See the |
| 186 |
Courier |
| 187 |
IMAP server documentation for more information\&. |
| 188 |
.sp .5v |
| 189 |
.RE |
| 190 |
.PP |
| 191 |
First, you need to create a collection of sharable folders, as a separate maildir: |
| 192 |
.sp |
| 193 |
.if n \{\ |
| 194 |
.RS 4 |
| 195 |
.\} |
| 196 |
.nf |
| 197 |
\fBmaildirmake \-S /usr/local/share/maildirs/notices\fR |
| 198 |
.fi |
| 199 |
.if n \{\ |
| 200 |
.RE |
| 201 |
.\} |
| 202 |
.PP |
| 203 |
Then, create individuals folders that will be accessed in shared mode: |
| 204 |
.sp |
| 205 |
.if n \{\ |
| 206 |
.RS 4 |
| 207 |
.\} |
| 208 |
.nf |
| 209 |
\fBmaildirmake \-s write \-f Weekly /usr/local/share/maildirs/notices\fR |
| 210 |
.fi |
| 211 |
.if n \{\ |
| 212 |
.RE |
| 213 |
.\} |
| 214 |
.PP |
| 215 |
In this example, the "Weekly" folder is created, with read/write access to everyone\&. Multiple folders can be created in the same maildir, with different access permissions\&. Everyone can create a sharable maildir\&. The access privileges for individual folders are set by the |
| 216 |
\fB\-s\fR |
| 217 |
option, and are implemented using traditional filesystem permissions\&. |
| 218 |
.PP |
| 219 |
Use the |
| 220 |
\fB\-\-add\fR |
| 221 |
and |
| 222 |
\fB\-\-del\fR |
| 223 |
options to add a sharable maildir to an existing maildir\&. Client software that implements this extension will now know where to find sharable folders: |
| 224 |
.sp |
| 225 |
.if n \{\ |
| 226 |
.RS 4 |
| 227 |
.\} |
| 228 |
.nf |
| 229 |
\fBmaildirmake \-\-add notices=/usr/local/share/maildirs/notices $HOME/Maildir\fR |
| 230 |
.fi |
| 231 |
.if n \{\ |
| 232 |
.RE |
| 233 |
.\} |
| 234 |
.PP |
| 235 |
$HOME/Maildir |
| 236 |
is your main maildir\&. The argument to |
| 237 |
\fB\-add\fR |
| 238 |
is |
| 239 |
\fInick\fR=\fIpath\fR\&. |
| 240 |
\fInick\fR |
| 241 |
is a nickname for this collection of sharable folders, and |
| 242 |
\fIpath\fR |
| 243 |
is the location of the sharable maildir\&. All folders in the sharable maildir that you have access to \-\- such as "Weekly", in this case, will now be accessible\&. Multiple sharable maildirs can be added, by giving each one a unique |
| 244 |
\fInick\fR\&. |
| 245 |
.PP |
| 246 |
The |
| 247 |
\fB\-\-del\fR |
| 248 |
option "disconnects" the sharable maildir from the main maildir\&. |
| 249 |
.SS "GLOBAL SHARED FOLDERS" |
| 250 |
.PP |
| 251 |
Normally |
| 252 |
\fB\-add\fR |
| 253 |
command must be run for every maildir which needs to access the sharable maildir\&. Alternatively the file |
| 254 |
/etc/maildirshared |
| 255 |
can be created, to specify a default set of sharable maildirs\&. Each line in this file takes the following format: |
| 256 |
.sp |
| 257 |
.if n \{\ |
| 258 |
.RS 4 |
| 259 |
.\} |
| 260 |
.nf |
| 261 |
\fInick\fR<tab>\fIpath\fR |
| 262 |
.fi |
| 263 |
.if n \{\ |
| 264 |
.RE |
| 265 |
.\} |
| 266 |
.PP |
| 267 |
\fInick\fR |
| 268 |
is a short nickname for the sharable maildir, |
| 269 |
<tab> |
| 270 |
is a single tab character, |
| 271 |
\fIpath\fR |
| 272 |
is the pathname to the sharable maildir\&. |
| 273 |
.SS "ACCESSING SHARED FOLDERS" |
| 274 |
.PP |
| 275 |
You may have read or write access to a shared folder\&. If you have write access, you can add messages to the shared folder\&. You can also delete messages that you\*(Aqve added\&. |
| 276 |
.PP |
| 277 |
Anyone can create a sharable maildir, so if the sharable maildir is actually created by you, can can delete any message, not just your own\&. |
| 278 |
.SH "CONVERTING PRE\-UNICODE FORMAT MAILDIRS" |
| 279 |
.PP |
| 280 |
This section is relevant to: |
| 281 |
.sp |
| 282 |
.RS 4 |
| 283 |
.ie n \{\ |
| 284 |
\h'-04'\(bu\h'+03'\c |
| 285 |
.\} |
| 286 |
.el \{\ |
| 287 |
.sp -1 |
| 288 |
.IP \(bu 2.3 |
| 289 |
.\} |
| 290 |
Updating |
| 291 |
Courier\-IMAP |
| 292 |
to version 5\&.0, and later, from prior versions of |
| 293 |
Courier\-IMAP, or: |
| 294 |
.RE |
| 295 |
.sp |
| 296 |
.RS 4 |
| 297 |
.ie n \{\ |
| 298 |
\h'-04'\(bu\h'+03'\c |
| 299 |
.\} |
| 300 |
.el \{\ |
| 301 |
.sp -1 |
| 302 |
.IP \(bu 2.3 |
| 303 |
.\} |
| 304 |
Updating |
| 305 |
SqWebmail |
| 306 |
to version 6\&.0, and later, from prior versions of |
| 307 |
SqWebmail, or: |
| 308 |
.RE |
| 309 |
.sp |
| 310 |
.RS 4 |
| 311 |
.ie n \{\ |
| 312 |
\h'-04'\(bu\h'+03'\c |
| 313 |
.\} |
| 314 |
.el \{\ |
| 315 |
.sp -1 |
| 316 |
.IP \(bu 2.3 |
| 317 |
.\} |
| 318 |
Updating Courier to version 1\&.0, and later, from prior versions of Courier\&. |
| 319 |
.RE |
| 320 |
.PP |
| 321 |
These versions have been updated to implement native Unicode support in several E\-mail\-related protocols\&. It is already expected that updating Internet standards to use native Unicode\-formatted E\-mail messages will not be 100% backwards\-compatible, in terms of E\-mail client support\&. Given that, this major update to Unicode will also introduce some backwards\-incompatible changes to the internal structure of maildirs, as a major upgrade to simplify Unicode support going forward\&. Might as well go through the pain of a major upgrade once\&. |
| 322 |
.PP |
| 323 |
\fBmaildirmake\fR\*(Aqs |
| 324 |
\fB\-\-checkutf8\fR |
| 325 |
and |
| 326 |
\fB\-\-convutf8\fR |
| 327 |
options are tools to aid in conversion of existing mailboxes to the new Unicode\-based naming standard\&. |
| 328 |
.SS "Background" |
| 329 |
.PP |
| 330 |
Mail folders in a maildir are hidden subdirectories\&. For example: a folder name |
| 331 |
\(lqMailing list\(rq |
| 332 |
is a maildir subdirectory named |
| 333 |
$HOME/Maildir/\&.Mailing list |
| 334 |
($HOME/Maildir |
| 335 |
is the main mailbox)\&. |
| 336 |
.PP |
| 337 |
Prior to the unicode update, non\-English characters in folder names used a convention based on the non\-standard |
| 338 |
\(lqmodified\-UTF7\(rq |
| 339 |
encoding used by IMAP\&. A folder named |
| 340 |
\(lqRésumé\(rq |
| 341 |
is a maildir subdirectory named |
| 342 |
$HOME/Maildir/\&.R&AOk\-sum&AOk\-\&. The current versions of Courier, |
| 343 |
Courier\-IMAP, and SqWebmail, now creates |
| 344 |
$HOME/Maildir/\&.Résumé |
| 345 |
using the |
| 346 |
UTF8 |
| 347 |
encoding\&. This appears as plain |
| 348 |
\(lq\&.Résumé\(rq |
| 349 |
(hidden) subdirectory on modern UTF8\-based systems\&. |
| 350 |
.PP |
| 351 |
Consequently, any existing maildirs with folders that use non\-English names must be converted as part of updating to the current version of Courier, |
| 352 |
Courier\-IMAP, and SqWebmail from pre\-unicode versions\&. This does not happen automatically when updating to the current version\&. This must be done manually given the wide variety of individual mail server configurations that are possible\&. |
| 353 |
.SS "Unicode conversion overview" |
| 354 |
.PP |
| 355 |
Updating from pre\-unicode versions involves: |
| 356 |
.sp |
| 357 |
.RS 4 |
| 358 |
.ie n \{\ |
| 359 |
\h'-04'\(bu\h'+03'\c |
| 360 |
.\} |
| 361 |
.el \{\ |
| 362 |
.sp -1 |
| 363 |
.IP \(bu 2.3 |
| 364 |
.\} |
| 365 |
Renaming the actual maildir folders, |
| 366 |
$HOME/Maildir/\&.\fInames\fR |
| 367 |
into unicode names (using |
| 368 |
UTF8)\&. |
| 369 |
.RE |
| 370 |
.sp |
| 371 |
.RS 4 |
| 372 |
.ie n \{\ |
| 373 |
\h'-04'\(bu\h'+03'\c |
| 374 |
.\} |
| 375 |
.el \{\ |
| 376 |
.sp -1 |
| 377 |
.IP \(bu 2.3 |
| 378 |
.\} |
| 379 |
Updating the |
| 380 |
$HOME/Maildir/courierimapsubscribed |
| 381 |
file, which is a list of subscribed IMAP folders, if it exists\&. |
| 382 |
.RE |
| 383 |
.sp |
| 384 |
.RS 4 |
| 385 |
.ie n \{\ |
| 386 |
\h'-04'\(bu\h'+03'\c |
| 387 |
.\} |
| 388 |
.el \{\ |
| 389 |
.sp -1 |
| 390 |
.IP \(bu 2.3 |
| 391 |
.\} |
| 392 |
Updating any |
| 393 |
maildrop |
| 394 |
mail filtering recipes, |
| 395 |
$HOME/\&.mailfilter, if it exists, to reference the unicode maildir folders; or updating any custom site mail filtering engine that delivers to maildir folders, to reference the correct subdirectory names\&. |
| 396 |
.RE |
| 397 |
.SS "Unicode conversion steps" |
| 398 |
.PP |
| 399 |
The |
| 400 |
\fB\-\-checkutf8\fR |
| 401 |
and |
| 402 |
\fB\-\-convutf8\fR |
| 403 |
options to |
| 404 |
\fBmaildirmake\fR |
| 405 |
convert a single maildir to the new unicode format: |
| 406 |
.sp |
| 407 |
.if n \{\ |
| 408 |
.RS 4 |
| 409 |
.\} |
| 410 |
.nf |
| 411 |
$ \&./maildirmake \-\-checkutf8 ~/Maildir ~/\&.mailfilter |
| 412 |
Checking /home/mrsam/Maildir: |
| 413 |
Mail filter to INBOX\&.R&AOk\-sum&AOk\- updated to INBOX\&.Résumé |
| 414 |
Subscription to INBOX\&.R&AOk\-sum&AOk\- changed to INBOX\&.Résumé |
| 415 |
Rename INBOX\&.R&AOk\-sum&AOk\- to INBOX\&.Résumé |
| 416 |
Verified /home/mrsam/Maildir/courierimapsubscribed |
| 417 |
Verified /home/mrsam/\&.mailfilter |
| 418 |
$ \&./maildirmake \-\-convutf8 ~/Maildir ~/\&.mailfilter |
| 419 |
Checking /home/mrsam/Maildir: |
| 420 |
Mail filter to INBOX\&.R&AOk\-sum&AOk\- updated to INBOX\&.Résumé |
| 421 |
Subscription to INBOX\&.R&AOk\-sum&AOk\- changed to INBOX\&.Résumé |
| 422 |
Rename INBOX\&.R&AOk\-sum&AOk\- to INBOX\&.Résumé |
| 423 |
Updating /home/mrsam/Maildir/courierimapsubscribed |
| 424 |
Updating /home/mrsam/\&.mailfilter |
| 425 |
.fi |
| 426 |
.if n \{\ |
| 427 |
.RE |
| 428 |
.\} |
| 429 |
.PP |
| 430 |
\fB\-\-checkutf8\fR |
| 431 |
goes through the motions of converting a single maildir to Unicode, but without making any actual changes\&. |
| 432 |
\fB\-\-convutf8\fR |
| 433 |
does the conversion for real\&. The first required parameter is the maildir to convert\&. The second parameter is optional, and specifies the corresponding |
| 434 |
\fBmaildrop\fR |
| 435 |
filtering recipe, |
| 436 |
\fIbut only if \fR\fISqWebMail\fR |
| 437 |
generates the mail filtering recipes\&. |
| 438 |
SqWebMail\*(Aqs mail filtering recipes are parsable, and can be automatically\-converted\&. Non\-SqWebMail\-generated |
| 439 |
\&.mailfilters cannot be converted automatically\&. The second parameter must be omitted, and the mail filtering recipe must be converted by hand\&. |
| 440 |
.if n \{\ |
| 441 |
.sp |
| 442 |
.\} |
| 443 |
.RS 4 |
| 444 |
.nr an-no-space-flag 1 |
| 445 |
.nr an-break-flag 1 |
| 446 |
.br |
| 447 |
.ps +1 |
| 448 |
\fBNote\fR |
| 449 |
.ps -1 |
| 450 |
.br |
| 451 |
.PP |
| 452 |
All this work is only needed if maildirs have folders with non\-English names\&. Ignore everything you\*(Aqve just read if all folder names are English\-only\&. |
| 453 |
\fB\-\-checkutf8\fR |
| 454 |
and |
| 455 |
\fB\-\-convutf8\fR |
| 456 |
will not do anything, and nothing needs to be done\&. |
| 457 |
.sp .5v |
| 458 |
.RE |
| 459 |
.PP |
| 460 |
To convert all mailboxes to Unicode all at once: |
| 461 |
.sp |
| 462 |
.RS 4 |
| 463 |
.ie n \{\ |
| 464 |
\h'-04'\(bu\h'+03'\c |
| 465 |
.\} |
| 466 |
.el \{\ |
| 467 |
.sp -1 |
| 468 |
.IP \(bu 2.3 |
| 469 |
.\} |
| 470 |
A shell script needs to run the |
| 471 |
\fB\-\-checkutf8\fR |
| 472 |
option for every mailbox\&. A list of all accounts\*(Aq maildirs needs to be prepared in advance, together with the corresponding |
| 473 |
\&.mailfilters (where appropriate)\&. courier\-authlib\*(Aqs |
| 474 |
\fBauthenumerate\fR |
| 475 |
command is usually a good starting point\&. It\*(Aqs ok to explicitly specify each mailbox\*(Aqs |
| 476 |
\&.mailfilter, when using |
| 477 |
SqWebMail |
| 478 |
even if a particular mailbox does not use it\&. It will be ignored\&. The list of all accounts\*(Aq maildirs gets converted to a shell script that runs |
| 479 |
\fBmaildirmake\fR |
| 480 |
with the |
| 481 |
\fB\-\-checkutf8\fR |
| 482 |
option\&. The script should report any maildir whose |
| 483 |
\fB\-\-checkutf8\fR |
| 484 |
option reports an error, and |
| 485 |
\fBmaildirmake\fR |
| 486 |
exits with a non\-zero status\&. |
| 487 |
.sp |
| 488 |
It is safe to run |
| 489 |
\fB\-\-checkutf8\fR |
| 490 |
without shutting down your mail server\&. A non\-zero exit from |
| 491 |
\fB\-\-checkutf8\fR |
| 492 |
indicates a problem (see below) for a particular maildir\&. |
| 493 |
.RE |
| 494 |
.sp |
| 495 |
.RS 4 |
| 496 |
.ie n \{\ |
| 497 |
\h'-04'\(bu\h'+03'\c |
| 498 |
.\} |
| 499 |
.el \{\ |
| 500 |
.sp -1 |
| 501 |
.IP \(bu 2.3 |
| 502 |
.\} |
| 503 |
Once |
| 504 |
\fB\-\-checkutf8\fR |
| 505 |
does not find any problems with any mailbox, shut down the mail server, run |
| 506 |
\fB\-\-checkutf8\fR |
| 507 |
one more time for all mailboxes, then if everything goes well, upgrade |
| 508 |
Courier, |
| 509 |
Courier\-IMAP, or |
| 510 |
SqWebMail |
| 511 |
and run |
| 512 |
\fB\-\-convutf8\fR |
| 513 |
on every mailbox before restarting the server\&. |
| 514 |
.RE |
| 515 |
.if n \{\ |
| 516 |
.sp |
| 517 |
.\} |
| 518 |
.RS 4 |
| 519 |
.nr an-no-space-flag 1 |
| 520 |
.nr an-break-flag 1 |
| 521 |
.br |
| 522 |
.ps +1 |
| 523 |
\fBNote\fR |
| 524 |
.ps -1 |
| 525 |
.br |
| 526 |
.PP |
| 527 |
\fB\-\-convutf8\fR |
| 528 |
is a one\-shot deal\&. Do not run |
| 529 |
\fB\-\-convutf8\fR |
| 530 |
a second time after it successfully converted a maildir\&. In nearly all cases nothing will happen, but there are rare edge cases where some folder names may get garbled, or it fails completely\&. |
| 531 |
.sp .5v |
| 532 |
.RE |
| 533 |
.SS "Resolving unicode conversion problems" |
| 534 |
.PP |
| 535 |
The only likely problems that might be encountered is the fall\-out from buggy IMAP clients that did not follow the pre\-Unicode naming convention for non\-Latin folder names\&. The customized IMAP |
| 536 |
\(lqmodified\-UTF7\(rq |
| 537 |
encoding convention for non\-Latin folder names is mostly an IMAP client convention, and the pre\-Unicode version of |
| 538 |
Courier\-IMAP |
| 539 |
did not enforce it\&. The server took the name from the IMAP client, as is\&. |
| 540 |
.PP |
| 541 |
Unicode conversion (\fB\-\-checkutf8\fR |
| 542 |
or |
| 543 |
\fB\-\-convutf8\fR) fails if it finds a folder name that does not correctly use IMAP\*(Aqs |
| 544 |
\(lqmodified\-UTF7\(rq |
| 545 |
encoding\&. This can only be resolved manually, by renaming the folder\&. This may also involve manually editing |
| 546 |
courierimapsubscribed |
| 547 |
and |
| 548 |
\&.mailfilter |
| 549 |
if they exist\&. The bad folder name should be removed from |
| 550 |
courierimapsubscribed\&. For |
| 551 |
\&.mailfilter |
| 552 |
it is sufficient to remove only the comments that precede the actual |
| 553 |
\fBmaildrop\fR |
| 554 |
rule, and |
| 555 |
\fB\-\-convutf8\fR |
| 556 |
will remove the entire rule, by itself\&. |
| 557 |
\fB\-\-convutf8\fR |
| 558 |
actually reads only the machine\-parsable comments in |
| 559 |
\fBSqWebMail\fR\-generated |
| 560 |
\&.mailfilter |
| 561 |
(plus a few other things in the file), and replaces the |
| 562 |
\&.mailfilter |
| 563 |
with the Unicode version based solely on the parsed data\&. |
| 564 |
.SS "After the Unicode conversion" |
| 565 |
.PP |
| 566 |
The current, Unicode version of |
| 567 |
Courier\-IMAP |
| 568 |
supports both Unicode and non\-Unicode IMAP clients; however unlike the pre\-Unicode version, |
| 569 |
Courier\-IMAP |
| 570 |
rejects requests from non\-Unicode IMAP clients to use or create folders that are not properly encoded\&. |
| 571 |
.PP |
| 572 |
Encountering a bad folder during conversion strongly suggests the presence of an IMAP client that does not correctly encode non\-English folder names\&. Such an IMAP client will likely have problems after the conversion\&. |
| 573 |
.SH "SEE ALSO" |
| 574 |
.PP |
| 575 |
\m[blue]\fB\fBmaildir\fR(5)\fR\m[]\&\s-2\u[3]\d\s+2, |
| 576 |
\m[blue]\fB\fBmaildiracl\fR(1)\fR\m[]\&\s-2\u[2]\d\s+2, |
| 577 |
\m[blue]\fB\fBmaildirkw\fR(1)\fR\m[]\&\s-2\u[4]\d\s+2, |
| 578 |
\m[blue]\fB\fBmaildirwatch\fR(1)\fR\m[]\&\s-2\u[5]\d\s+2, |
| 579 |
\m[blue]\fB\fBmaildrop\fR(1)\fR\m[]\&\s-2\u[6]\d\s+2, |
| 580 |
\m[blue]\fB\fBmaildirquota\fR(7)\fR\m[]\&\s-2\u[1]\d\s+2, |
| 581 |
\m[blue]\fB\fBdeliverquota\fR(8)\fR\m[]\&\s-2\u[7]\d\s+2, |
| 582 |
\m[blue]\fB\fBmaildropfilter\fR(7)\fR\m[]\&\s-2\u[8]\d\s+2\&. |
| 583 |
.SH "AUTHOR" |
| 584 |
.PP |
| 585 |
\fBSam Varshavchik\fR |
| 586 |
.RS 4 |
| 587 |
Author |
| 588 |
.RE |
| 589 |
.SH "NOTES" |
| 590 |
.IP " 1." 4 |
| 591 |
\fBmaildirquota\fR(7) |
| 592 |
.RS 4 |
| 593 |
\%http://www.courier-mta.org/maildirquota.html |
| 594 |
.RE |
| 595 |
.IP " 2." 4 |
| 596 |
\fBmaildiracl\fR(1) |
| 597 |
.RS 4 |
| 598 |
\%http://www.courier-mta.org/maildiracl.html |
| 599 |
.RE |
| 600 |
.IP " 3." 4 |
| 601 |
\fBmaildir\fR(5) |
| 602 |
.RS 4 |
| 603 |
\%http://www.courier-mta.org/maildir.html |
| 604 |
.RE |
| 605 |
.IP " 4." 4 |
| 606 |
\fBmaildirkw\fR(1) |
| 607 |
.RS 4 |
| 608 |
\%http://www.courier-mta.org/maildirkw.html |
| 609 |
.RE |
| 610 |
.IP " 5." 4 |
| 611 |
\fBmaildirwatch\fR(1) |
| 612 |
.RS 4 |
| 613 |
\%http://www.courier-mta.org/maildirwatch.html |
| 614 |
.RE |
| 615 |
.IP " 6." 4 |
| 616 |
\fBmaildrop\fR(1) |
| 617 |
.RS 4 |
| 618 |
\%http://www.courier-mta.org/maildrop.html |
| 619 |
.RE |
| 620 |
.IP " 7." 4 |
| 621 |
\fBdeliverquota\fR(8) |
| 622 |
.RS 4 |
| 623 |
\%http://www.courier-mta.org/deliverquota.html |
| 624 |
.RE |
| 625 |
.IP " 8." 4 |
| 626 |
\fBmaildropfilter\fR(7) |
| 627 |
.RS 4 |
| 628 |
\%http://www.courier-mta.org/maildropfilter.html |
| 629 |
.RE |