mailコマンドで送信できません

3年ほど前にこちらでお世話になり、メールサーバを構築した者です。

OSXを10.8から10.11へアップグレードしたところメールサーバの送受信が動作しなくなったため、設定をゼロから見直し、再構築しようとしています。


postfixのmain.cfとエラーログは下記の通りですが、mailコマンドで送信したはずのメールが ~/Mailbox ファイルに保存されず、mailコマンドでの読み出しもできない状態です。


Mailbox形式で送受信できたら、次はMaildir形式での送信、virtual_mailbox+dovecot設定とステップを進めたいのですが、何が問題なのか見当もつきません。

原因や対処法について、アドバイスいただけないでしょうか。



・環境は、Mac mini(Late 2012), Mac OSX 10.11.4, Postfix 2.11(メールサーバは外部へ接続せず、完全に閉じたLANの中でのみ運用しています)


・procmailは全く設定していない筈ですが、何故このエラーメッセージにだけprocmailが出てくるのか分かりません。procmailは使っていないので、/usr/bin/procmailもありません


・/private/var/spool/postfix 内の各フォルダ(maildrop, incoming, active, bounce)更新日は、メールが送信失敗した日時になります(読み書き禁止のためフォルダの内容は見えません)


・ホームフォルダに「Mailbox」という名前の空のテキストファイル(パーミッション=664)を置いてから、再度送信トライしてみましたが、結果は同じでした


■Postfix設定

acMiniCore-i7:~ admin$ postconf -n

biff = no

bounce_queue_lifetime = 0

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

debug_peer_level = 2

debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5

home_mailbox = Mailbox

html_directory = /usr/share/doc/postfix/html

inet_interfaces = all

inet_protocols = all

mail_owner = _postfix

mailbox_size_limit = 0

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

message_size_limit = 1000000000

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

mydomain = lanserver.jp

myhostname = mail.lanserver.jp

mynetworks = 192.168.0.0/16, 127.0.0.0/8

mynetworks_style = subnet

newaliases_path = /usr/bin/newaliases

queue_directory = /private/var/spool/postfix

readme_directory = /usr/share/doc/postfix

recipient_delimiter = +

resolve_numeric_domain = yes

sample_directory = /usr/share/doc/postfix/examples

sendmail_path = /usr/sbin/sendmail

setgid_group = _postdrop

smtpd_client_restrictions = permit_mynetworks

smtpd_recipient_restrictions = permit_mynetworks, reject

smtpd_sasl_auth_enable = no

smtpd_tls_ciphers = medium

smtpd_use_tls = no

tls_random_source = dev:/dev/urandom

unknown_local_recipient_reject_code = 550

MacMiniCore-i7:~ admin$


■postfixエラーログ

Jun 4 10:00:37 MacMiniCore-i7 postfix/pickup[550]: AF2DC2A0637: uid=502 from=<admin>

Jun 4 10:00:37 MacMiniCore-i7 postfix/cleanup[633]: AF2DC2A0637: message-id=<20160604010037.AF2DC2A0637@mail.lanserver.jp>

Jun 4 10:00:37 MacMiniCore-i7 postfix/qmgr[551]: AF2DC2A0637: from=<admin@mail.lanserver.jp>, size=331, nrcpt=1 (queue active)

Jun 4 10:00:37 MacMiniCore-i7 postfix/local[635]: AF2DC2A0637: to=<admin@mail.lanserver.jp>, orig_to=<admin>, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=5.3.0, status=bounced (Command died with status 126: " exec /usr/bin/procmail". Command output: sh: /usr/bin/procmail: No such file or directory sh: line 0: exec: /usr/bin/procmail: cannot execute: No such file or directory )

Jun 4 10:00:37 MacMiniCore-i7 postfix/cleanup[633]: B69D32A0639: message-id=<20160604010037.B69D32A0639@mail.lanserver.jp>

Jun 4 10:00:37 MacMiniCore-i7 postfix/qmgr[551]: B69D32A0639: from=<>, size=2407, nrcpt=1 (queue active)

Jun 4 10:00:37 MacMiniCore-i7 postfix/bounce[637]: AF2DC2A0637: sender non-delivery notification: B69D32A0639

Jun 4 10:00:37 MacMiniCore-i7 postfix/qmgr[551]: AF2DC2A0637: removed

