{"id":169,"date":"2013-12-04T06:27:36","date_gmt":"2013-12-04T06:27:36","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=169"},"modified":"2016-01-28T11:40:38","modified_gmt":"2016-01-28T11:40:38","slug":"converting-mbox-to-maildir","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/converting-mbox-to-maildir.html","title":{"rendered":"Converting mbox to maildir"},"content":{"rendered":"<p>mbox and maildir both are popularly used techniques to store mails. The simple way to understand the difference is, mbox uses a single directory to store all mails while maildir would utilize a directory structure to store mails. Most of the cases, advance mail receiving techniques IMAP over POP3 uses these sort of folder based concept to provide enhancement in mail organizing.<\/p>\n<p>If you are having a POP3 account using mbox, you can use an open source tool called mb2md to convert it to maildir.<\/p>\n<p>Full reference and how to use the tool is available here:<br \/>\n<a href=\"http:\/\/batleth.sapienti-sat.org\/projects\/mb2md\/\">http:\/\/batleth.sapienti-sat.org\/projects\/mb2md\/<\/a><\/p>\n<p><strong>How to convert mbox to maildir using mb2md?<\/strong><\/p>\n<p>First download the mb2md script from the developer<\/p>\n<p><code>$ wget\u00a0http:\/\/batleth.sapienti-sat.org\/projects\/mb2md\/mb2md-3.20.pl.gz<br \/>\n$ gzip -d mb2md-3.20.pl.gz<br \/>\n$ chmod 755 mb2md-3.20.pl<\/code><\/p>\n<p>Now, converting is simple. Use as following:<\/p>\n<p><code>$ mb2md-3.20.pl -s \/locationofmbox -R -d \/destinationofmaildir<\/code><\/p>\n<p>-s defines the source of the mbox, the location would depend on the type of environment you are using.<br \/>\n-R defines recursively do for all subdirectories<br \/>\n-d defines the destination of maildirectory inbox.<\/p>\n<p><strong>How to convert mbox to maildir in a directadmin instance manually?<\/strong><\/p>\n<p>For Example, if you are using Directadmin control panel, the mbox spool is located under\u00a0\/var\/spool\/virtual\/domain.com\/user. You would want to run something like this to convert the mbox into maildir in a directadmin control panel:<\/p>\n<p><code>$ mb2md-3.20.pl -s \/var\/spool\/virtual\/domain.com\/user -R -d\u00a0\/home\/username\/imap\/domain.com\/user\/Maildir<br \/>\n$ chown -Rf username:mail \/home\/username\/imap\/domain.com\/user\/Maildir<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>mbox and maildir both are popularly used techniques to store mails. The simple way to understand the difference is, mbox uses a single directory to store all mails while maildir would utilize a directory structure to store mails. Most of the cases, advance mail receiving techniques IMAP over POP3 uses these sort of folder based &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/converting-mbox-to-maildir.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Converting mbox to maildir&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,12,21,25],"tags":[],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/169"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":263,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/169\/revisions\/263"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}