瀏覽代碼

0779: Running Docker Mail Server - A Full Stack Email Solution - In Docker

i12bretro 2 年之前
父節點
當前提交
b754996223
共有 1 個文件被更改,包括 87 次插入0 次删除
  1. 87 0
      0779.html

+ 87 - 0
0779.html

@@ -0,0 +1,87 @@
+    <!DOCTYPE html>
+    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+      <head>
+        <title>Running Docker Mail Server - A Full Stack Email Solution - In Docker</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="UTF-8">
+        <meta name="keywords" content="Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Docker,E-Mail,E-Mail Server,Free And Easy SMTP Server,Free E-Mail Server,Ubuntu,System Administrator,SMTP,Linux,Mail Server,Local E-Mail,Email,System Administration,Docker Based E-Mail Server,How To Install Docker Mailserver,Docker Mailserver,How To,Tutorial,i12bretro">
+        <meta name="author" content="i12bretro">
+        <meta name="description" content="Running Docker Mail Server - A Full Stack Email Solution - In Docker">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="revised" content="08/10/2022 06:22:54 AM" />
+				          <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
+				  <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
+				        <script type="text/javascript" src="includes/js/steps.js"></script>
+        <link href="css/steps.css" rel="stylesheet" type="text/css" />
+      </head>
+      <body>
+        <div id="gridContainer">
+          <div class="topMargin"></div>
+          <div id="listName" class="topMargin">
+            <h1>Running Docker Mail Server - A Full Stack Email Solution - In Docker</h1>
+          </div>
+          <div></div>
+          <div id="content">
+          <h2>What is Docker Mailserver?</h2>
+
+<blockquote>[Docker Mailserver is a] production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.). Only configuration files, no SQL database. Keep it simple and versioned. Easy to deploy and upgrade.<i> - <a href="https://github.com/docker-mailserver/docker-mailserver" target="_blank">https://github.com/docker-mailserver/docker-mailserver</a></i></blockquote>
+
+<h2>Installing Docker</h2>
+
+<ol>
+	<li>Log into the Linux host and run the following commands in a terminal window
+	<div class="codeBlock"># update software repositories<br />
+	sudo apt update<br />
+	# install prerequisites<br />
+	sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
+	# add docker gpg key<br />
+	curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
+	# add docker software repository<br />
+	sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
+	# install docker<br />
+	sudo apt install docker-ce docker-compose containerd.io -y<br />
+	# enable and start docker service<br />
+	sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
+	# add the current user to the docker group<br />
+	sudo usermod -aG docker $USER<br />
+	# reauthenticate for the new group membership to take effect<br />
+	su - $USER</div>
+	</li>
+</ol>
+
+<h2>Running Docker Mailserver Container</h2>
+
+<ol>
+	<li>Continue with the following commands in a terminal window
+	<div class="codeBlock"># create main working directories<br />
+	mkdir ~/docker/mailserver/{data,state,logs,config} -p<br />
+	# set owner of working directories<br />
+	sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
+	# run the mailserver container<br />
+	docker run -d --name=mailserver --hostname=&quot;$HOSTNAME&quot; --domainname=&quot;docker.local&quot; -p 25:25 -p 143:143 -p 587:587 -p 993:993 -e ENABLE_SPAMASSASSIN=1 -e SPAMASSASSIN_SPAM_TO_INBOX=1 -e ENABLE_CLAMAV=1 -e ENABLE_POSTGREY=1 -e ENABLE_FAIL2BAN=0 -e ENABLE_SASLAUTHD=0 -e ONE_DIR=1 -e TZ=America/New_York -v ~/docker/mailserver/data/:/var/mail/ -v ~/docker/mailserver/state/:/var/mail-state/ -v ~/docker/mailserver/logs/:/var/log/mail/ -v ~/docker/mailserver/config/:/tmp/docker-mailserver/ --restart=unless-stopped mailserver/docker-mailserver<br />
+	# create a user/inbox<br />
+	docker run --rm -e MAIL_USER=i12bretro@docker.local -e MAIL_PASS=supersecret -it mailserver/docker-mailserver /bin/sh -c &#39;echo &quot;$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)&quot;&#39; &gt;&gt; ~/docker/mailserver/config/postfix-accounts.cf</div>
+	</li>
+</ol>
+
+<h2>Setting Up An E-Mail Client</h2>
+
+<ol>
+	<li>Download Mozilla Thunderbird Portable <a href="https://portableapps.com/apps/internet/thunderbird_portable" target="_blank">Download</a></li>
+	<li>Run the downloaded paf.exe file and extract it to any location</li>
+	<li>Check the Run box and click Finish</li>
+	<li>Fill out Your name, Email address and Password for the account created earlier</li>
+	<li>Click Manual config</li>
+	<li>For Incoming, enter the DNS name or IP address of the docker host</li>
+	<li>For Outgoing, enter the DNS name or IP address of the docker host</li>
+	<li>Click the Re-test button, Thunderbird should set some additional values</li>
+	<li>Click Done</li>
+	<li>Select I understand the risks &gt; Done</li>
+	<li>From within Thunderbird, compose a new email address and send it to the inbox created earlier to test internal emails are working</li>
+</ol>
+
+<p>Documentation: <a href="https://docker-mailserver.github.io/docker-mailserver/edge/" target="_blank">https://docker-mailserver.github.io/docker-mailserver/edge/</a></p>          </div>
+        </div>
+      </body>
+    </html>
+