{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Box::Maildir (info)\n\n## NAME\n\nMail::Box::Maildir - handle Maildir folders\n\n## SYNOPSIS\n\nuse Mail::Box::Maildir;\nmy $folder = new Mail::Box::Maildir folder => $ENV{MAIL}, ...;\n\n## DESCRIPTION\n\nThis documentation describes how Maildir mailboxes work, and what you\ncan do with the Maildir folder object \"Mail::Box::Maildir\".\n\n## Sections\n\n- **Mail::Box::Maildir(3pmUser Contributed Perl DocumentatiMail::Box::Maildir(3pm)**\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OVERLOADED**\n- **METHODS**\n- **DETAILS**\n- **DIAGNOSTICS**\n- **SEE ALSO**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Box::Maildir",
        "section": "",
        "mode": "info",
        "summary": "Mail::Box::Maildir - handle Maildir folders",
        "synopsis": "use Mail::Box::Maildir;\nmy $folder = new Mail::Box::Maildir folder => $ENV{MAIL}, ...;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Mail::Box::Maildir(3pmUser Contributed Perl DocumentatiMail::Box::Maildir(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OVERLOADED",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 319,
                "subsections": []
            },
            {
                "name": "DETAILS",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 85,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "Mail::Box::Maildir(3pmUser Contributed Perl DocumentatiMail::Box::Maildir(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Mail::Box::Maildir - handle Maildir folders\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Box::Maildir\nis a Mail::Box::Dir\nis a Mail::Box\nis a Mail::Reporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Mail::Box::Maildir;\nmy $folder = new Mail::Box::Maildir folder => $ENV{MAIL}, ...;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This documentation describes how Maildir mailboxes work, and what you\ncan do with the Maildir folder object \"Mail::Box::Maildir\".\n\nMaildir is not supported for Windows, because it create filenames which\nare not accepted by the Windows system.\n\nExtends \"DESCRIPTION\" in Mail::Box::Dir.\n",
                "subsections": []
            },
            "OVERLOADED": {
                "content": "Extends \"OVERLOADED\" in Mail::Box::Dir.\n\noverload: \"\"\nInherited, see \"OVERLOADED\" in Mail::Box\n\noverload: @{}\nInherited, see \"OVERLOADED\" in Mail::Box\n\noverload: cmp\nInherited, see \"OVERLOADED\" in Mail::Box\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Extends \"METHODS\" in Mail::Box::Dir.\n\nConstructors\nExtends \"Constructors\" in Mail::Box::Dir.\n\nMail::Box::Maildir->new(%options)\n-Option           --Defined in     --Default\nacceptnew                          <false>\naccess             Mail::Box        'r'\nbodydelayedtype  Mail::Box        Mail::Message::Body::Delayed\nbodytype          Mail::Box        Mail::Message::Body::Lines\ncoerceoptions     Mail::Box        []\ncreate             Mail::Box        <false>\ndirectory          Mail::Box::Dir   <derived from folder name>\nextract            Mail::Box        10240\nfieldtype         Mail::Box        undef\nfixheaders        Mail::Box        <false>\nfolder             Mail::Box        $ENV{MAIL}\nfolderdir          Mail::Box        $ENV{HOME}/.maildir\nheaddelayedtype  Mail::Box        Mail::Message::Head::Delayed\nheadtype          Mail::Box        Mail::Message::Head::Complete\nkeepdups          Mail::Box        <false>\nlockfile          Mail::Box        <not used>\nlocktimeout       Mail::Box        <not used>\nlocktype          Mail::Box        'NONE' (constant)\nlockwait          Mail::Box        <not used>\nlocker             Mail::Box        undef\nlog                Mail::Reporter   'WARNINGS'\nmanager            Mail::Box        undef\nmessagetype       Mail::Box        <folder-class>::Message\nmultiparttype     Mail::Box        Mail::Message::Body::Multipart\nremovewhenempty  Mail::Box        <true>\nsaveonexit       Mail::Box        <true>\ntrace              Mail::Reporter   'WARNINGS'\ntrusted            Mail::Box        <depends on folder location>\n\nacceptnew => BOOLEAN\nWhen the folder is open, some messages may be stored in the \"new\"\nsub-directory.  By default, these messages are immediately moved\nto the \"cur\" directory when the folder is opened.  Otherwise, you\nhave to call acceptMessages() or\nMail::Box::Maildir::Message::accept().\n\naccess => MODE\nbodydelayedtype => CLASS\nbodytype => CLASS|CODE\ncoerceoptions => ARRAY\ncreate => BOOLEAN\ndirectory => DIRECTORY\nextract => INTEGER | CODE | METHOD | 'LAZY'|'ALWAYS'\nfieldtype => CLASS\nfixheaders => BOOLEAN\nfolder => FOLDERNAME\nfolderdir => DIRECTORY\nheaddelayedtype => CLASS\nheadtype => CLASS\nkeepdups => BOOLEAN\nlockfile => FILENAME\nlocktimeout => SECONDS\nlocktype => CLASS|STRING|ARRAY\nlockwait => SECONDS\nlocker => OBJECT\nlog => LEVEL\nmanager => MANAGER\nmessagetype => CLASS\nmultiparttype => CLASS\nremovewhenempty => BOOLEAN\nsaveonexit => BOOLEAN\ntrace => LEVEL\ntrusted => BOOLEAN\n\nThe folder\nExtends \"The folder\" in Mail::Box::Dir.\n\n$obj->addMessage($message, %options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->addMessages(@messages)\nInherited, see \"The folder\" in Mail::Box\n\nMail::Box::Maildir->appendMessages(%options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->close(%options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->copyTo($folder, %options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->delete(%options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->directory()\nInherited, see \"The folder\" in Mail::Box::Dir\n\n$obj->folderdir( [$directory] )\nInherited, see \"The folder\" in Mail::Box\n\n$obj->name()\nInherited, see \"The folder\" in Mail::Box\n\n$obj->organization()\nInherited, see \"The folder\" in Mail::Box\n\n$obj->size()\nInherited, see \"The folder\" in Mail::Box\n\n$obj->type()\nInherited, see \"The folder\" in Mail::Box\n\n$obj->update(%options)\nInherited, see \"The folder\" in Mail::Box\n\n$obj->url()\nInherited, see \"The folder\" in Mail::Box\n\nFolder flags\nExtends \"Folder flags\" in Mail::Box::Dir.\n\n$obj->access()\nInherited, see \"Folder flags\" in Mail::Box\n\n$obj->isModified()\nInherited, see \"Folder flags\" in Mail::Box\n\n$obj->modified( [BOOLEAN] )\nInherited, see \"Folder flags\" in Mail::Box\n\n$obj->writable()\nInherited, see \"Folder flags\" in Mail::Box\n\nThe messages\nExtends \"The messages\" in Mail::Box::Dir.\n\n$obj->current( [$number|$message|$messageid] )\nInherited, see \"The messages\" in Mail::Box\n\n$obj->find($messageid)\nInherited, see \"The messages\" in Mail::Box\n\n$obj->findFirstLabeled( $label, [BOOLEAN, [$msgs]] )\nInherited, see \"The messages\" in Mail::Box\n\n$obj->message( $index, [$message] )\nInherited, see \"The messages\" in Mail::Box\n\n$obj->messageId( $messageid, [$message] )\nInherited, see \"The messages\" in Mail::Box\n\n$obj->messageIds()\nInherited, see \"The messages\" in Mail::Box\n\n$obj->messages( <'ALL'|$range|'ACTIVE'|'DELETED'|$label|\n!$label|$filter> )\nInherited, see \"The messages\" in Mail::Box\n\n$obj->nrMessages(%options)\nInherited, see \"The messages\" in Mail::Box\n\n$obj->scanForMessages($message, $messageids, $timespan, $window)\nInherited, see \"The messages\" in Mail::Box\n\nSub-folders\nExtends \"Sub-folders\" in Mail::Box::Dir.\n\n$obj->listSubFolders(%options)\nMail::Box::Maildir->listSubFolders(%options)\nInherited, see \"Sub-folders\" in Mail::Box\n\n$obj->nameOfSubFolder( $subname, [$parentname] )\nMail::Box::Maildir->nameOfSubFolder( $subname, [$parentname] )\nInherited, see \"Sub-folders\" in Mail::Box\n\n$obj->openRelatedFolder(%options)\nInherited, see \"Sub-folders\" in Mail::Box\n\n$obj->openSubFolder($subname, %options)\nInherited, see \"Sub-folders\" in Mail::Box\n\n$obj->topFolderWithMessages()\nMail::Box::Maildir->topFolderWithMessages()\nInherited, see \"Sub-folders\" in Mail::Box\n\nInternals\nExtends \"Internals\" in Mail::Box::Dir.\n\n$obj->acceptMessages()\nAccept all messages which are waiting in the \"new\" directory to be\nmoved to the \"cur\" directory.  This will not rescan the directory\nfor newly arrived messages, because that's a task for update().\n\nMail::Box::Maildir->appendMessage(%options)\n$obj->coerce($message, %options)\n$obj->create($foldername, %options)\nMail::Box::Maildir->create($foldername, %options)\n-Option   --Defined in--Default\nfolderdir  Mail::Box   undef\n\nfolderdir => DIRECTORY\n$obj->createDirs($folderdir)\nMail::Box::Maildir->createDirs($folderdir)\nThe $folderdir contains the absolute path of the location where the\nmessages are kept.  Maildir folders contain a \"tmp\", \"new\", and\n\"cur\" sub-directory within that folder directory as well.  This\nmethod will ensure that all directories exist.  Returns false on\nfailure.\n\n$obj->determineBodyType($message, $head)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->folderIsEmpty($folderdir)\nMail::Box::Maildir->folderIsEmpty($folderdir)\nChecks whether the folder whose directory is specified as absolute\n$folderdir is empty or not.  A folder is empty when the \"tmp\",\n\"new\", and \"cur\" subdirectories are empty and some files which are\nleft there by application programs.  The maildir spec explicitly\nstates: \".qmail\", \"bulletintime\", \"bulletinlock\" and \"seriallock\".\nIf any other files are found, the directory is considered not-\nempty.\n\n$obj->folderToDirectory($foldername, $folderdir)\nInherited, see \"Internals\" in Mail::Box::Dir\n\nMail::Box::Maildir->foundIn( [$foldername], %options )\nInherited, see \"Internals\" in Mail::Box\n\n$obj->lineSeparator( [<STRING|'CR'|'LF'|'CRLF'>] )\nInherited, see \"Internals\" in Mail::Box\n\n$obj->locker()\nInherited, see \"Internals\" in Mail::Box\n\n$obj->messageInFile($filename)\nInherited, see \"Internals\" in Mail::Box::Dir\n\n$obj->read(%options)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->readMessageFilenames($directory)\nInherited, see \"Internals\" in Mail::Box::Dir\n\n$obj->readMessages(%options)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->storeMessage($message)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->toBeThreaded($messages)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->toBeUnthreaded($messages)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->updateMessages(%options)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->write(%options)\nInherited, see \"Internals\" in Mail::Box\n\n$obj->writeMessages(%options)\nInherited, see \"Internals\" in Mail::Box\n\nOther methods\nExtends \"Other methods\" in Mail::Box::Dir.\n\n$obj->timespan2seconds($time)\nMail::Box::Maildir->timespan2seconds($time)\nInherited, see \"Other methods\" in Mail::Box\n\nError handling\nExtends \"Error handling\" in Mail::Box::Dir.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,\n$callback] )\nMail::Box::Maildir->defaultTrace( [$level]|[$loglevel,\n$tracelevel]|[$level, $callback] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Box::Maildir->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Box::Maildir->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n\nCleanup\nExtends \"Cleanup\" in Mail::Box::Dir.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Box\n",
                "subsections": []
            },
            "DETAILS": {
                "content": "The explanation is complicated, but for normal use you should bother\nyourself with all details.\n\nExtends \"DETAILS\" in Mail::Box::Dir.\n\nDifferent kinds of folders\nExtends \"Different kinds of folders\" in Mail::Box::Dir.\n\nAvailable folder types\nExtends \"Available folder types\" in Mail::Box::Dir.\n\nFolder class implementation\nExtends \"Folder class implementation\" in Mail::Box::Dir.\n\nHow MAILDIR folders work\nMaildir-type folders use a directory to store the messages of one\nfolder.  Each message is stored in a separate file.  This seems useful,\nbecause changes in a folder change only a few of these small files, in\ncontrast with file-based folders where changes in a folder cause\nrewrites of huge folder-files.\n\nHowever, Maildir based folders perform very bad if you need header\ninformation of all messages.  For instance, if you want to have full\nknowledge about all message-threads (see Mail::Box::Thread::Manager) in\nthe folder, it requires to read all header lines in all message files.\nAnd usually, reading your messages as threads is desired.  Maildir\nmaintains a tiny amount of info visible in the filename, which may make\nit perform just a little bit faster than MH.\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "Error: Cannot append Maildir message in $new to folder $self.\nThe message (or messages) could not be stored in the right\ndirectories for the Maildir folder.\n\nError: Cannot create Maildir directory $dir: $!\nA Maildir folder is represented by a directory, with some sub-\ndirectories.  The top folder directory could not be created for the\nreason indicated.\n\nError: Cannot create Maildir folder $name.\nOne or more of the directories required to administer a Maildir\nfolder could not be created.\n\nError: Cannot create Maildir message file $new.\nA message is converted from some other message format into a\nMaildir format by writing it to a file with a name which contains\nthe status flags of the message.  Apparently, creating this file\nfailed.\n\nError: Cannot create Maildir subdir $dir: $!\nEach Maildir folder has three sub-directories for administration:\n\"new\", \"tmp\", and \"cur\".  The mentioned directory could not be\ncreated for the indicated reason.\n\nWarning: Changes not written to read-only folder $self.\nYou have opened the folder read-only --which is the default set by\nnew(access)--, made modifications, and now want to close it.  Set\nclose(force) if you want to overrule the access mode, or close the\nfolder with close(write) set to \"NEVER\".\n\nError: Copying failed for one message.\nFor some reason, for instance disc full, removed by external\nprocess, or read-protection, it is impossible to copy one of the\nmessages.  Copying will proceed for the other messages.\n\nError: Destination folder $name is not writable.\nThe folder where the messages are copied to is not opened with\nwrite access (see new(access)).  This has no relation with write\npermission to the folder which is controlled by your operating\nsystem.\n\nWarning: Different messages with id $msgid\nThe message id is discovered more than once within the same folder,\nbut the content of the message seems to be different.  This should\nnot be possible: each message must be unique.\n\nError: Folder $name is opened read-only\nYou can not write to this folder unless you have opened the folder\nto write or append with new(access), or the \"force\" option is set\ntrue.\n\nError: Folder $name not deleted: not writable.\nThe folder must be opened with write access via new(access),\notherwise removing it will be refused.  So, you may have write-\naccess according to the operating system, but that will not\nautomatically mean that this \"delete\" method permits you to.  The\nreverse remark is valid as well.\n\nError: Invalid timespan '$timespan' specified.\nThe string does not follow the strict rules of the time span syntax\nwhich is permitted as parameter.\n\nWarning: Message-id '$msgid' does not contain a domain.\nAccording to the RFCs, message-ids need to contain a unique random\npart, then an \"@\", and then a domain name.  This is made to avoid\nthe creation of two messages with the same id.  The warning emerges\nwhen the \"@\" is missing from the string.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does\nnot implement this method where it should. This message means that\nsome other related classes do implement this method however the\nclass at hand does not.  Probably you should investigate this and\nprobably inform the author of the package.\n\nError: Unable to create subfolder $name of $folder.\nThe copy includes the subfolders, but for some reason it was not\npossible to copy one of these.  Copying will proceed for all other\nsub-folders.\n\nError: Writing folder $name failed\nFor some reason (you probably got more error messages about this\nproblem) it is impossible to write the folder, although you should\nbecause there were changes made.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of Mail-Box distribution version 3.009, built on\nAugust 18, 2020. Website: http://perl.overmeer.net/CPAN/\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see\nChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.  See http://dev.perl.org/licenses/\n\nperl v5.30.3                      2020-08-20           Mail::Box::Maildir(3pm)",
                "subsections": []
            }
        }
    }
}