Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/amp.php on line 38
Postfixで逆引き出来ないホストのメールが受信・転送されない時の解決法 | freeSIM.tokyo
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/scripts.php on line 131

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::get_locale is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 54

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::get_thumbnail is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 190

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Options::get is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 192

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::default_options is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-options.php on line 48

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::settings is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 188

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 129

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::hex_to_rgb is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 193

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Options::get is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 61

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::default_options is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-options.php on line 48

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::settings is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 188

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 129

Postfixで逆引き出来ないホストのメールが受信・転送されない時の解決法


Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4923

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4929

シェアする


Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Options::get is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-view.php on line 131

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::default_options is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-options.php on line 48

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::settings is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 188

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 129

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::sns_list is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-shortcode.php on line 218

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::default_options is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 206

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::settings is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 188

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 129

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::get_current_url is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-shortcode.php on line 219

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::notification_list is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/class-module-shortcode.php on line 251

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::default_options is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 232

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Variable::settings is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 188

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 129

Deprecated: Calling static trait method VASOCIALBUZZ\Modules\Functions::exists_push7 is deprecated, it should only be called on a class using the trait in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/plugins/va-social-buzz/incs/trait-variables.php on line 235

基本メールはサーバ側でPostfixを稼働させてGmailに転送する方法を取っています。つまりメールボックスはGmail、メールアドレスは独自ドメインで、という運用。
けれど稀に受け取れないメールがあるんです。まぁ今回で言えばモバイルSuicaなんですがw
このPostfixの逆引きチェックを無効化する方法です。


Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4923

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4929

Postfixの送信ホスト逆引きを無効に

前の「モバイルSuicaからのメールが受け取れない」経緯はこちら。
https://freesim.tokyo/apple-watch/recover-apple-watch-suica/

登録したメールアドレスにモバイルSuica側からメールが送られてくるんですが、これがPostfixではねられちゃうんですね。
maillogはこんな感じ。

postfix/smtpd[1295]: NOQUEUE: reject: RCPT from unknown[157.71.17.123]: 450 4.7.1 Client host rejected: cannot find your hostname, [157.71.17.123]; from=<info@mobilesuica.com> to=<***@******.***> proto=ESMTP helo=<mssprdka7mtr12v.msprd.second.mobilesuica.sys.jeis.co.jp>

普段のモバイルSuicaのDMは届くのに・・・w
要はモバイルSuicaの管理画面は別のメールサーバからメールを飛ばしてるんですね。
以前はモバイルSuicaは「@suicainternetservice.com」というドメインでメールを飛ばしていたのですが、今は「@mobilesuica.com」に変わっています。postfixのaccessに書いてたので変わったのがわかりました。
前回はそうやってドメインを指定して許可するようにしていたと思うのですが、今回は同じように追加しても駄目。多分Suicaのシステムが変わったんだろうと思います。
そしてそのメールサーバが逆引き設定されてないという・・・?

いずれにせよ解決しなきゃいけないので色々調べました。
けどほとんどのサイトが「逆引きできないホストからのメール受信拒否」を書いてるんですね。スパムメール対策として。
けど実際にはモバイルSuicaとかでも逆引きできない事があるので、スパム排除できるより、肝心のメールがREJECTされるリスクの方がデカイ・・・。

Postfixで逆引きチェックしない設定

調べた結果、main.cfに以下設定を追加することで逆引きしないようにできるようです。

smtpd_peername_lookup = no

この設定、デフォルトはyesのようですね。

smtpd_peername_lookup (デフォルト: yes)
リモートSMTPクライアントのホスト名検索を試行し、クライアントIPアドレスにその名前がマッチすることを検証します。クライアント名が検索できなかったり検証できなかった場合、名前の検索が無効になっている場合は、クライアント名は “unknown” と設定されます。名前の検索を無効にすることで、DNS検索による遅延を減らすことができ、内向きの最大配送速度を早くすることができます。

この機能はPostfix 2.3以降で使えます。

Postfix設定パラメータ

また、この設定があると駄目かも。僕はコメントアウトしました。

smtpd_sender_restrictions = reject_unknown_sender_domain

けど今回のモバイルSuicaの例でもわかるように、逆引きできないホスト=スパムサーバ、と必ずしも言い切れないケースが増えてきています。
別途輸入代行屋さんのメールサーバも同じでした。その時も「メールこないな・・・」>maillog見るとはねられてる>accessにドメイン追加、みたいなことをやっています。
けど僕のようなメール転送のみの使い方なら、スパムはGmail側で弾けばよくって、Postfixは全部転送してくれた方がいいんですよね・・・。
ということでしばらくこの設定で試してみます。

この記事が気に入ったら
いいね!お願いします


Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4923

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4929

シェアする

フォローする


Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4923

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/freesim.tokyo/httpdocs/wp-content/themes/simplicity2/lib/customizer.php on line 4929