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
------------------------------
2018年2月5日月曜日
登録:
コメントの投稿 (Atom)
人気の投稿
-
RHEL 7以降より、ネットワークデバイスが従来のeth0、eth1といったものからens192、ens224といった名称に変更になっている。これは、「biosdevname」と呼ばれる仕組みで名称が決定されるようになった。 この名称ルールによって、vSphereの仮想環境に...
-
コマンドラインを使って文字列操作を行う場合、Linuxでは sed コマンドを使って実施するのが鉄板だが、WindowsではPowerShellのコマンドレットを組み合わせることでほぼ同様のことができる。 今回、いくつか sed でよく使う文字列処理のパターンに対して、Powe...
-
Linuxなら迷うこと無く diff コマンドがあるので問題ないが、Windowsの場合どうすれば良いか悩んでしまうことがある。フリーソフトがインストールできる環境ならまだしも、インターネットに繋がないサーバーとなると、OS標準のコマンドで実施する必要があるので調べてみた。...
-
残念ながらコマンドプロンプトでは簡単に実現できないが、PowerShellを使えばできる、という小ネタ。コマンドは以下の通り。 ・head Get-Content "<ログファイル名>" | Select-Object -first 100 ・tai...
-
Postfixでメール送信を行う際に、/var/log/maillogに以下エラーが出力されて、送信が拒否されることがある。 ------------------------------ Feb 17 08:26:31 t1110rh72 postfix/smtpd[109...
0 件のコメント:
コメントを投稿