NAME mailfs - EXTendedFS for Berkeley style mailbox files (possibly compressed) SYNOPSIS To get a list of a mailfs: mailfs list path_to_mailbox_file To copy selected letters from mailfs: mailfs copyout path_to_mailbox_file pattern output_file_name DESCRIPTION mailfs is able to decode automatically attaches of a mail message from Base64, UUE and QuotedPrinttable transfer encoding. mailfs uses the following environment variables: MAILFS_HOME Home dir with code pages aliases. '~/.mc' is used by default. Directory should have the 'CP' name. MAILFS_GROUP_BY Rules for group mail messages. Default value is 'from'. Variable MAILFS_GROUP_BY may accept the next values: subject - group by subject from - group by from_mail_addr to - group by to_mail_addr date - group by date ... and any fields from mail headers... ( status, content-type, ... ) Example: [gosha@alisa tmp]$ export MAILFS_GROUP_BY='from,content-type-type' or [gosha@alisa tmp]$ export MAILFS_GROUP_BY='from,content-type-charset' If you have Unicode::Map8 perl module installed, then you are able to use converting Internationals chars. For example: Russians use the following code pages: koi8-r, cp1251, cp866,... _ LC_CTYPE _ is ru_RU.KOI8-R, and you get the mail message with an attached cp1251-coded text file. `mailfs` will convert the attaches to koi8-r code page. To make it working, you need the file, '${MAILFS_HOME}/CP/ru_ru.koi8-r', with the next strings: $CHARS_ALIAS = { 'ru_ru.koi8-r' => 'koi8-r', 'cp1251' => 'cp1251', 'windows-1251' => 'cp1251', 'windows1251' => 'cp1251', 'windows' => 'cp1251', 'win-1251' => 'cp1251', 'win1251' => 'cp1251', 'win' => 'cp1251' 'koi8r' => 'koi8-r', 'koi8-r' => 'koi8-r', 'cp866' => 'cp866', 'ibm866' => 'cp866' } that's all... EXAMPLE Set the $MAILFS_GROUP_BY to 'date,from' and the command is 'list', then mailfs will print next strings: ... /2002_11_23/gosha@alisa.prv.nnov.ru-001/attach1 /2002_11_23/gosha@alisa.prv.nnov.ru-001/attach2 /2002_11_23/gosha@alisa.prv.nnov.ru-001/FULL_MASSAGE /2002_11_23/gosha@alisa.prv.nnov.ru-001/ATTACH_DESCRIPTION /2002_11_24/apache@alisa.prv.nnov.ru-002 ... Set the $MAILFS_GROUP_BY to 'content-type-type' and the command is 'list', then mailfs will print next strings: ... /MULTIPART_MIXED-001/attach1 /MULTIPART_MIXED-001/attach2 /MULTIPART_MIXED-001/FULL_MASSAGE /MULTIPART_MIXED-001/ATTACH_DESCRIPTION /text_plain-002 ... etc... AUTHOR Okunev Igor V. mailto:igor@prv.mts-nn.ru http://www.mts-nn.ru/~gosha