Mail::Folder::Maildir - A maildir folder interface for Mail::Folder.
WARNING: This code is in alpha release. Expect the interface to change.
use Mail::Folder::Maildir;
This module provides an interface to the maildir folder mechanism.
The maildir folder format is the preferred folder mechanism for the qmail mail transport agent. It uses directories as folders and files as messages. It also provides separate directories for new and current messages. One of the most distinguishing features of the maildir format is that it accomplishes it's job without the need for file locking, so it's better equipped to deal with things like nfs mounts and the like.
maildir
More information about qmail is available from http://pobox.com/~djb/qmail.html.
http://pobox.com/~djb/qmail.html
Populates the Mail::Folder object with information about the folder.
Mail::Folder
Call the superclass open method.
open
Make sure it is a valid maildir folder.
Detect whether the folder is readonly.
Clean the folder tmp directory.
tmp
Move message in folder new directory into the cur directory.
new
cur
Clean up the folder tmp directory.
Moves message file in new directory to the cur directory.
For every message in the folder, add a new message number to the list of messages in the object, and remember the association between the message number and the message filename.
Set current_message to 1 (ugh).
current_message
Deletes the working copy of the folder and calls the superclass close method.
close
Call the superclass sync method.
sync
Scan for new messages and absorb them.
If the folder is not readonly, expunge messages marked for deletion.
Update the :info portion of each file in the folder.
:info
Return the quantity of new messages found.
Calls the superclass pack method. Reassociates the filenames in the folders to message numbers, deleting holes in the sequence of message numbers.
pack
Call the superclass get_message method.
get_message
Retrieves the contents of the file pointed to by $msg_number into a Mail::Internet object reference, caches the header, marks the message as 'seen' and returns the reference.
$msg_number
seen
Call the superclass get_message_file method.
get_message_file
Retrieves the given mail message file pointed to by $msg_number and returns the name of the file.
If the particular header has never been retrieved then get_header loads the header of the given mail message into a member of $self->{Messages}{$msg_number} and returns the object reference
get_header
$self->{Messages}{$msg_number}
If the header for the given mail message has already been retrieved in a prior call to get_header, then the cached entry is returned.
Calls the superclass append_message method.
append_message
Writes a temporary copy of the message in $mref to the folder tmp directory, then moves that temporary copy into the folder cur directory.
$mref
It will delete the From_ line in the header if one is present.
From_
Calls the superclass update_message method.
update_message
Writes a temporary copy of the message in $mref to the folder tmp directory, then moves that temporary copy into the folder cur directory, replacing the message pointed to by $msg_number.
Returns 1 if the folder is a directory and contains tmp, cur, and new subdirectories otherwise returns 0.
1
0
Creates a new folder named $foldername. Returns 0 if the folder already exists, otherwise returns 1.
$foldername
Kevin Johnson <kjj@pobox.com>
Copyright (c) 1996-1998 Kevin Johnson <kjj@pobox.com>.
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
To install Mail::Folder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Folder
CPAN shell
perl -MCPAN -e shell install Mail::Folder
For more information on module installation, please visit the detailed CPAN module installation guide.