You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

959 lines
46 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Lednerb">
<meta name="description" content="Bilberry Premium Theme for Hugo.">
<meta name="keywords" content="blog,personal,responsive,search,font awesome,pages,posts,multilingual,highlight.js,syntax highlighting,premium,shortcuts">
<meta name="generator" content="Hugo 0.50" />
<title> [筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記 | My cool new Blog</title>
<meta name="description" content="[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記 - Bilberry Premium Theme for Hugo.">
<meta itemprop="name" content="[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記">
<meta itemprop="description" content="[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記 - Bilberry Premium Theme for Hugo.">
<meta property="og:title" content="[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記">
<meta property="og:description" content="[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記 - Bilberry Premium Theme for Hugo.">
<meta property="og:image" content="https://www.gravatar.com/avatar/88188b6cc451928eba90e8400bc68086?size=200">
<meta property="og:url" content="https://h.cowbay.org/article/e7-ad-86-e8-a8-98-centos-6-6-iredmail-0-9-4-e5-ae-89-e8-a3-9d-e7-ad-86-e8-a8-98/">
<meta property="og:site_name" content="My cool new Blog">
<meta property="og:type" content="article">
<link rel="icon" type="image/png" href="https://h.cowbay.org/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://h.cowbay.org/favicon-16x16.png" sizes="16x16">
<link rel="stylesheet" href="https://h.cowbay.org/sass/combined.min.717098cb5503581e75f12e486a847ca410bf8367d4d8713f4c37affc868c5a1d.css">
</head>
<body class="bilberry-hugo-theme">
<nav>
<div class="container">
<ul class="topnav">
<li><a href="/page/about-bilberry/">About Bilberry</a></li>
<li><a href="https://github.com/Lednerb/bilberry-hugo-theme" target="_blank">Github</a></li>
</ul>
<div id="search-box" class="search">
<i class="fa fa-search"></i>
<input id="search" type="text" placeholder="Search ...">
</div>
</div>
</nav>
<header>
<div class="container">
<div class="logo">
<a href="/" class="logo">
<img src="https://www.gravatar.com/avatar/88188b6cc451928eba90e8400bc68086?d=mm&size=200" alt="">
<span class="overlay"><i class="fa fa-home"></i></span>
</a>
</div>
<div class="titles">
<h3 class="title"><a href="/">My cool new Blog</a></h3>
<span class="subtitle">Hello World! This is the most epic subtitle ever.</span>
</div>
<div class="languages">
<a href="/en" class="active">en</a>
<a href="/de">de</a>
</div>
<div class="toggler">
<i class="fa fa-bars" aria-hidden="true"></i>
</div>
</div>
</header>
<div class="main container">
<div class="article-wrapper u-cf single">
<a class="bubble" href="/article/e7-ad-86-e8-a8-98-centos-6-6-iredmail-0-9-4-e5-ae-89-e8-a3-9d-e7-ad-86-e8-a8-98/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="content">
<h3><a href="/article/e7-ad-86-e8-a8-98-centos-6-6-iredmail-0-9-4-e5-ae-89-e8-a3-9d-e7-ad-86-e8-a8-98/">[筆記] CentOS 6.6 &#43; iRedmail 0.9.4 &#43; postfixadmin 安裝筆記</a></h3>
<div class="meta">
<span class="date moment">2016-01-27</span>
<span class="categories">
<a href="/categories/%E6%9C%AA%E5%88%86%E9%A1%9E">未分類</a>
</span>
</div>
<p><font size="4">系統基礎設定</font></p>
<p><font size="4">Clone from a fresh new install CentOS 6.6 in vmware </font></p>
<p><font size="4">power on</font></p>
<hr />
<p><font size="4">新增DNS 伺服器</font></p>
<p><font size="4">vi /etc/resolv.conf</font></p>
<p><font size="4">刪除內容 新增以下資料 </font></p>
<p><font size="4">nameserver 168.95.1.1</font></p>
<p><font size="4">nameserver 8.8.8.8</font></p>
<p><font size="4">nameserver 8.8.4.4</font></p>
<hr />
<p><font size="4">啟動網路卡</font></p>
<p><font size="4">cp /etc/sysconfig/network-scripts/ifcfg-eth2 /etc/sysconfig/network-scripts/ifcfg-eth3</font></p>
<p><font size="4">vi /etc/sysconfig/network-scripts</font></p>
<p><font size="4">刪除 MAC </font></p>
<p><font size="4">修改底下的設定</font></p>
<p><font size="4">BOOTPROTO=static
IPADDR=192.168.10.220
NETMASK=255.255.255.0</font></p>
<p><font size="4">vi /etc/sysconfig/network</font></p>
<p><font size="4">NETWORKING=yes
HOSTNAME=iredmail
GATEWAY=192.168.10.246
</font></p>
<p><font size="4">service network restart</font></p>
<hr />
<p><font size="4">修改時區</font></p>
<p><font size="4">yum install ntpdate y</font></p>
<p><font size="4">cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime</font></p>
<p><font size="4">ntpdate 192.168.10.243</font></p>
<hr />
<p><font size="4">reboot (讓hostname 生效)</font></p>
<p><font size="4">登入</font></p>
<hr />
<p><font size="4">安裝基本指定</font></p>
<p><font size="4">yum install y wget telnet vim ftp epel-release bind-utils</font></p>
<hr />
<p><font size="4">下載 iredmail 進行安裝</font></p>
<p><font size="4">wget </font><a href="https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.4.tar.bz2"><font size="4">https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.4.tar.bz2</font></a></p>
<p><font size="4">tar xjf iRedMail-0.9.4.tar.bz2</font></p>
<p><font size="4">cd iRedMail-0.9.4</font></p>
<p><font size="4">bash iRedMail.sh</font>
<font size="4"></p>
<hr />
<p></font></p>
<p><font size="4">IredMail Install </font></p>
<p><font size="4">1.mailbox directory , just keep it and next</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-15-59.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-15-59_thumb.png" alt="pietty0327_2016-01-27_09-15-59" title="pietty0327_2016-01-27_09-15-59" /></font></a></p>
<p><font size="4">2.choose web server ( apache here , more familiar)</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-07.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-07_thumb.png" alt="pietty0327_2016-01-27_09-16-07" title="pietty0327_2016-01-27_09-16-07" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">3. backend choose , MySQL / OpenLDAP&nbsp; MySQL Here ( but seems some proble with global address book in SOGo)</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-16.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-16_thumb.png" alt="pietty0327_2016-01-27_09-16-16" title="pietty0327_2016-01-27_09-16-16" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">4. your domain</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-31.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-31_thumb.png" alt="pietty0327_2016-01-27_09-16-31" title="pietty0327_2016-01-27_09-16-31" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">5. your password to mail admin </font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-42.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-42_thumb.png" alt="pietty0327_2016-01-27_09-16-42" title="pietty0327_2016-01-27_09-16-42" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">6.WEBMAIL , Choose SOGo</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-53.png"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/pietty0327_2016-01-27_09-16-53_thumb.png" alt="pietty0327_2016-01-27_09-16-53" title="pietty0327_2016-01-27_09-16-53" /></a></p>
<p>&nbsp;</p>
<p><font size="4">離開這個畫面後,會開始進行安裝,並且詢問一些問題都按 y ,完成後,會產生一個 iRedMail.tips 裡面有帳號、密碼等資訊</font></p>
<p><font size="4">接著安裝 phpmyadmin</font></p>
<p><font size="4">yum install y phpmyadmin</font></p>
<p><font size="4">重開機套用</font></p>
<p><font size="4">reboot</font></p>
<p><font size="4"></font>
<font size="4"></p>
<hr />
<p></font></p>
<p><font size="4">開啟 </font><a href="https://hostname/iredmailadmin"><font size="4">https://hostname/iredmailadmin</font></a></p>
<p><font size="4">建立三個USER做測試用</font></p>
<p><font size="4">登入 </font><a href="https://hostname/SOGo"><font size="4">https://hostname/SOGo</font></a></p>
<p><font size="4">用其中一個帳號登入,收發信件測試 (前提是 DNS 還有防火牆 已經設定好了)</font></p>
<p><font size="4">檢查通訊錄,發現 Global Address Book (公用通訊錄、全域通訊錄) 居然是空的</font></p>
<p><font size="4">關機,再做一台來測試 OpenLDAP (VM真他X的方便)</font></p>
<p><font size="4">shutdown h now</font>
<font size="4"></p>
<hr />
<p></font></p>
<p><font size="4">重複 基礎設定 、下載安裝包、進行安裝改選openLDAP一開始要輸入 dc=abc,dc=org , 再來輸入 abc.org 其他都一樣</font></p>
<p><font size="4">安裝完後,多裝一個 phpldapadmin</font></p>
<p><font size="4">yum install phpldapadmin y</font></p>
<p><font size="4">reboot</font></p>
<hr />
<p><font size="4">開啟 </font><a href="https://hostname/iredmailadmin"><font size="4">https://hostname/iredmailadmin</font></a></p>
<p><font size="4">建立三個USER做測試用</font></p>
<p><font size="4">p.s <strike>等了好久(5分鐘左右吧)才看到頁面,不知道是那邊的問題</strike> (update: 應該是firefox的關係重設後 OK )</font></p>
<p><font size="4"><strike>要檢視憑證也是很久很久..</strike></font></p>
<p><font size="4">登入 </font><a href="https://hostname/SOGo"><font size="4">https://hostname/SOGo</font></a></p>
<p><font size="4">Global Address Book 還是看不到東西</font></p>
<p><font size="4">但是RoundCubeMail 的通訊錄裡面有!!!</font></p>
<p><font size="4">還要再研究看看或者就不要管SOGo了反正RoundCubeMail 本來就比較好看又好用!</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/iexplore_2016-01-27_10-41-02.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/iexplore_2016-01-27_10-41-02_thumb.png" alt="iexplore_2016-01-27_10-41-02" title="iexplore_2016-01-27_10-41-02" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">RoundCubeMail的設定檔在 /var/www/roundcubemail/config/config.inc.php</font></p>
<p><font size="4">有關LDAP ADDRESS BOOK的設定如下</font>
&gt; <font size="4">// Global LDAP address book.
&gt; $config[&lsquo;ldap_public&rsquo;][&ldquo;global_ldap_abook&rdquo;] = array(
&gt; &nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;Global LDAP Address Book&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;hosts&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; array(&lsquo;127.0.0.1&rsquo;),
&gt; &nbsp;&nbsp;&nbsp; &lsquo;port&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; 389,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;use_tls&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;ldap_version&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;3&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;network_timeout&rsquo;&nbsp;&nbsp; =&gt; 10,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;user_specific&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; true,</font>
&gt;
&gt; <font size="4">&nbsp;&nbsp;&nbsp; // Search mail users under same domain.
&gt; &nbsp;&nbsp;&nbsp; &lsquo;base_dn&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;domainName=%d,o=domains,dc=abc,dc=org&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;bind_dn&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; <a href="mailto:">&lsquo;mail=%u@%d,ou=Users,domainName=%d,o=domains,dc=abc,dc=org&rsquo;</a>,</font>
&gt;
&gt; <font size="4">&nbsp;&nbsp;&nbsp; &lsquo;hidden&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;searchonly&rsquo;&nbsp;&nbsp;&nbsp; =&gt; false,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;writable&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,</font>
&gt;
&gt; <font size="4">&nbsp;&nbsp;&nbsp; &lsquo;search_fields&rsquo; =&gt; array(&lsquo;mail&rsquo;, &lsquo;cn&rsquo;, &lsquo;sn&rsquo;, &lsquo;givenName&rsquo;, &lsquo;street&rsquo;, &lsquo;telephoneNumber&rsquo;, &lsquo;mobile&rsquo;, &lsquo;stree&rsquo;, &lsquo;postalCode&rsquo;),
&gt; </font>
&gt;
&gt; <font size="4"></font>&nbsp;</p>
<p><font size="4">底下這是欄位對應</font>
&gt; <font size="4">// mapping of contact fields to directory attributes
&gt; &nbsp; &lsquo;fieldmap&rsquo; =&gt; array(
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;cn&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;surname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;sn&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;firstname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;givenName&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;title&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;title&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail:<em>&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:work&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;telephoneNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:mobile&rsquo;&nbsp; =&gt; &lsquo;mobile&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;street&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;street&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;zipcode&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;postalCode&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;locality&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;l&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;department&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;departmentNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;notes&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;description&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;cn&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;surname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;sn&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;firstname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;givenName&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;title&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;title&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail:</em>&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:work&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;telephoneNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:mobile&rsquo;&nbsp; =&gt; &lsquo;mobile&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:workfax&rsquo; =&gt; &lsquo;facsimileTelephoneNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;street&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;street&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;zipcode&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;postalCode&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;locality&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;l&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;department&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;departmentNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;notes&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;description&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;photo&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;jpegPhoto&rsquo;,
&gt; &nbsp; ),</font></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4"></p>
<hr />
<p></font> <p><strong><font size="4">安裝 PostfixAdmin 取代 iRedMail 預載的陽春管理介面</font></strong></p>
<p><font size="4">wget </font><a href="http://nchc.dl.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.93/postfixadmin-2.93.tar.gz"><font size="4">http://nchc.dl.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-2.93/postfixadmin-2.93.tar.gz</font></a></p>
<p><font size="4">tar zxvf postfixadmin-2.93.tar.gz</font></p>
<p><font size="4">mv postfixadmin-2.93 pfa</font></p>
<p><font size="4">mv pfa /var/www/html</font></p>
<p><font size="4">編輯 httpd 設定</font></p>
<p><font size="4">vim /etc/httpd/conf.d/pfa.conf</font></p>
<p><font size="4">要安全性的再自己修改 allow / deny 順序和限制</font>
&gt; <font size="4">Alias /pfa &ldquo;/var/www/pfa/&rdquo;
&gt; &lt;Directory &ldquo;/var/www/pfa/&rdquo;&gt;
&gt; &nbsp;&nbsp;&nbsp; Order allow,deny
&gt; Allow from all
&gt; &nbsp;&nbsp;&nbsp; Options -Indexes
&gt; &lt;/Directory&gt;</font></p>
<p><font size="4">新增 PostfixAdmin 資料庫</font></p>
<p><font size="4">mysql u root p</font></p>
<p><font size="4">輸入 root 密碼,進入 mysql 介面</font></p>
<p><font size="4">執行以下指令建立一個資料庫叫postfix ,一個使用者帳號 postfix 密碼 postfixadmin 並指定讓使用者postfix可以讀寫 postfix 資料庫</font></p>
<p><font size="4">&nbsp; CREATE DATABASE postfix;
&nbsp; CREATE USER &lsquo;postfix&rsquo;@&lsquo;localhost&rsquo; IDENTIFIED BY &lsquo;postfixadmin&rsquo;;
&nbsp; GRANT ALL PRIVILEGES ON postfix. * TO </font><a href="mailto:"><font size="4">&lsquo;postfix&rsquo;@&lsquo;localhost&rsquo;</font></a><font size="4">;
</font></p>
<p><font size="4">離開mysql 介面</font></p>
<p><font size="4">編輯 postfixadmin 設定檔</font></p>
<p><font size="4">vim /var/www/pfa/config.inc.php</font></p>
<p><font size="4">修改以下設定</font></p>
<p><font size="4"></font>&nbsp;
&gt; <font size="4">$CONF[&lsquo;configured&rsquo;] = true;</font>
&gt;
&gt; <font size="4">$CONF[&lsquo;database_type&rsquo;] = &lsquo;mysqli&rsquo;;
&gt; $CONF[&lsquo;database_user&rsquo;] = &lsquo;postfix&rsquo;;
&gt; $CONF[&lsquo;database_password&rsquo;] = &lsquo;postfixadmin&rsquo;;
&gt; $CONF[&lsquo;database_name&rsquo;] = &lsquo;postfix&rsquo;;</font></p>
<p><font size="4">存檔後離開開啟postfixadmin 安裝頁面</font></p>
<p><a href="http://ip_address/pfa/setup.php"><font size="4">http://ip_address/pfa/setup.php</font></a></p>
<p><font size="4">應該會提示有個目錄要有讀寫權限</font></p>
<p><font size="4">chmod a+rw R /var/www/pfa/templates_c</font></p>
<p><font size="4">重整安裝頁面</font></p>
<p><font size="4">安裝過程其實很簡單</font></p>
<p><font size="4">注意一下密碼安全性原則,不得小於五個字,至少要有三個英文、兩個數字(我是直接拿掉這段,省得麻煩)</font></p>
<p><font size="4">安裝過程中會要求你設定一組安裝密碼,然後系統會產生一組編碼過後的字串</font></p>
<p><font size="4">將這組字串填入 config.inc.php</font></p>
<p><font size="4">vim /var/www/pfa/config.inc.php</font></p>
<p><font size="4">註解掉第一個 setup_password 變數,然後填入剛剛系統產生的編碼字串</font></p>
<p><font size="4">#$CONF[&lsquo;setup_password&rsquo;] = &lsquo;changeme&rsquo;;
$CONF[&lsquo;setup_password&rsquo;] = &lsquo;7d4b2b0def324a8dc0:80e26d5c&rsquo;;</font></p>
<p><font size="4">存檔後離開</font></p>
<p><font size="4">接著在安裝畫面填入你剛剛輸入的密碼「明文」,不是那個字串,而是你剛剛輸入的安裝密碼</font></p>
<p><font size="4">建立一個系統管理者帳號、密碼</font></p>
<p><font size="4">都完成之後,會提示一個連結讓你前往登入,或者自己開啟</font></p>
<p><a href="http://ip_address/pfa/login.php"><font size="4">http://ip_address/pfa/login.php</font></a></p>
<p><font size="4">填入剛剛輸入的管理者帳號(全部,包含 @ 後面的域名) 和密碼,登入管理介面,這邊可以順便改語系,內建有繁體中文( 感動! )</font></p>
<p><font size="4">接著先新建一個網域</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-20-29.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-20-29_thumb.png" alt="firefox_2016-01-28_10-20-29" title="firefox_2016-01-28_10-20-29" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">然後新增幾個使用者進行測試而且postfixadmin 內建就可以建立別名,不用像 iredmail 一樣,要透過 mysql 、openldap 之類的方式去建立!</font></p>
<p><font size="4"></font>&nbsp;</p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-26-18.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-26-18_thumb.png" alt="firefox_2016-01-28_10-26-18" title="firefox_2016-01-28_10-26-18" /></font></a></p>
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">別名的建立畫面</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-27-26.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_10-27-26_thumb.png" alt="firefox_2016-01-28_10-27-26" title="firefox_2016-01-28_10-27-26" /></font></a></p>
<hr />
<p><p><font size="4">Update: 更新歡迎信件無法寄出的錯誤</font></p>
<p><font size="4">經過這樣的修改postfixadmin 預設有一個發送歡迎信件給新帳號的功能會發生錯誤</font></p>
<p><font size="4">maillog 裡面會出現 Sender address rejected: not logged in; 這樣的狀況</font></p>
<p><font size="4">修改postfixadmin的設定</font></p>
<p><font size="4">vim /var/www/pfa/config.inc.php</font></p>
<p><font size="4">修改 admin_email</font></p>
<p><font size="4">$CONF[&lsquo;admin_email&rsquo;] = </font><a href="mailto:"><font size="4">&lsquo;postmaster@iredmail.abc.org&rsquo;</font></a><font size="4">;&nbsp; //本來是 </font><a href="mailto:postmaster@abc.org"><font size="4">postmaster@abc.org</font></a><font size="4"> , 改成 </font><a href="mailto:postmaster@hostname.abc.org"><font size="4">postmaster@hostname.abc.org</font></a></p>
<p><font size="4">測試寄送歡迎信件應該OK了</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_15-41-45.png"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_15-41-45_thumb.png" alt="firefox_2016-01-28_15-41-45" title="firefox_2016-01-28_15-41-45" /></a></p>
<hr />
<p><font size="4"></font>&nbsp;</p>
<p><font size="4">接著登入之前安裝的 roundcubemail 去收發郵件測試正常,</font></p>
<p><font size="4">不過通訊錄還是抓舊的全域通訊錄,應該還是要透過 phpldapadmin 去修改吧在想是不是乾脆不要用這個功能改用現在的方式去AD抓帳號回來好了。</font></p>
<p><font size="4">再到手機上測試之前建立的Exchange 帳號也是正常收發!</font></p>
<p><font size="4">看起來應該大致可以用了!</font></p>
<hr />
<p><font size="4">修正RoundCubeMail 的通訊錄</font> <p><font size="4">用人家寫好的plugin 來新增一個公用通訊錄</font></p>
<p><a href="https://github.com/JohnDoh/Roundcube-Plugin-Global-Address-Book" title="https://github.com/JohnDoh/Roundcube-Plugin-Global-Address-Book"><font size="4">https://github.com/JohnDoh/Roundcube-Plugin-Global-Address-Book</font></a></p>
<p><font size="4">下載並解壓縮到 /var/www/roundcubemail/plugins/globaladdressbook</font></p>
<p><font size="4">在config 裡面啟用</font></p>
<p><font size="4">vim /var/www/roundcubemail/config/config.inc.php</font></p>
<p><font size="4">在 plugins 的地方加入 globaladdressbook</font></p>
<p><font size="4">$config[&lsquo;plugins&rsquo;] = array(&lsquo;managesieve&rsquo;, &lsquo;password&rsquo;,&lsquo;globaladdressbook&rsquo;);</font></p>
<p><font size="4">簡單設定一下</font></p>
<p><font size="4">vim /var/www/roundcubemail/plugins/globaladdressbook/config.inc.php</font></p>
<p><font size="4">設定通訊錄的讀寫權限</font></p>
<p><font size="4">// 0 - global address book is read only
// 1 - users can add, edit and delete contacts (full permissions)
// 2 - users can add but not edit or delete contacts
// 3 - users can add and edit but not delete contacts
</font></p>
<p><font size="4">$config[&lsquo;globaladdressbook_perms&rsquo;] = 3;</font></p>
<p><font size="4">設定誰是這個通訊錄的擁有者,理論上應該設定給管理公用通訊錄的人</font></p>
<p><font size="4">// global address book admin user
// admin user(s) can always add/edit/delete entries, overrides readonly
// either a single username, an array of usernames, or a regular expression, see README for more info
</font></p>
<p><font size="4">$config[&lsquo;globaladdressbook_admin&rsquo;] = null;</font></p>
<p><font size="4">存檔後離開在roundcubemail 的通訊錄中,就可以看到多了一個「公用通訊錄」</font></p>
<p><font size="4">每個使用者都可以看到,以目前的設定來說,每個人都可以去編輯,但是不能刪除</font></p>
<p><a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_14-11-09.png"><font size="4"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_14-11-09_thumb.png" alt="firefox_2016-01-28_14-11-09" title="firefox_2016-01-28_14-11-09" /></font></a></p>
<p><font size="4"></p>
<hr />
<p>設定ROUNDCUBEMAIL去抓AD 的帳號不過目前搞不定使用者通訊錄排序的問題群組的排序倒是OK</font> <p><font size="4">//update 使用者通訊錄的排序也搞定啦!</font></p>
<p><font size="4">//底下這行本來被註解掉了,取消註解</font></p>
<p><font size="4">$config[&lsquo;addressbook_sort_col&rsquo;] = &lsquo;name&rsquo;; </font></p>
<p><font size="4">改一下config</font></p>
<p><font size="4">vim /var/www/roundcubemail/config/config.inc.php</font></p>
<p><font size="4"></font>&nbsp;
&gt; <font size="4">// Global LDAP address book.
&gt; $config[&lsquo;ldap_public&rsquo;][&ldquo;global_ldap_abook&rdquo;] = array(
&gt; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;Global LDAP Address Book&rsquo;,
&gt; &lsquo;hosts&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; array(&lsquo;192.168.10.243&rsquo;), //改成AD 的IP
&gt; &lsquo;port&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; 389,
&gt; &lsquo;use_tls&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;ldap_version&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;3&rsquo;,&nbsp; //註解掉這行
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;network_timeout&rsquo;&nbsp;&nbsp; =&gt; 10, //註解掉這行
&gt; &lsquo;user_specific&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; true,</font>
&gt;
&gt; <font size="4">// Search mail users under same domain.</font>
&gt;
&gt; <font size="4">//修改和AD連線的設定 base_dn , bind_dn , bind_pass 都要設定如果沒設定DN/pass 會發生驗證錯誤,找不到資料的情況
&gt; &lsquo;base_dn&rsquo;=&gt; &lsquo;DC=abc,DC=com, DC=tw&rsquo;,
&gt; &lsquo;bind_dn&rsquo; =&gt; </font><a href="mailto:"><font size="4">&lsquo;abc@abc.com.tw&rsquo;</font></a><font size="4">,
&gt; &lsquo;bind_pass&rsquo; =&gt; &lsquo;abcabc&rsquo;,
&gt; &lsquo;writable&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,</font>
&gt;
&gt; <font size="4">//設定USER搜尋通訊錄時要尋哪些欄位欄位越多搜尋時間越久為了省時間只設定搜尋兩個欄位</font>
&gt;
&gt; <font size="4">&lsquo;search_fields&rsquo; =&gt; array(&lsquo;mail&rsquo;, &lsquo;cn&rsquo;),// &lsquo;sn&rsquo;, &lsquo;givenName&rsquo;, &lsquo;street&rsquo;),//, &lsquo;telephoneNumber&rsquo;, &lsquo;mobile&rsquo;, &lsquo;stree&rsquo;, &lsquo;postalCode&rsquo;),</font>
&gt;
&gt; <font size="4">//<strike>底下這些其實可有可無,大部分的欄位對應都在下面的 fieldmap</strike></font>
&gt;
&gt; <font size="4">//<strike>然後AD的欄位很奇怪不管怎麼抓就是很固執我有測試去抓 description 欄位來當作顯示名稱 (surname) 但就是沒作用…而且似乎會拖慢速度</strike></font>
&gt;
&gt; <font size="4">//<strike>但是在聯絡人的內容卻有出現設定的描述欄位的資料,就很奇怪,不知道怎麼抓
&gt; </strike>#&lsquo;name_field&rsquo; =&gt; &lsquo;cn&rsquo;, // this field represents the contact&rsquo;s name
&gt; #&lsquo;firstname_field&rsquo; =&gt; &lsquo;cn&rsquo;, // this field represents the contact&rsquo;s first name
&gt; #&lsquo;surname_field&rsquo; =&gt; &lsquo;cn&rsquo;, // this field represents the contact&rsquo;s last name
&gt; &lsquo;email_field&rsquo; =&gt; &lsquo;mail&rsquo;, // this field represents the contact&rsquo;s e-mail
&gt; &lsquo;scope&rsquo; =&gt; &lsquo;sub&rsquo;, // search mode: sub|base|list //不知道幹嘛的
&gt; &lsquo;filter&rsquo; =&gt; &lsquo;(&amp;(mail=<em>)(!(msExchHideFromAddressLists=TRUE)))&lsquo;, // all mail, except the exchange hidden ,抓取所有 mail 屬性有值的紀錄,除了某些刻意隱藏的
&gt; &lsquo;sort&rsquo; =&gt; &lsquo;cn&rsquo;, // The field to sort the listing by. //<strike>排序,不過我測試不出來,改成用 mail 排序也沒作用
&gt; </strike>&lsquo;fuzzy_search&rsquo; =&gt; TRUE ,// server allows wildcard search //預設值</font>
&gt;
&gt; <font size="4">// mapping of contact fields to directory attributes</font>
&gt;
&gt; <font size="4">//這些都是預設值 AD 欄位跟 LDAP 的對應關係,請參考 </font><a href="https://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html" title="https://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html"><font size="4">https://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html</font></a>
&gt;
&gt; <font size="4">//這些都先註解掉
&gt; &nbsp;&nbsp;&nbsp; &lsquo;fieldmap&rsquo; =&gt; array(
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;cn&rsquo;,
&gt; &nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;surname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;sn&rsquo;,
&gt; &nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;firstname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;givenName&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; &lsquo;title&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;title&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; &lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail:</em>&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; &lsquo;phone:work&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;telephoneNumber&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:mobile&rsquo;&nbsp; =&gt; &lsquo;mobile&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;street&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;street&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;zipcode&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;postalCode&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;locality&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;l&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;department&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;departmentNumber&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;notes&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;description&rsquo;,
&gt; &nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;cn&rsquo;,
&gt; &nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;surname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;sn&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; &lsquo;firstname&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;givenName&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; &lsquo;title&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;title&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail:*&lsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:work&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;telephoneNumber&rsquo;,
&gt; &nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:mobile&rsquo;&nbsp; =&gt; &lsquo;mobile&rsquo;,
&gt; &nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;phone:workfax&rsquo; =&gt; &lsquo;facsimileTelephoneNumber&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp; &lsquo;street&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;street&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;&nbsp; &lsquo;zipcode&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;postalCode&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;locality&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;l&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;department&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;departmentNumber&rsquo;,
&gt; &nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;notes&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;description&rsquo;,
&gt; &nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;photo&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;jpegPhoto&rsquo;,
&gt; &nbsp;&nbsp;&nbsp; ),
&gt; </font>
&gt;
&gt; <font size="4">//fields_map 的內容 改成這樣,留下兩個就夠了,其他有用到再開</font> &gt; <font size="4"><strong>&lsquo;fieldmap&rsquo; =&gt; array(</strong></font>
&gt;
&gt; <font size="4"><strong>&lsquo;name&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;displayName&rsquo; ,</strong></font>
&gt;
&gt; <font size="4"><strong>&lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail:*&lsquo;,</strong></font>
&gt;
&gt; <font size="4"><strong>),</strong></font> &gt; <font size="4">&nbsp; &lsquo;sort&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;cn&rsquo;, //應該是沒作用
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;scope&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;sub&rsquo;,
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;filter&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;(&amp;(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))&lsquo;,
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;fuzzy_search&rsquo;&nbsp; =&gt; true,
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;vlv&rsquo;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,&nbsp;&nbsp; // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;sizelimit&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;0&rsquo;,&nbsp;&nbsp;&nbsp;&nbsp; // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;timelimit&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;0&rsquo;,&nbsp;&nbsp;&nbsp;&nbsp; // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
&gt; #&nbsp;&nbsp;&nbsp; &lsquo;referrals&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; false,&nbsp; // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups</font>
&gt;
&gt; <font size="4">//底下這是群組的設定</font>
&gt;
&gt; <font size="4">&lsquo;group_filters&rsquo; =&gt; array(
&gt; &nbsp;&nbsp;&nbsp; &lsquo;departments&rsquo; =&gt; array(
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name&rsquo;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;群組&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;scope&rsquo;&nbsp;&nbsp; =&gt; &lsquo;sub&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&lsquo;filter&rsquo; = &gt; &lsquo;(&amp;(mail=<em>)(objectClass=group))&lsquo;,
&gt; &nbsp;&nbsp;&nbsp; &lsquo;filter&rsquo; =&gt; &lsquo;(&amp;(mail=</em>)(objectClass=group)(!(msExchHideFromAddressLists=TRUE)))&lsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;name_attr&rsquo; =&gt; &lsquo;description&rsquo;,
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lsquo;email&rsquo;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &lsquo;mail&rsquo;,
&gt; &nbsp;&nbsp; ),
&gt; ),</font>
&gt;
&gt; <font size="4">);
&gt; $config[&lsquo;autocomplete_addressbooks&rsquo;] = array(&lsquo;sql&rsquo;, &lsquo;global_ldap_abook&rsquo;);
&gt; </font>
&gt;
&gt; <font size="4">群組信箱看到的畫面會是這樣</font>
&gt;
&gt; <a href="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_14-53-22.png"><img src="http://wp.cowbay.org/wp-content/uploads/2016/01/firefox_2016-01-28_14-53-22_thumb.png" alt="firefox_2016-01-28_14-53-22" title="firefox_2016-01-28_14-53-22" /></a></p>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/centos-iredmail-postfix-postfixadmin-virtual-domain">centos iredmail postfix postfixadmin virtual domain</a>
</div>
</div>
</div>
</article>
</div>
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
};
(function() {
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
return;
}
var d = document, s = d.createElement('script'); s.async = true;
s.src = '//' + "bilberry-hugo-theme" + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
<footer>
<div class="container">
<div class="recent-posts">
<strong>Latest posts</strong>
<ul>
<li>
<a href="/article/google-550-5-7-1-sloution/">寄信給google被退信 錯誤 550-5.7.1的解法</a>
</li>
<li>
<a href="/article/netdata-linux-system-performance-monitor-dashboard/">Netdata Linux System Performance Monitor Dashboard</a>
</li>
<li>
<a href="/article/linux-performance-monitor-dashboard-netdata-md/">Linux 底下極其詳細的System performace Monitor Dashboard - Netdata</a>
</li>
<li>
<a href="/article/syntax-test/">Syntax Test</a>
</li>
<li>
<a href="/article/psql-create-role-and-assign-priviledges/">psql create role and assign priviledges</a>
</li>
<li>
<a href="/article/study-url/">Study URL</a>
</li>
<li>
<a href="/article/rsync-time-backup/">[筆記] Linux 底下好用的備份工具 rsync-time-backup</a>
</li>
</ul>
</div>
<div class="categories">
<a href="/categories/"><strong>Categories</strong></a>
<ul>
<li>
<a href="/categories/%E6%9C%AA%E5%88%86%E9%A1%9E">未分類 (86)</a>
</li>
<li>
<a href="/categories/%E5%B7%A5%E4%BD%9C%E7%AD%86%E8%A8%98">工作筆記 (68)</a>
</li>
<li>
<a href="/categories/%E5%85%B6%E4%BB%96">其他 (46)</a>
</li>
<li>
<a href="/categories/%E7%AD%86%E8%A8%98">筆記 (30)</a>
</li>
<li>
<a href="/categories/%E5%89%AA%E5%A0%B1">剪報 (18)</a>
</li>
<li>
<a href="/categories/starting">Starting (5)</a>
</li>
<li>
<a href="/categories/blog">Blog (4)</a>
</li>
</ul>
</div>
<div class="right">
<div class="external-profiles">
<strong>Social media</strong>
<a href="https://twitter.com/TheRealLednerb" target="_blank"><i class="fa fa-twitter-adblock-proof"></i></a>
<a href="https://github.com/Lednerb" target="_blank"><i class="fa fa-github"></i></a>
</div>
<div class="languages">
<strong>Other languages</strong>
<a href="/en" class="active">en</a>
<a href="/de">de</a>
</div>
</div>
</div>
</footer>
<div class="credits">
<div class="container">
<div class="copyright">
<a href="https://github.com/Lednerb" target="_blank">
&copy;
2017
by Lednerb
</a>
</div>
<div class="author">
<a href="https://github.com/Lednerb/bilberry-hugo-theme" target="_blank">Bilberry Hugo Theme</a>
</div>
</div>
</div>
<script type="text/javascript" src="https://h.cowbay.org/js/externalDependencies.39c47e10e241eae2947b3fe21809c572.js" integrity="md5-OcR&#43;EOJB6uKUez/iGAnFcg=="></script>
<script type="text/javascript" src="https://h.cowbay.org/js/theme.ff50ae6dc1bfc220b23bf69dbb41b54e.js" integrity="md5-/1CubcG/wiCyO/adu0G1Tg=="></script>
<script>
$(".moment").each(function() {
$(this).text(
moment( $(this).text() )
.locale( "en" )
.format('LL')
);
});
$(".footnote-return sup").html("");
</script>
<script>
var client = algoliasearch("Y2C4RWMPXW", "50ea7f8c41c0ad233926e0be2b769ed1");
var index = client.initIndex("default-content");
$('#search').autocomplete({ hint: false, autoselect: true, debug: false },
[
{
source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 5, filters: 'language: en' }),
displayKey: function(suggestion) {
return suggestion.title || suggestion.author
},
templates: {
suggestion: function(suggestion) {
return "<span class='entry " + suggestion.type + "'>"
+ "<span class='title'>" + suggestion.title + "</span>"
+ "<span class='fa fa-fw " + suggestion.iconClass + "'></span>"
+ "</span>"
;
},
empty: function() {
return "<span class='empty'>Nothing found.</span>"
},
footer: function() {
return '<div class="branding">Powered by <img src="https:\/\/h.cowbay.org\/dist\/algolia-logo-light.svg" /></div>'
}
},
}
])
.on('autocomplete:selected', function(event, suggestion, dataset) {
window.location = (suggestion.url);
})
.keypress(function (event, suggestion) {
if (event.which == 13) {
window.location = (suggestion.url);
}
});
</script>
</body>
</html>