ホーム » 「postgrey」タグがついた投稿

タグアーカイブ: postgrey

システム

最近の投稿

アーカイブ

カテゴリー

postgreyの更新トラブル

postgrey に更新があった(1.36-5.2 ⇒ 1.37-1)ため、外部からのメールが届かなくなり、設定の変更が必要となった。

postgrey trouble

職場で動かしている WordPress の2段階認証メールを自宅サーバに転送しているが、2段階認証のメールが届かなくなった。原因は、怪しいメールは一旦拒絶することで spam を拒否してくれる postgrey がうまく機能していないと思われる。

/var/log/mail.log を見ると、下記のようなエラーで postgrey が起動していない。

May 5 16:53:15 ...: warning: problem talking to server
   127.0.0.1:10023: Connection refused

エラーを探すと /var/log/syslog に以下のメッセージを残して、postgrey 起動に失敗しているので、

May  5 17:11:53 ... postgrey[974882]:
   Option greylist-text requires an argument

/etc/default/postgrey の POSTGREY_TEXT のオプションをコメントアウト。

((( /etc/default/postgrey )))
- POSTGREY_TEXT=""
+ # POSTGREY_TEXT="reject by postgrey"

しかし、この変更後も職場からのメールが reject されている。

May  5 17:19:20 ... postfix/smtpd[975541]:
  NOQUEUE: reject: RCPT from unknown[xxx.xxx.xxx.xxx]:
  450 4.2.0 <t-saitoh@tsaitoh.net>: Recipient address rejected:
  reject by postgrey; from=<www-data@...> to=<...@...> ...

たぶん、職場のサーバは Azureで動かしているが、今回の更新による拒否判定が厳しくなったんだろう。仕方がないので、/etc/postgrey/whitelist_clients.local に、自分の管理している Azure サーバのIPアドレスを書き並べる

((( /etc/postgrey/whitelist_clients.local )))
xxx.xxx.xxx.xxx 職場のWordPressサーバのIPアドレス

でも、postgrey-1.37 の更新は本家の changelog を見ると 2016年 みたいだけど、debian パッケージでは随分遅れての 更新だな。手法的にも、もっと確実な、SPF とか DKIM の対応がすすんで、postgrey は時代遅れなのかな。自宅サーバでは、postgrey で reject しそうな接続元は GEOIP で SMTP 拒否しまくりだし、あまり役に立ってないかも。

postfix backward compatibility

今回のトラブルで改めて、postfix のエラーログを見ているとpostfixの再起動時に以下のようなメッセージが出ている。

May  5 19:06:07 ...: Postfix is running with backwards-compatible default settings
May  5 19:06:07 ...: See http://www.postfix.org/COMPATIBILITY_README.html for details
May  5 19:06:07 ...: To disable backwards compatibility use "postconf compatibility_level=3.6" and "postfix reload"

設定ファイルでは、compatibilty_level が 2 とかになっていたので、書いてある通り 3.6 に上げておく。

((( /etc/postfix/main.cf )))
compatibility_level = 3.6

Google 検索

My Google   Yahoo

Microsoft

ファンサイト