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.

1283 lines
32 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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> [筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定 | My cool new Blog</title>
<meta name="description" content="[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定 - Bilberry Premium Theme for Hugo.">
<meta itemprop="name" content="[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定">
<meta itemprop="description" content="[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定 - Bilberry Premium Theme for Hugo.">
<meta property="og:title" content="[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定">
<meta property="og:description" content="[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定 - 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-iredmail-postfix-dovecot-e7-9a-84-e4-b8-80-e4-ba-9b-e8-a8-ad-e5-ae-9a/">
<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-iredmail-postfix-dovecot-e7-9a-84-e4-b8-80-e4-ba-9b-e8-a8-ad-e5-ae-9a/">
<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-iredmail-postfix-dovecot-e7-9a-84-e4-b8-80-e4-ba-9b-e8-a8-ad-e5-ae-9a/">[筆記] Iredmail &#43; Postfix Admin dovecot 的一些設定</a></h3>
<div class="meta">
<span class="date moment">2016-05-05</span>
<span class="categories">
<a href="/categories/%E5%85%B6%E4%BB%96">其他</a>
</span>
</div>
<p>/etc/dovecot/dovecot.conf</p>
<p>重點</p>
<p>disable_plaintext_auth = no</p>
<p>mail_location = maildir:/var/vmail/%d/%n:INDEX=/var/vmail/%d/%n/indexes</p>
<p>&nbsp;</p>
<p>&nbsp;
&gt; #ssl_dh_parameters_length = 2048
&gt;
&gt; #ssl_prefer_server_ciphers = yes
&gt;
&gt;
&gt; # IP ranges specified by login_trusted_networks setting are assumed to be secure.
&gt;
&gt; #login_trusted_networks = 127.0.0.1
&gt;
&gt;
&gt; # With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
&gt;
&gt; # Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
&gt;
&gt; # insecurely.
&gt;
&gt; disable_plaintext_auth = no
&gt;
&gt; # Allow plain text password per IP address/net
&gt;
&gt; #remote 192.168.0.0/24 {
&gt;
&gt; #   disable_plaintext_auth = no
&gt;
&gt; # }
&gt;
&gt;
&gt; # Mail location and mailbox format.
&gt;
&gt; #mail_location = maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/
&gt;
&gt; mail_location = maildir:/var/vmail/%d/%n:INDEX=/var/vmail/%d/%n/indexes
&gt;
&gt; # Authentication related settings.
&gt;
&gt; # Append this domain name if client gives empty realm.
&gt;
&gt; auth_default_realm = abc.org
&gt;
&gt;
&gt; # Authentication mechanisms.
&gt;
&gt; auth_mechanisms = PLAIN LOGIN
&gt;
&gt;
&gt; # Limits the number of users that can be logging in at the same time.
&gt;
&gt; # Default is 100. This can be overridden by <code>process_limit =</code> in
&gt;
&gt; # <code>service [protocol]</code> block.
&gt;
&gt; # e.g.
&gt;
&gt; #       protocol imap-login {
&gt;
&gt; #           &hellip;
&gt;
&gt; #           process_limit = 500
&gt;
&gt; #       }
&gt;
&gt; #default_process_limit = 100
&gt;
&gt;
&gt; service auth {
&gt;
&gt;
&gt; unix_listener /var/spool/postfix/private/dovecot-auth {
&gt;
&gt; user = postfix
&gt;
&gt; group = postfix
&gt;
&gt; mode = 0666
&gt;
&gt; }
&gt;
&gt; unix_listener auth-master {
&gt;
&gt; user = vmail
&gt;
&gt; group = vmail
&gt;
&gt; mode = 0666
&gt;
&gt; }
&gt;
&gt; unix_listener auth-userdb {
&gt;
&gt; user = vmail
&gt;
&gt; group = vmail
&gt;
&gt; mode = 0660
&gt;
&gt; }
&gt;
&gt; }
&gt;
&gt;
&gt; # LMTP server (Local Mail Transfer Protocol).
&gt;
&gt; # Reference: <a href="http://wiki2.dovecot.org/LMTP">http://wiki2.dovecot.org/LMTP</a>
&gt;
&gt; service lmtp {
&gt;
&gt; user = vmail
&gt;
&gt;
&gt; # For higher volume sites, it may be desirable to increase the number of
&gt;
&gt; # active listener processes. A range of 5 to 20 is probably good for most
&gt;
&gt; # sites.
&gt;
&gt; process_min_avail = 5
&gt;
&gt;
&gt; # Logging.
&gt;
&gt; # Require &lsquo;info_log_path =&rsquo; in &lsquo;protocol lmtp { }&rsquo; block.
&gt;
&gt; executable = lmtp -L
&gt;
&gt;
&gt; # Listening on socket file and TCP
&gt;
&gt; unix_listener /var/spool/postfix/private/dovecot-lmtp {
&gt;
&gt; user = postfix
&gt;
&gt;
&gt; group = postfix
&gt;
&gt; mode = 0600
&gt;
&gt; }
&gt;
&gt;
&gt; inet_listener lmtp {
&gt;
&gt; # Listen on localhost (ipv4)
&gt;
&gt; address = 127.0.0.1
&gt;
&gt; port = 24
&gt;
&gt; }
&gt;
&gt; }
&gt;
&gt;
&gt; # Virtual mail accounts.
&gt;
&gt; userdb {
&gt;
&gt; args = /etc/dovecot/dovecot-mysql.conf
&gt;
&gt; driver = sql
&gt;
&gt; }
&gt;
&gt; passdb {
&gt;
&gt; args = /etc/dovecot/dovecot-mysql.conf
&gt;
&gt; driver = sql
&gt;
&gt; }
&gt;
&gt;
&gt; # Master user.
&gt;
&gt; # Master users are able to log in as other users. It&rsquo;s also possible to
&gt;
&gt; # directly log in as any user using a master password, although this isn&rsquo;t
&gt;
&gt; # recommended.
&gt;
&gt; # Reference: <a href="http://wiki2.dovecot.org/Authentication/MasterUsers">http://wiki2.dovecot.org/Authentication/MasterUsers</a>
&gt;
&gt; auth_master_user_separator = *
&gt;
&gt; passdb {
&gt;
&gt; driver = passwd-file
&gt;
&gt; args = /etc/dovecot/dovecot-master-users
&gt;
&gt; master = yes
&gt;
&gt; }
&gt;
&gt;
&gt; plugin {
&gt;
&gt;
&gt; auth_socket_path = /var/run/dovecot/auth-master
&gt;
&gt;
&gt; # Quota configuration.
&gt;
&gt; # Reference: <a href="http://wiki2.dovecot.org/Quota/Configuration">http://wiki2.dovecot.org/Quota/Configuration</a>
&gt;
&gt; quota = dict:user::proxy::quotadict
&gt;
&gt; quota_rule = *:storage=1G
&gt;
&gt; #quota_rule2 = <em>:messages=0
&gt;
&gt; #quota_rule3 = Trash:storage=1G
&gt;
&gt; #quota_rule4 = Junk:ignore
&gt;
&gt;
&gt; # Quota warning.
&gt;
&gt; #
&gt;
&gt; # If user suddenly receives a huge mail and the quota jumps from
&gt;
&gt; # 85% to 95%, only the 95% script is executed.
&gt;
&gt; #
&gt;
&gt; # Only the command for the first exceeded limit is executed, so configure
&gt;
&gt; # the highest limit first.
&gt;
&gt; quota_warning = storage=100%% quota-warning 100 %u
&gt;
&gt; quota_warning2 = storage=95%% quota-warning 95 %u
&gt;
&gt; quota_warning3 = storage=90%% quota-warning 90 %u
&gt;
&gt; quota_warning4 = storage=85%% quota-warning 85 %u
&gt;
&gt;
&gt; # allow user to become max 10% (or 50 MB) over quota
&gt;
&gt; quota_grace = 10%%
&gt;
&gt; #quota_grace = 50 M
&gt;
&gt;
&gt; # Custom Quota Exceeded Message.
&gt;
&gt; # You can specify the message directly or read the message from a file.
&gt;
&gt; #quota_exceeded_message = Quota exceeded, please try again later.
&gt;
&gt; #quota_exceeded_message = &lt;/path/to/quota_exceeded_message.txt
&gt;
&gt;
&gt; # Plugin: autocreate. Create and subscribe to default IMAP folders.
&gt;
&gt; autocreate = INBOX
&gt;
&gt; autocreate2 = Sent
&gt;
&gt;
&gt; autocreate3 = Trash
&gt;
&gt; autocreate4 = Drafts
&gt;
&gt; autocreate5 = Junk
&gt;
&gt; autosubscribe = INBOX
&gt;
&gt; autosubscribe2 = Sent
&gt;
&gt; autosubscribe3 = Trash
&gt;
&gt; autosubscribe4 = Drafts
&gt;
&gt; autosubscribe5 = Junk
&gt;
&gt;
&gt; # Plugin: expire.
&gt;
&gt; #expire = Trash 7 Trash/</em> 7 Junk 30
&gt;
&gt; #expire_dict = proxy::expire
&gt;
&gt;
&gt; # ACL and share folder
&gt;
&gt; acl = vfile
&gt;
&gt; acl_shared_dict = proxy::acl
&gt;
&gt;
&gt; # By default Dovecot doesn&rsquo;t allow using the IMAP &ldquo;anyone&rdquo; or
&gt;
&gt; # &ldquo;authenticated&rdquo; identifier, because it would be an easy way to spam
&gt;
&gt; # other users in the system. If you wish to allow it,
&gt;
&gt; #acl_anyone = allow
&gt;
&gt;
&gt; # Pigeonhole managesieve service.
&gt;
&gt; # Reference: <a href="http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration">http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration</a>
&gt;
&gt; # Per-user sieve settings.
&gt;
&gt; sieve_dir = %Lh/sieve
&gt;
&gt; sieve = %Lh/sieve/dovecot.sieve
&gt;
&gt;
&gt; # Global sieve settings.
&gt;
&gt; sieve_global_dir = /var/vmail/sieve
&gt;
&gt; # Note: if user has personal sieve script, global sieve rules defined in
&gt;
&gt; #       sieve_default will be ignored. Please use sieve_before or
&gt;
&gt; #       sieve_after instead.
&gt;
&gt; #sieve_default =
&gt;
&gt; sieve_before = /var/vmail/sieve/dovecot.sieve
&gt;
&gt; #sieve_after =
&gt;
&gt;
&gt; # The maximum number of redirect actions that can be performed during a
&gt;
&gt; # single script execution.
&gt;
&gt; # The meaning of 0 differs based on your version. For pigeonhole-0.3.0 and
&gt;
&gt; # beyond this means that redirect is prohibited. For older versions,
&gt;
&gt; # however, this means that the number of redirects is unlimited.
&gt;
&gt; #sieve_max_redirects = 4
&gt;
&gt; }
&gt;
&gt;
&gt; service quota-warning {
&gt;
&gt; executable = script /usr/local/bin/dovecot-quota-warning.sh
&gt;
&gt; unix_listener quota-warning {
&gt;
&gt; user = vmail
&gt;
&gt; group = vmail
&gt;
&gt; mode = 0660
&gt;
&gt; }
&gt;
&gt; }
&gt;
&gt;
&gt; service dict {
&gt;
&gt; unix_listener dict {
&gt;
&gt; mode = 0660
&gt;
&gt; user = vmail
&gt;
&gt; group = vmail
&gt;
&gt; }
&gt;
&gt; }
&gt;
&gt;
&gt; dict {
&gt;
&gt; #expire = db:/var/lib/dovecot/expire/expire.db
&gt;
&gt; quotadict = mysql:/etc/dovecot/dovecot-used-quota.conf
&gt;
&gt; acl = mysql:/etc/dovecot/dovecot-share-folder.conf
&gt;
&gt; }
&gt;
&gt;
&gt; }
&gt;
&gt;
&gt; protocol lda {
&gt;
&gt; # Reference: <a href="http://wiki2.dovecot.org/LDA">http://wiki2.dovecot.org/LDA</a>
&gt;
&gt; mail_plugins = $mail_plugins sieve autocreate
&gt;
&gt; auth_socket_path = /var/run/dovecot/auth-master
&gt;
&gt; log_path = /var/log/dovecot-sieve.log
&gt;
&gt; lda_mailbox_autocreate = yes
&gt;
&gt; lda_mailbox_autosubscribe = yes
&gt;
&gt; postmaster_address = root
&gt;
&gt; }
&gt;
&gt;
&gt; protocol lmtp {
&gt;
&gt; # Log file
&gt;
&gt; info_log_path = /var/log/dovecot-lmtp.log
&gt;
&gt;
&gt; # Plugins
&gt;
&gt; mail_plugins = quota sieve
&gt;
&gt; postmaster_address = postmaster
&gt;
&gt;
&gt; lmtp_save_to_detail_mailbox = yes
&gt;
&gt; recipient_delimiter = +
&gt;
&gt; }
&gt;
&gt;
&gt; protocol imap {
&gt;
&gt; mail_plugins = $mail_plugins imap_quota autocreate imap_acl
&gt;
&gt; imap_client_workarounds = tb-extra-mailbox-sep
&gt;
&gt;
&gt; # Maximum number of IMAP connections allowed for a user from each IP address.
&gt;
&gt; # NOTE: The username is compared case-sensitively.
&gt;
&gt; # Default is 10.
&gt;
&gt; # Increase it to avoid issue like below:
&gt;
&gt; # &ldquo;Maximum number of concurrent IMAP connections exceeded&rdquo;
&gt;
&gt; mail_max_userip_connections = 30
&gt;
&gt; }
&gt;
&gt;
&gt; protocol pop3 {
&gt;
&gt; mail_plugins = $mail_plugins
&gt;
&gt; pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
&gt;
&gt; pop3_uidl_format = %08Xu%08Xv
&gt;
&gt;
&gt; # Maximum number of IMAP connections allowed for a user from each IP address.
&gt;
&gt; # NOTE: The username is compared case-sensitively.
&gt;
&gt; # Default is 10.
&gt;
&gt; mail_max_userip_connections = 30
&gt;
&gt; }
&gt;
&gt;
&gt; # Login processes. Refer to Dovecot wiki for more details:
&gt;
&gt; # <a href="http://wiki2.dovecot.org/LoginProcess">http://wiki2.dovecot.org/LoginProcess</a>
&gt;
&gt; service imap-login {
&gt;
&gt; #inet_listener imap {
&gt;
&gt; #    port = 143
&gt;
&gt; # }
&gt;
&gt; #inet_listener imaps {
&gt;
&gt; #    port = 993
&gt;
&gt; #    ssl = yes
&gt;
&gt; # }
&gt;
&gt;
&gt; service_count = 1
&gt;
&gt;
&gt; # To avoid startup latency for new client connections, set process_min_avail
&gt;
&gt; # to higher than zero. That many idling processes are always kept around
&gt;
&gt; # waiting for new connections.
&gt;
&gt; #process_min_avail = 0
&gt;
&gt;
&gt; # number of simultaneous IMAP connections
&gt;
&gt; process_limit = 500
&gt;
&gt;
&gt; # vsz_limit should be fine at its default 64MB value
&gt;
&gt;
&gt; &nbsp;
&gt;
&gt;
&gt; }
&gt;
&gt;
&gt; service pop3-login {
&gt;
&gt; #inet_listener pop3 {
&gt;
&gt; #    port = 110
&gt;
&gt; # }
&gt;
&gt; #inet_listener pop3s {
&gt;
&gt; #    port = 995
&gt;
&gt; #    ssl = yes
&gt;
&gt; # }
&gt;
&gt;
&gt; service_count = 1
&gt;
&gt;
&gt; # number of simultaneous POP3 connections
&gt;
&gt; #process_limit = 500
&gt;
&gt; }
&gt;
&gt;
&gt; service managesieve-login {
&gt;
&gt; inet_listener sieve {
&gt;
&gt; # Listen on localhost (ipv4)
&gt;
&gt; address = 127.0.0.1
&gt;
&gt; port = 4190
&gt;
&gt; }
&gt;
&gt; }
&gt;
&gt;
&gt; namespace {
&gt;
&gt; type = private
&gt;
&gt; separator = /
&gt;
&gt; prefix =
&gt;
&gt; #location defaults to mail_location.
&gt;
&gt; inbox = yes
&gt;
&gt; }
&gt;
&gt; namespace {
&gt;
&gt; type = shared
&gt;
&gt; separator = /
&gt;
&gt; prefix = Shared/%%u/
&gt;
&gt; location = maildir:%%Lh/Maildir/:INDEX=%%Lh/Maildir/Shared/%%u
&gt;
&gt; # this namespace should handle its own subscriptions or not.
&gt;
&gt; subscriptions = yes
&gt;
&gt; list = children
&gt;
&gt; }
&gt;
&gt;
&gt; # Public mailboxes.
&gt;
&gt; # Refer to Dovecot wiki page for more details:
&gt;
&gt; # <a href="http://wiki2.dovecot.org/SharedMailboxes/Public">http://wiki2.dovecot.org/SharedMailboxes/Public</a>
&gt;
&gt; #namespace {
&gt;
&gt; #    type = public
&gt;
&gt; #    separator = /
&gt;
&gt; #    prefix = Public/
&gt;
&gt; #
&gt;
&gt; #    # CONTROL=: Mark this public folder as read-only mailbox
&gt;
&gt; #    # INDEX=: Per-user \Seen flag
&gt;
&gt; #    location = maildir:/var/vmail/public/:CONTROL=~/Maildir/public:INDEX=~/Maildir/public
&gt;
&gt; #
&gt;
&gt; #    # Allow users to subscribe to the public folders.
&gt;
&gt; #    subscriptions = yes
&nbsp;</p>
<p>/etc/dovecot/dovecot-mysql.conf</p>
<p>有 # 的是iredmail 自動做好的設定</p>
<p>註解掉之後新增最後面的幾行改成自己的DB、帳號、密碼、確認一下uid 跟 postfix的main.cf 一樣
&gt; #driver = mysql
&gt;
&gt; #default_pass_scheme = CRYPT
&gt;
&gt; #connect = host=127.0.0.1 dbname=vmail user=vmail password=NP5eaW3VSRogGT5bx0qaHMm7CKemRY
&gt;
&gt; # Required by &lsquo;doveadm mailbox &hellip;&rsquo;.
&gt;
&gt; #iterate_query = SELECT username AS user FROM mailbox
&gt;
&gt; #password_query = SELECT password, allow_nets FROM mailbox WHERE username=&lsquo;%u&rsquo; AND enable%Ls%Lc=1 AND active=1
&gt;
&gt; #user_query = SELECT <br />
&gt;
&gt; #    &lsquo;%u&rsquo; AS master_user, <br />
&gt;
&gt; #    CONCAT(mailbox.storagebasedirectory, &lsquo;/&rsquo;, mailbox.storagenode, &lsquo;/&rsquo;, mailbox.maildir) AS home, <br />
&gt;
&gt; #    CONCAT(&rsquo;*:bytes=&lsquo;, mailbox.quota*1048576) AS quota_rule <br />
&gt;
&gt; #FROM mailbox,domain <br />
&gt;
&gt; #WHERE mailbox.username=&lsquo;%u&rsquo; <br />
&gt;
&gt; #    AND mailbox.domain=&lsquo;%d&rsquo; <br />
&gt;
&gt; #    AND mailbox.<code>enable%Ls%Lc</code>=1 <br />
&gt;
&gt; #    AND mailbox.domain=domain.domain <br />
&gt;
&gt; #    AND domain.backupmx=0 <br />
&gt;
&gt; #    AND domain.active=1 <br />
&gt;
&gt; #    AND mailbox.active=1
&gt;
&gt;
&gt; driver = mysql
&gt;
&gt; connect = host=127.0.0.1 dbname=postfix user=postfix password=postfixadmin
&gt;
&gt; default_pass_scheme = MD5-CRYPT
&gt;
&gt; user_query = SELECT &lsquo;/var/vmail/%d/%n&rsquo; as home, 2000 AS uid, 2000 AS gid FROM mailbox WHERE username = &lsquo;%u&rsquo;
&gt;
&gt; password_query = SELECT password FROM mailbox WHERE username = &lsquo;%u&rsquo;
&nbsp;</p>
<p>&nbsp;</p>
<p>postfix main.cf</p>
<p>重點 uid 設定要一樣 都是 2000</p>
<p>原則上就是在原本的 proxy:mysql 這些設定後面,加入 postfixadmin 的設定</p>
<p>然後有一些只有 iredmail 有, postfix admin 沒有的,都先註解掉</p>
<p>像是底下這部分
&gt; #
&gt;
&gt; # Lookup virtual mail accounts
&gt;
&gt; #
&gt;
&gt; #transport_maps =
&gt;
&gt; #    proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
&gt;
&gt; #    proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
&gt;
&gt;
&gt; #sender_dependent_relayhost_maps =
&gt;
&gt; #    proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
&gt;
&gt;
&gt; # Lookup table with the SASL login names that own the sender (MAIL FROM) addresses.
&gt;
&gt; #smtpd_sender_login_maps =
&gt;
&gt; #    proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
&nbsp;</p>
<p>其他的設定如下</p>
<p>&nbsp;
&gt; alias_database = hash:/etc/postfix/aliases
&gt;
&gt; alias_maps = hash:/etc/postfix/aliases
&gt;
&gt; allow_min_user = no
&gt;
&gt; allow_percent_hack = no
&gt;
&gt; biff = no
&gt;
&gt; body_checks = pcre:/etc/postfix/body_checks.pcre
&gt;
&gt; command_directory = /usr/sbin
&gt;
&gt; config_directory = /etc/postfix
&gt;
&gt; daemon_directory = /usr/libexec/postfix
&gt;
&gt; data_directory = /var/lib/postfix
&gt;
&gt; debug_peer_level = 2
&gt;
&gt; disable_vrfy_command = yes
&gt;
&gt; enable_original_recipient = no
&gt;
&gt; header_checks = pcre:/etc/postfix/header_checks
&gt;
&gt; home_mailbox = Maildir/
&gt;
&gt; inet_interfaces = all
&gt;
&gt; inet_protocols = ipv4
&gt;
&gt; lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
&gt;
&gt; lmtp_tls_protocols = !SSLv2 !SSLv3
&gt;
&gt; mail_owner = postfix
&gt;
&gt; mailbox_command = /usr/libexec/dovecot/deliver
&gt;
&gt; mailq_path = /usr/bin/mailq.postfix
&gt;
&gt; message_size_limit = 15728640
&gt;
&gt; mydestination = $myhostname, localhost, localhost.localdomain
&gt;
&gt; mydomain = iredmail.cowbay.org
&gt;
&gt; myhostname = iredmail.cowbay.org
&gt;
&gt; mynetworks = 127.0.0.1
&gt;
&gt; myorigin = iredmail.cowbay.org
&gt;
&gt; newaliases_path = /usr/bin/newaliases.postfix
&gt;
&gt; proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $rela
&gt;
&gt; y_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_ali
&gt;
&gt; as_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
&gt;
&gt; queue_directory = /var/spool/postfix
&gt;
&gt; recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf    proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
&gt;
&gt; recipient_delimiter = +
&gt;
&gt; relay_domains = $mydestination    proxy:mysql:/etc/postfix/mysql/relay_domains.cfsender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf    proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
&gt;
&gt; sendmail_path = /usr/sbin/sendmail.postfix
&gt;
&gt; setgid_group = postdrop
&gt;
&gt; smtp_tls_CAfile = $smtpd_tls_CAfile
&gt;
&gt; smtp_tls_loglevel = 1
&gt;
&gt; smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
&gt;
&gt; smtp_tls_note_starttls_offer = yes
&gt;
&gt; smtp_tls_protocols = !SSLv2 !SSLv3
&gt;
&gt; smtp_tls_security_level = may
&gt;
&gt; smtpd_data_restrictions = reject_unauth_pipelining
&gt;
&gt; smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777
&gt;
&gt; smtpd_helo_required = yes
&gt;
&gt; smtpd_helo_restrictions = permit_mynetworks    permit_sasl_authenticated    reject_non_fqdn_helo_hostname    reject_invalid_helo_hostname    check_helo_access pcre:/etc
&gt;
&gt; /postfix/helo_access.pcre
&gt;
&gt; smtpd_recipient_restrictions = reject_unknown_recipient_domain    reject_non_fqdn_recipient    reject_unlisted_recipient    check_policy_service inet:127.0.0.1:7777
&gt;
&gt; permit_mynetworks    permit_sasl_authenticated    reject_unauth_destination
&gt;
&gt; smtpd_reject_unlisted_recipient = yes
&gt;
&gt; smtpd_reject_unlisted_sender = yes
&gt;
&gt; smtpd_sasl_path = private/dovecot-auth
&gt;
&gt; smtpd_sasl_type = dovecot
&gt;
&gt; smtpd_sender_restrictions = reject_unknown_sender_domain    reject_non_fqdn_sender    reject_unlisted_sender    permit_mynetworks    permit_sasl<em>authenticated    check</em>
&gt;
&gt; sender_access pcre:/etc/postfix/sender_access.pcre
&gt;
&gt; smtpd_tls_CAfile = /etc/pki/tls/certs/iRedMail.crt
&gt;
&gt; smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail.crt
&gt;
&gt; smtpd_tls_dh1024_param_file = /etc/pki/tls/dh2048_param.pem
&gt;
&gt; smtpd_tls_dh512_param_file = /etc/pki/tls/dh512_param.pem
&gt;
&gt; smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
&gt;
&gt; smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
&gt;
&gt; smtpd_tls_loglevel = 1
&gt;
&gt; smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
&gt;
&gt; smtpd_tls_protocols = !SSLv2 !SSLv3
&gt;
&gt; swap_bangpath = no
&gt;
&gt; tls_random_source = dev:/dev/urandom
&gt;
&gt; unknown_local_recipient_reject_code = 550
&gt;
&gt; virtual_alias_domains =
&gt;
&gt; virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf    proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf    proxy:mysql:/etc/postfix/mysql/catchall_maps.cf    proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf     proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf        proxy:mysql:/etc/postfix
&gt;
&gt; /sql/mysql_virtual_alias_domain_maps.cf proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
&gt;
&gt; virtual_gid_maps = static:2000
&gt;
&gt; virtual_mailbox_base = /var/vmail
&gt;
&gt; virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf     proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
&gt;
&gt; virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf   proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf      proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
&gt;
&gt; virtual_minimum_uid = 2000
&gt;
&gt; virtual_transport = virtual
&gt;
&gt; virtual_uid_maps = static:2000
&nbsp;</p>
<p>&nbsp;</p>
</div>
<div class="footer no-tags">
</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>