ブログ - macOS X High Sierraのpostfixの設定値を確認する postconfコマンドを使ってmain.cfを編集
macOS X High Sierraのpostfixの設定値を確認する postconfコマンドを使ってmain.cfを編集
- カテゴリ :
- サイト構築
- ブロガー :
- ujpblog 2018/4/11 1:08
postconfが入っているか確認.
-nオプションをつけて実行.これはデフォルトとは違う設定だけ表示される.
なんだかwarningがでている.
設定ファイルは,次の場所に入っている・・・となっている.
が,これに騙されずに, /etc/postfixのファイルをリストしてみる.
main.cfファイルを編集する.
1つめの「use_sack_cache=yes」という部分を探す.
SACLはシステムアクセス制御リスト.アクセス制御を参照のキャッシュの設定.大量のアカウントを扱うような場合は意味があるかもしれないけれど,今回は200件程度なので不要なのでコメントアウトする.
次は,submit.credというもの.
MAP URL Scheme(IMAPURL)(RFC2192)にURLAUTHは,IMAPクライアントがIMAPサーバに関する限られたメッセージデータにアクセスするために承認をURLを使用できる手段を提供するものらしい.不要なのでコメントアウトする.
編集した後,設定を確認.
設定ファイルの場所も正しいものに変更しておく.
設定ファイルでエラーは出なくなったので,postfixを起動してみる.
残念.また明日...
$ which postconf🆑
/usr/sbin/postconf🈁
$
$ postconf -n🆑
biff = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /Library/Server/Mail/Data/mta
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb
$daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
html_directory = /usr/share/doc/postfix/html
inet_interfaces = loopback-only
inet_protocols = all
mail_owner = _postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10485760
mynetworks = 127.0.0.0/8, [::1]/128
newaliases_path = /usr/bin/newaliases
queue_directory = /Library/Server/Mail/Data/spool
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
server_config_directory = /Library/Server/Mail/Config/postfix
setgid_group = _postdrop
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
smtpd_tls_ciphers = medium
smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
postconf: warning: /etc/postfix/main.cf: unused parameter: use_sacl_cache=yes🈁
postconf: warning: /etc/postfix/main.cf: unused parameter:
imap_submit_cred_file=/etc/postfix/submit.cred🈁
postconf: warning: /etc/postfix/main.cf: unused parameter: mydomain_fallback=localhost🈁
$
設定ファイルは,次の場所に入っている・・・となっている.
server_config_directory = /Library/Server/Mail/Config/postfix
$ ls -la /etc/postfix🆑
total 220
drwxr-xr-x 35 root wheel 1120 4 11 00:45 .
drwxr-xr-x 129 root wheel 4128 4 7 13:59 ..
-rw-r--r-- 1 root wheel 11942 7 26 2017 LICENSE
-rw-r--r-- 1 root wheel 1629 7 26 2017 TLS_LICENSE
-rw-r--r-- 1 root wheel 20876 1 1 2017 access
-rw-r--r-- 1 root wheel 21535 7 26 2017 access~orig
-rw-r--r-- 1 root wheel 8829 1 1 2017 aliases
-rw-r--r-- 1 root wheel 10086 7 26 2017 aliases~orig
-rw-r--r-- 1 root wheel 3547 7 26 2017 bounce.cf.default
-rw-r--r-- 1 root wheel 11681 1 1 2017 canonical
-rw-r--r-- 1 root wheel 12000 7 26 2017 canonical~orig
-rw-r--r-- 1 root wheel 44 7 26 2017 custom_header_checks
-rw-r--r-- 1 root wheel 10221 7 26 2017 generic
-rw-r--r-- 1 root wheel 21535 1 1 2017 header_checks
-rw-r--r-- 1 root wheel 23802 7 26 2017 header_checks~orig
-rw-r--r-- 1 root wheel 27413 4 11 00:45 main.cf🈁
-rw-r--r-- 1 root wheel 27370 4 6 15:10 main.cf.20180407
-rw-r--r-- 1 root wheel 26856 1 1 2017 main.cf.default
-rw-r--r-- 1 root wheel 27308 7 26 2017 main.cf.default~orig
-rw-r--r-- 1 root wheel 26862 7 26 2017 main.cf.proto
-rw-r--r-- 1 root wheel 27308 7 26 2017 main.cf~orig
-rw-r--r-- 1 root wheel 4760 7 26 2017 makedefs.out
-rw-r--r-- 1 root wheel 7422 1 1 2017 master.cf
-rw-r--r-- 1 root wheel 7443 7 26 2017 master.cf.default
-rw-r--r-- 1 root wheel 6230 7 26 2017 master.cf.proto
-rw-r--r-- 1 root wheel 7443 7 26 2017 master.cf~orig
-rw-r--r-- 1 root wheel 18647 1 1 2017 postfix-files
drwxr-xr-x 2 root wheel 64 7 26 2017 postfix-files.d
-rw-r--r-- 1 root wheel 20330 7 26 2017 postfix-files~orig
-rw-r--r-- 1 root wheel 6816 8 2 2015 relocated
-rw-r--r-- 1 root wheel 6929 7 26 2017 relocated~orig
-rw-r--r-- 1 root wheel 12549 8 2 2015 transport
-rw-r--r-- 1 root wheel 12666 7 26 2017 transport~orig
-rw-r--r-- 1 root wheel 12494 1 1 2017 virtual
-rw-r--r-- 1 root wheel 12823 7 26 2017 virtual~orig
$
$ sudo vi /etc/postfix/main.cf🆑
Password:🔐
$
# (APPLE) The SACL cache caches the results of Mail Service ACL lookups.
# Tune these to make the cache more responsive to changes in the SACL.
# The cache is only in memory, so bouncing the sacl-cache service clears it.
use_sacl_cache = yes🈁
# sacl_cache_positive_expire_time = 7d
# sacl_cache_negative_expire_time = 1d
# sacl_cache_disabled_expire_time = 1m
# (APPLE) The SACL cache caches the results of Mail Service ACL lookups.
# Tune these to make the cache more responsive to changes in the SACL.
# The cache is only in memory, so bouncing the sacl-cache service clears it.
#use_sacl_cache = yes🆑
# sacl_cache_positive_expire_time = 7d
# sacl_cache_negative_expire_time = 1d
# sacl_cache_disabled_expire_time = 1m
# (APPLE) Credentials for using URLAUTH with IMAP servers.
imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred🈁
# (APPLE) Credentials for using URLAUTH with IMAP servers.
#imap_submit_cred_file = /Library/Server/Mail/Config/postfix/submit.cred🆑
$ postconf -n🆑
biff = no
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /Library/Server/Mail/Data/mta
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb
$daemon_directory/$process_name $process_id & sleep 5
dovecot_destination_recipient_limit = 1
html_directory = /usr/share/doc/postfix/html
inet_interfaces = loopback-only
inet_protocols = all
mail_owner = _postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10485760
mynetworks = 127.0.0.0/8, [::1]/128
newaliases_path = /usr/bin/newaliases
queue_directory = /Library/Server/Mail/Data/spool
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
server_config_directory = /Library/Server/Mail/Config/postfix
setgid_group = _postdrop
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
smtpd_tls_ciphers = medium
smtpd_tls_exclude_ciphers = SSLv2, aNULL, ADH, eNULL
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
$
inet_interfaces = loopback-only
#server_config_directory = /Library/Server/Mail/Config/postfix
server_config_directory = /etc/postfix
$ sudo postfix start🆑
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
postfix/postfix-script: warning: group or other writable: /Library/Server/Mail/Data/mta/.
postfix/postfix-script: starting the Postfix mail system
postfix/postfix-script: fatal: mail system startup failed🈁
$