Postfixでメール送信を行う際に、以下のようなエラーで失敗することがある。
# postqueue -p
------------------------------
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
782A818BD67B 429 Sat Jan 13 21:05:10 ex-1@example.com
(maildir delivery failed: create maildir file /var/spool/virtual/example1.com/ex1-1/Maildir/tmp/1515845435.P3212.t1110rh72: Permission denied)
ex1-1@example1.com
-- 0 Kbytes in 1 Request.
------------------------------
これはSELinuxが動いていることが原因となるので、以下の通り無効化してしまえばよい。
※SELinuxを無効化したくない場合は、適切にSELinuxを設定するしかないが、本記事の範囲外とする。
# getenforce
------------------------------
Enforcing
------------------------------
# setenforce 0
# getenforce
------------------------------
Permissive
------------------------------
上記はOS再起動をするともとに戻ってしまうので、以下設定ファイルを修正して完全にSELinuxを無効化しておく。
# cat /etc/selinux/config
------------------------------
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
------------------------------
0 件のコメント:
コメントを投稿