Jun 4 10:00:37 MacMiniCore-i7 postfix/local[635]: B69D32A0639: to=<admin@mail.lanserver.jp>, relay=local, delay=0, delays=0/0/0/0, dsn=5.3.0, status=bounced (Command died with status 126: " exec /usr/bin/procmail". Command output: sh: /usr/bin/procmail: No such file or directory sh: line 0: exec: /usr/bin/procmail: cannot execute: No such file or directory )

Jun 4 10:00:37 MacMiniCore-i7 postfix/qmgr[551]: B69D32A0639: removed

Jun 4 12:35:29 MacMiniCore-i7 postfix/pickup[741]: 30A2D2A1591: uid=502 from=<admin>

Jun 4 12:35:29 MacMiniCore-i7 postfix/cleanup[802]: 30A2D2A1591: message-id=<20160604033529.30A2D2A1591@mail.lanserver.jp>

Jun 4 12:35:29 MacMiniCore-i7 postfix/qmgr[551]: 30A2D2A1591: from=<admin@mail.lanserver.jp>, size=327, nrcpt=1 (queue active)

Jun 4 12:35:29 MacMiniCore-i7 postfix/local[804]: 30A2D2A1591: to=<admin@[192.168.0.50]>, orig_to=<admin@192.168.0.50>, relay=local, delay=0.08, delays=0.03/0.02/0/0.03, dsn=5.3.0, status=bounced (Command died with status 126: " exec /usr/bin/procmail". Command output: sh: /usr/bin/procmail: No such file or directory sh: line 0: exec: /usr/bin/procmail: cannot execute: No such file or directory )

Jun 4 12:35:29 MacMiniCore-i7 postfix/cleanup[802]: 3FBD42A1593: message-id=<20160604033529.3FBD42A1593@mail.lanserver.jp>

Jun 4 12:35:29 MacMiniCore-i7 postfix/bounce[806]: 30A2D2A1591: sender non-delivery notification: 3FBD42A1593

Jun 4 12:35:29 MacMiniCore-i7 postfix/qmgr[551]: 3FBD42A1593: from=<>, size=2429, nrcpt=1 (queue active)

Jun 4 12:35:29 MacMiniCore-i7 postfix/qmgr[551]: 30A2D2A1591: removed

Jun 4 12:35:29 MacMiniCore-i7 postfix/local[804]: 3FBD42A1593: to=<admin@mail.lanserver.jp>, relay=local, delay=0, delays=0/0/0/0, dsn=5.3.0, status=bounced (Command died with status 126: " exec /usr/bin/procmail". Command output: sh: /usr/bin/procmail: No such file or directory sh: line 0: exec: /usr/bin/procmail: cannot execute: No such file or directory )

Jun 4 12:35:29 MacMiniCore-i7 postfix/qmgr[551]: 3FBD42A1593: removed

Mac mini, OS X El Capitan (10.11.4), Postfix, Dovecot, AppleMail

投稿日 2016/06/03 22:41

返信
返信: 1

2016/07/05 23:05 Beginner70 への返信

自己レスですが、一応解決できましたので報告します。


エラーメッセージ「Command died with status 126: " exec /usr/bin/procmail". 」の原因となっていた procmail記述は、ホームフォルダ直下の .forward に書かれていました。

.forward は残したまま procmail記述を削除したところ、mailコマンドで送受信できるようになりました。


上記エラーメッセージが local プロセスから出ていたので、Postfixの公式マニュアルで local の項を読み直し、.forward(不可視ファイル)の存在に気づいた次第です。


以前一度 procmail を導入しようとして上手くいかずにアンインストールしたつもりが、不完全な形で残っていたのかもしれません。


その他、sudo postfix set-permissions を実行、回復モードで起動してrootles解除なども試しましたが、結果として、これらはあまり関係なかった気がします。


お騒がせしてしまい、失礼しました。

また何かありましたら相談させていただくかもしれませんが、よろしくお願いいたします。

このスレッドはシステム、またはAppleコミュニティチームによってロックされました。 問題解決の参考になる情報であれば、どの投稿にでも投票いただけます。またコミュニティで他の回答を検索することもできます。

mailコマンドで送信できません

Apple サポートコミュニティへようこそ
Apple ユーザ同士でお使いの製品について助け合うフォーラムです。Apple Account を使ってご参加ください。