configuration_changes_needed_when_using_maildir
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
configuration_changes_needed_when_using_maildir [2024/09/01 07:00] – ‘'' hc9 | configuration_changes_needed_when_using_maildir [2024/09/02 23:15] (current) – ' hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Configuration Changes Needed When Using Maildir ====== | ||
+ | |||
+ | If you forward your mail from the SDF cluster using a forward as described in the [[http:// | ||
+ | |||
+ | <file config environment variables> | ||
+ | ORGMAIL=/ | ||
+ | MAILDIR=/ | ||
+ | PATH=/ | ||
+ | </ | ||
+ | |||
+ | <file config environment variables> | ||
+ | :0 | ||
+ | .inbox/ | ||
+ | </ | ||
+ | |||
+ | The above will send all mail by default to the directory ‘'' | ||
+ | |||
+ | Here is a .forward that works with procmail on the MetaArray: | ||
+ | |||
+ | <file config .forward example> | ||
+ | "|exec / | ||
+ | </ | ||
+ | |||
+ | Again, replace USERNAME as appropriate. | ||
+ | |||
+ | If you use mutt, your .muttrc will need to be updated. Here is a minimal maildir config you can incorporate into an existing .muttrc. Note the two ‘'' | ||
+ | |||
+ | <file config .muttrc/ | ||
+ | #set spoolfile="/ | ||
+ | set spoolfile=" | ||
+ | set folder=" | ||
+ | set mbox_type = Maildir | ||
+ | set mask=" | ||
+ | set record=" | ||
+ | set postponed=" | ||
+ | </ | ||
+ | |||
+ | <file config .muttrc/ | ||
+ | mailboxes `echo -n "+ "; find ~/Maildir -maxdepth 1 -type d -name " | ||
+ | macro index c "< | ||
+ | macro pager c "< | ||
+ | macro index C "< | ||
+ | macro index M "< | ||
+ | </ | ||
+ | |||
+ | The changes to the mailboxes command and c/C/M macros allow mutt to work with maildir folders, even if the folder names change at some point. | ||
+ | |||
+ | ===== Converting Mbox to Maildir ===== | ||
+ | |||
+ | If you want to convert your existing mbox-style mailboxes to maildir format, you can use ‘'' | ||
+ | |||
+ | '' | ||
+ | |||
+ | The maildir directory will be created if it does not exist. As an example, let's say I have copied the mbox file for the gopher mailing list from iceland to ma, and copied it to ~/ | ||
+ | |||
+ | < | ||
+ | mbox2maildir ~/ | ||
+ | </ | ||
+ | |||
+ | Once run (no errors should be displayed), you can verify the contents of the new maildir directory: | ||
+ | |||
+ | < | ||
+ | slugmax@ma: | ||
+ | total 40 | ||
+ | drwx------ 5 slugmax arpa 4096 May 14 14:16 . | ||
+ | drwx------ 5 slugmax arpa 4096 May 14 14:16 .. | ||
+ | drwx------ 2 slugmax arpa 24576 May 14 14:16 cur | ||
+ | drwx------ 2 slugmax arpa 4096 May 14 14:16 new | ||
+ | drwx------ 2 slugmax arpa 4096 May 14 14:16 tmp | ||
+ | slugmax@ma: | ||
+ | total 3472 | ||
+ | drwx------ 2 slugmax arpa 24576 May 14 14:16 . | ||
+ | drwx------ 5 slugmax arpa 4096 May 14 14:16 .. | ||
+ | -rw------- 1 slugmax arpa 3452 May 14 14:16 1337019395.6264.mbox: | ||
+ | -rw------- 1 slugmax arpa 5131 May 14 14:16 1337019396.6264.mbox: | ||
+ | -rw------- 1 slugmax arpa 4094 May 14 14:16 1337019397.6264.mbox: | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | You can see that mbox2maildir has converted each message in the mbox file to its own file and placed each in the maildir-standard ‘cur’ sub-directory. | ||
+ | |||
+ | ===== Converting Maildir to Mbox ===== | ||
+ | |||
+ | As you might guess, converting maildir-format folders to mbox is done by the ‘maildir2mbox’ utility. It operates using environment variables, not command line options, so to be clear it might be best to specify them with the command: | ||
+ | |||
+ | < | ||
+ | MAILDIR=~/ | ||
+ | </ | ||
+ | |||
+ | Note that the file specified by MAILTMP and the one specified by MAIL must be on the same filesystem. When this command is run, you should see the ~/ | ||
+ | |||
+ | < | ||
+ | slugmax@ma: | ||
+ | -rw------- 1 slugmax arpa 2680127 May 14 14:34 / | ||
+ | slugmax@ma: | ||
+ | </ | ||
+ | |||
+ | $Id: maildir.html, | ||