{"id":381,"date":"2018-08-30T16:27:10","date_gmt":"2018-08-30T08:27:10","guid":{"rendered":"http:\/\/blog.lovexu.cc\/?p=381"},"modified":"2018-08-30T16:27:10","modified_gmt":"2018-08-30T08:27:10","slug":"postfix%e9%82%ae%e4%bb%b6%e7%b3%bb%e7%bb%9f%e4%b9%8bmbox%e4%b8%8emaildir","status":"publish","type":"post","link":"https:\/\/lox.im\/index.php\/381.html","title":{"rendered":"postfix\u90ae\u4ef6\u7cfb\u7edf\u4e4bmbox\u4e0emaildir"},"content":{"rendered":"<p>\u5728linux\u4e0b\u7684\u90ae\u4ef6\u4e00\u822c\u6709\u4e24\u79cd\u5f62\u5f0f\uff0c\u4e00\u79cd\u662fmbox\u5f62\u5f0f\uff0c\u4e00\u79cd\u662fmaildir\u5f62\u5f0f\uff0cmbox\u662f\u4ee5\u4e00\u4e2atxt\u6587\u4ef6\u7684\u5f62\u5f0f\u5b58\u50a8\u7528\u6237\u7684\u90ae\u4ef6\uff0c\u800cmaildir\u662f\u4ee5\u4e00\u4e2a\u76ee\u5f55\u7684\u5f62\u5f0f\uff0c\u76ee\u5f55\u4e0b\u53c8\u5206\u6210tmp,cur,new\u4e09\u4e2a\u76ee\u5f55\uff0c\u7528\u6237\u5199\u90ae\u4ef6\u3001\u53d1\u9001\u90ae\u4ef6\u3001\u63a5\u6536\u90ae\u4ef6\u5c06\u4f7f\u7528\u4e0d\u540c\u7684\u76ee\u5f55\u3002\u5173\u4e8embox\u4e0emaildir\u7684\u533a\u522b\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u6587\u7ae0\uff1a<\/p>\n<p>http:\/\/www.linuxmail.info\/mbox-maildir-mail-storage-formats\/<\/p>\n<p>postfix\u3001dovecot\u3001courier\u652f\u6301\u4e24\u79cd\u65b9\u5f0f\uff0c\u800copenwebmail\u53ea\u8fd0\u884cmbox\u65b9\u5f0f\u3002postfix\u9ed8\u8ba4\u7684\u662fmbox\u65b9\u5f0f\uff0c\u8981\u60f3\u4fee\u6539\u4e3amaildir\uff0c\u53ef\u4ee5\u6309\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p>1\u3001\u4fee\u6539\/etc\/courier\/imapd\uff0c\u6700\u540e\u4e00\u884c\u4fee\u6539\u4e3aMAILDIRPATH=Maildir\/<\/p>\n<p>2\u3001\u4fee\u6539\/etc\/postfix\/main.cf\uff0c\u627e\u5230\u4ee5\u4e0b\u884c<\/p>\n<p>mailbox_command = procmail -a \"$EXTENSION\"<\/p>\n<p>\u4fee\u6539\u4e3a<\/p>\n<p>mailbox_command = procmail -a \"$EXTENSION\" DEFAULT=$HOME\/Maildir\/ MAILDIR=$HOME\/Maildir \uff08\u4e3a\u4e00\u884c\uff09<\/p>\n<p>3\u3001\u91cd\u542fcourier\u3001postfix\u670d\u52a1<\/p>\n<p>service courier restart \u6216\u8005 \/etc\/init,d\/courier-imap restart<\/p>\n<p>service postfix restart \u6216\u8005 \/etc\/init.d\/postfix restart<\/p>\n<p>ps\uff1a maildir\u65b9\u5f0f\u9ed8\u8ba4\u4f1a\u5728\u6536\u5230\u7b2c\u4e00\u5c01\u90ae\u4ef6\u65f6\u81ea\u52a8\u5728\/home\/USER\/\u4e0b\u65b0\u5efaMaildir\u76ee\u5f55\uff0c\u53ca\u76ee\u5f55\u4e0b\u7684cur, new, tmp\u76ee\u5f55\u3002 \u5982\u679c\u60f3\u624b\u52a8\u521b\u5efa\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u65b9\u5f0f<\/p>\n<p># cd \/home\/User<br \/>\n# maildirmake Maildir<br \/>\n# chown -R User:User Maildir<br \/>\n# chmod -R 750 Maildir<\/p>\n<p>\u6b65\u9aa42\u53ef\u53c2\u8003\u4ee5\u4e0b\uff1a<\/p>\n<p>If you are using the built in delivery agent you should put this into \/etc\/postfix\/main.cf:<\/p>\n<p>home_mailbox = Maildir\/<\/p>\n<p>If you are using procmail as your delivery agent, you should put this into \/etc\/postfix\/main.cf (it is all one line):<\/p>\n<p>mailbox_command = \/usr\/bin\/procmail -a \"$EXTENSION\" DEFAULT=$HOME\/Maildir\/ MAILDIR=$HOME\/Maildir<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728linux\u4e0b\u7684\u90ae\u4ef6\u4e00\u822c\u6709\u4e24\u79cd\u5f62\u5f0f\uff0c\u4e00\u79cd\u662fmbox\u5f62\u5f0f\uff0c\u4e00\u79cd\u662fmaildir\u5f62\u5f0f\uff0cmbox\u662f\u4ee5\u4e00\u4e2atxt\u6587\u4ef6\u7684\u5f62\u5f0f\u5b58\u50a8\u7528\u6237\u7684\u90ae\u4ef6\uff0c &#8230;<\/p>\n","protected":false},"author":1,"featured_media":361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4],"tags":[25],"class_list":["post-381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","tag-postfix"],"_links":{"self":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":0,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media\/361"}],"wp:attachment":[{"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lox.im\/index.php\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}