{"id":163,"date":"2023-11-29T01:41:19","date_gmt":"2023-11-28T16:41:19","guid":{"rendered":"https:\/\/www.aisoit.com\/?p=163"},"modified":"2023-11-29T01:55:17","modified_gmt":"2023-11-28T16:55:17","slug":"setup-mail-sever-on-raspberry-pi-4","status":"publish","type":"post","link":"https:\/\/www.aisoit.com\/?p=163","title":{"rendered":"Setup Mail Sever on  raspberry pi 4"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. ref<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;docs.iredmail.org\/install.iredmail.on.debian.ubuntu.html\nhttps:\/\/github.com\/iredmail\/iRedMail\n<iframe loading=\"lazy\" title=\"How to Setup Your Own iRedMail Email Server\" width=\"525\" height=\"295\" src=\"https:\/\/www.youtube.com\/embed\/f2bjkZWpn7s?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n\nDomain-based Message Authentication, Reporting, and Conformance (DMARC)\n    https:\/\/datatracker.ietf.org\/doc\/html\/rfc7489\nSetup DNS records for your iRedMail server (A, PTR, MX, SPF, DKIM, DMARC)\n    https:\/\/docs.iredmail.org\/setup.dns.html<\/code><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><h3>1.1 System Requirements<\/h3>\n<\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>ubuntu 22.04\n4 GB\nPort 25 is required by mail server, but many ISPs block it by default.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2.1 prepare<\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"sudo apt-get install -y gzip dialog\nsudo vim \/etc\/hosts\nsudo hostnamectl set-hostname mx.aisoit.com\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">apt-get<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-y<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">gzip<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">dialog<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">vim<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\/etc\/hosts<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sudo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">hostnamectl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">set-hostname<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">mx.aisoit.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2.1.2 prepare outbound port<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>25\n587\n110\n\n995\n143\n993<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.1.3 prepare dns<\/h3>\n\n\n\n<p>mx.aisoit.com 113.149.218.254<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.1.4 prepare ssl<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo snap install --classic certbot\nsudo certbot certonly --webroot -w \/var\/www\/html -d mx.aisoit.com\n    Certificate is saved at: \/etc\/letsencrypt\/live\/mx.aisoit.com\/fullchain.pem\n    Key is saved at:         \/etc\/letsencrypt\/live\/mx.aisoit.com\/privkey.pem<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 install<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"    tar xf iRedMail-1.6.7.tar.gz\n    cd iRedMail-1.6.7\n    bash iRedMail.sh\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">tar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">xf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">iRedMail-1.6.7.tar.gz<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">cd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">iRedMail-1.6.7<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">bash<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">iRedMail.sh<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2.2.2 setup password <\/h3>\n\n\n\n<p>for mysql , and for postman<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.2.3 ssl config error<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n<div class=\"likebtn_container\" style=\"\"><!-- LikeBtn.com BEGIN --><span class=\"likebtn-wrapper\"  data-identifier=\"post_163\"  data-site_id=\"65cb32bb943ec9f6275ac6aa\"  data-style=\"\"  data-unlike_allowed=\"\"  data-show_copyright=\"\"  data-item_url=\"https:\/\/www.aisoit.com\/?p=163\"  data-item_title=\"Setup Mail Sever on raspberry pi 4\"  data-item_date=\"2023-11-29T01:41:19+09:00\"  data-engine=\"WordPress\"  data-plugin_v=\"2.6.58\"  data-prx=\"https:\/\/www.aisoit.com\/wp-admin\/admin-ajax.php?action=likebtn_prx\"  data-event_handler=\"likebtn_eh\" ><\/span><!-- LikeBtn.com END --><\/div>","protected":false},"excerpt":{"rendered":"<p>1. ref 2.1 prepare 2.1.2 prepare outbound port 2.1.3 prepare dns mx.aisoit.com 113.149.218.254 2.1.4 prepare ssl 2.2 install 2.2.2 setup password for mysql , and for postman 2.2.3 ssl config error<\/p>\n<div class=\"likebtn_container\" style=\"\"><!-- LikeBtn.com BEGIN --><span class=\"likebtn-wrapper\"  data-identifier=\"post_163\"  data-site_id=\"65cb32bb943ec9f6275ac6aa\"  data-style=\"\"  data-unlike_allowed=\"\"  data-show_copyright=\"\"  data-item_url=\"https:\/\/www.aisoit.com\/?p=163\"  data-item_title=\"Setup Mail Sever on raspberry pi 4\"  data-item_date=\"2023-11-29T01:41:19+09:00\"  data-engine=\"WordPress\"  data-plugin_v=\"2.6.58\"  data-prx=\"https:\/\/www.aisoit.com\/wp-admin\/admin-ajax.php?action=likebtn_prx\"  data-event_handler=\"likebtn_eh\" ><\/span><!-- LikeBtn.com END --><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","hentry","category-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163"}],"version-history":[{"count":9,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=\/wp\/v2\/posts\/163\/revisions\/174"}],"wp:attachment":[{"href":"https:\/\/www.aisoit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aisoit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}