postfixとroundcubeを使用してwebemailを構築

3676 ワード

友鎖
参考記事:https://www.cnblogs.com/chris-cp/p/4843407.htmlバックアップ接続
主な参考資料:https://www.cnblogs.com/tssc/p/7683809.html
問題の1つは、/etc/postfix/main.cfプロファイルのmynetworksの構成に注意することです.
このパラメータ値についての公式ドキュメントの説明:http://www.postfix.org/postconf.5.html
The list of "trusted" remote SMTP clients that have more privileges than "strangers".

In particular, "trusted" SMTP clients are allowed to relay mail through Postfix. See the smtpd_relay_restrictions parameter description in the postconf(5) manual.

You can specify the list of "trusted" network addresses by hand or you can let Postfix do it for you (which is the default). See the description of the mynetworks_style parameter for more information.

If you specify the mynetworks list by hand, Postfix ignores the mynetworks_style setting.

Specify a list of network addresses or network/netmask patterns, separated by commas and/or whitespace. Continue long lines by starting the next line with whitespace.

The netmask specifies the number of bits in the network part of a host address. You can also specify "/file/name" or "type:table" patterns. A "/file/name" pattern is replaced by its contents; a "type:table" lookup table is matched when a table entry matches a lookup string (the lookup result is ignored).

The list is matched left to right, and the search stops on the first match. Specify "!pattern" to exclude an address or network block from the list. The form "!/file/name" is supported only in Postfix version 2.4 and later.

Note 1: Pattern matching of domain names is controlled by the or absence of "mynetworks" in the parent_domain_matches_subdomains parameter value.

Note 2: IP version 6 address information must be specified inside [] in the mynetworks value, and in files specified with "/file/name". IP version 6 addresses contain the ":" character, and would otherwise be confused with a "type:table" pattern.

Examples:

mynetworks = 127.0.0.0/8 168.100.189.0/28
mynetworks = !192.168.0.1, 192.168.0.0/28
mynetworks = 127.0.0.0/8 168.100.189.0/28 [::1]/128 [2001:240:587::]/64
mynetworks = $config_directory/mynetworks
mynetworks = hash:/etc/postfix/network_table

大体mynetworks構成のネットワークセグメントに一致するクライアントIPは、そのメールを私たちの25ポートに転送してメールの転送を行うことができます.私たちはwebmailを構成して、127.0.0.0/8に設定するだけで、ローカルループバックアドレスに設定することができます.
もう1つは、ユーザーメールを格納するディレクトリが作成されていない最初の記事です.
mkdir -p /var/mailbox
chown -R  postfix /var/mailbox

最初の文章の操作が完了したら、telnetを使ってメールサーバーをテストすることができます.
使用postfix和roundcube搭建webemail_第1张图片現在、smtpサーバの構成は成功し、正常に送信できます.
以上の構成で変更されたすべてのプロファイル:https://gitee.com/wochinijiamile/suiyi/raw/master/123.tar.gz
以下、smtpユーザー認証の構成について説明します.
コンパイルインストールcourier-authlibでは、configure: error: Unable to find ltdl.h. Please install Libtool's ltdl libraryソリューション:yum install libtool-ltdl-develというエラーが発生します.
そして私たちは次のような間違いに直面しますconfigure: error: --with-authmysql specified but no mysqlclient.so
mysql-serverをインストールする必要があります
リファレンス記事バックアップ接続
インストールが完了した後も、上記のエラーが報告されます.私たちの解決策は、ldconfig -v | grep mysqlを使用してmysqlのライブラリファイルの場所を見つけることです.
そしてコンパイルインストールのconfigureで変更します