Plesk12.5 status=deferred (connect to example.com[111.xxx.yyy.2]:25: Connection refused

優

WEBサーバのお問い合わせページから、メールサーバにポストしたところ25番ポートで拒否されたので待ちうけできるようにする紹介記事です。

 

※当該資料によって生じたいかなる損害に対してもその程度に関わらず、一切の責任は負いかねますのでご了承ください。

 

 

環境

  • メールサーバ:Plesk12.5.50

 

WEBサーバのログを見よう

 

WEBサーバのメールログ

# tail -f /var/log/maillog

web1 postfix/pickup[2170]: 4122C056E: uid=1002 from=<hogeuser>
web1 postfix/cleanup[2836]: 4122C056E: message-id=<adretrkpxxxdfds@example.com>
web1 postfix/qmgr[2171]: 4122C056E: from=<hogeuser@example.com>, size=807, nrcpt=1 (queue active)
web1 postfix/smtp[2838]: connect to example.com[111.xxx.yyy.2]:25: Connection refused
web1 postfix/smtp[2838]: 4140624C056E: to=<info@example.com>, relay=none, delay=0.04, delays=0.03/0.01/0/0, dsn=4.4.1, status=deferred (connect to example.com[111.xxx.yyy.2]:25: Connection refused)

25ポートが拒否されています。

 

 

ポートを確認します。

# nmap 111.xxx.yyy.2

Starting Nmap 6.40 ( http://nmap.org ) at 2016-12-26 22:23 JST
Nmap scan report for mail.example.com (111.xxx.yyy.2)
Host is up (0.00041s latency).
Not shown: 865 closed ports, 124 filtered ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
53/tcp   open  domain

(略)

ファイアウォールで25が開いていないか、25番をメールサーバ側で待ちうけしていないかですね。

 

 

Plesk メールサーバ側作業

# vi /etc/postfix/master.cf

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd ←確認

#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
#submission inet n       -       n       -       -       smtpd

smtpの設定を確認します。

 

Postfixを起動します。

# systemctl enable postfix
Created symlink from /etc/systemd/system/multi-user.target.wants/postfix.service to /usr/lib/systemd/system/postfix.service.

# systemctl start postfix

 

 

ホワイトリストも設定しておきます。

mail Plesk12

【ツールと設定】>> 【サーバ全体のメール設定】>>【ホワイトリスト】>>【ネットワークを追加】をクリックして、

WEBサーバのIPアドレス/32を追加します。

 

WEBサーバからNmapを行います。

# nmap 111.xxx.yyy.2

Starting Nmap 6.40 ( http://nmap.org ) at 2016-12-26 22:23 JST
Nmap scan report for mail.example.com (111.xxx.yyy.2)
Host is up (0.00041s latency).
Not shown: 865 closed ports, 124 filtered ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
25/tcp   open  smtp ←見えた
53/tcp   open  domain

(略)

25番が待ちうけされました。

 

これでWEBサーバのお問い合わせからPleskメールサーバに25でメールが出来るようになりました。

Pleskは奥が深いというか、バッドノウハウの宝庫ですね~!

 

お疲れ様です。

 

最新情報をチェックしよう!
>システム構築・保守に特化した会社です。

システム構築・保守に特化した会社です。

システムの構築・保守運用「システムガーディアン」 社内システム担当が欲しいが、専属で雇うほどの仕事量はない。 必要な時に必要なだけ頼りたいというお悩みを持つ企業様へ専門知識を持って対応を行っております。 サーバから各種システムまで自社・他社で構築されたシステムに対してサポートを行っております。

CTR IMG