Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC違反のメールアドレス の許容 #1325

Closed
ghost opened this issue Dec 15, 2015 · 28 comments
Closed

RFC違反のメールアドレス の許容 #1325

ghost opened this issue Dec 15, 2015 · 28 comments
Labels
document Improvements or additions to documentation
Milestone

Comments

@ghost
Copy link

ghost commented Dec 15, 2015

フロント側の「お客様情報の入力」画面で、メールアドレスを入力する項目について、相談させてください。
運用中のサイトから出てきた問題なのですが、過去のISSUESを確認するとこの箇所のチェックについてRFC2822の規格を元にチェック処理を行っていると思います。

最終対応、EC-CUBE3.0.5
#692
#829

それで、 問題点についてですがキャリアメールについて問題があるのを見つけました。
・NTTドコモ メールアドレス
https://www.nttdocomo.co.jp/info/spam_mail/measure/change_add/
このサイトを見ると、

*また、2009年4月1日以降、「.」は「..」などのように連続で使用することや@マークの直前で使用することはできなくなりました。 注意アドレス内に「..」や「.@」が存在する場合、一部のメールサービスからのメールが正しく届かない可能性がございます。

とあり、2009年4月より前は@より前に「..」が使えていました。

今回運用中のサイトで該当のメールアドレスが入ってきたので、今後どうして行くか検討の余地があるかなと思います。

@Yangsin Yangsin added the question Further information is requested label Dec 15, 2015
@Yangsin
Copy link

Yangsin commented Dec 15, 2015

RFC違反のアドレス自体は徐々に使えなくなっていっていると思っていますが、今回のケースの場合にお客様は代替の手段がないものでしょうか。
代替手段のないお客様がまだまだいるのであれば、2系同様に許容することも検討する価値はありそうです。それが日本製であるEC-CUBEの良さでもあるので。
ちょっと皆様の状況をお伺いしてみたいポイントですね。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 15, 2015

結構跳ねられるシステム増えましたよね・・・
validationの厳密さを優先するか、ガラケー対応を優先するかという問題になりますね。

@nanasess
Copy link
Contributor

顧客の某サイトでは、まだ2000件以上ありました。
docomo の SP モードでスマートフォンをお使いのお客様が多いです。

@nanasess nanasess changed the title 【フロント側】お客様情報の入力画面について 【フロント側】お客様情報のメールアドレスについて Dec 15, 2015
@shhirose
Copy link
Contributor

これローカル部をダブルクォーテーションで括って送信すれば送信されると思います。
RFCのチェック有無を判定して、#829 で追加された validator の strict の値を false にし、送信処理でダブルクォーテーションをつければよいかと思います。
前の案件でやっていましたので大丈夫だと思うのですが、検証できる環境があれば検証していただきたいと思います。

例)hoge.@example.com → "hoge."@example.com

対応しようと思っていたのですが、時間と検証環境がないためなかなかできませんでした・・・。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

@shhirose
RFC違反の動作を行うのでしたら、MTAごとに検証をしないといけないと思います。

@seasoftjapan
Copy link
Contributor

@ttsuru
ガラケーのみなんでしたっけ? だったら、スルーしても良い気はします。
スマホでも存在するなら深刻ですね。

@seasoftjapan
Copy link
Contributor

「..」とか「.@」を検出して、「"」クォートでフォーム入力するように誘導できないですか?

けど、インターフェイス的に、スマートじゃないか・・・

@nanasess
Copy link
Contributor

スマホでも存在するんです。 docomo の SP モードや ezweb で過去に作成したメールアドレスを使い続けることが可能なので。某顧客のところでは2000件以上ありました。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

@seasoftjapan
スマホ時代になってからアドレス変更をした方はRFC違反にはなっていません。
かなり前から変更していない方ですね。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

@nanasess
2000件という数字よりも、その中で実際のアクティブユーザーが何%とか、全体の何%という方が議論になると思います。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

本件は切り替えられるようになっているようが良さそうな気がします。。。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

いつからRFC違反のアドレスに変更できなくなったかをまとめました。

2003年 vodafone移行時
2009年4月 docomo
2009年9月 au

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

SwiftMailer でも話題に上がっています。
swiftmailer/swiftmailer#71

@seasoftjapan
Copy link
Contributor

本件は切り替えられるようになっているようが良さそうな気がします。。。

賛成です。

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

6年前にもEC-CUBEで話題になっていますね。
http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=5456&forum=9

@shhirose
Copy link
Contributor

2系の標準ではどうなんでしょうか?

@nanasess
Copy link
Contributor

2系(2.11以降)は切り替えられるようになっていて、デフォルトは RFC違反も許容してます。

@shhirose
Copy link
Contributor

その時はどのような対応だったんでしょうか?
基本的にその対応をするって方針でいいんではないでしょうか。

@nobuhiko
Copy link
Contributor

3系は swiftmailer がエラーで落ちるということなのでこういう対応になっているんですが、そこは大丈夫なのでしょうか?

@shhirose
Copy link
Contributor

そこも含めて検証する必要はありますね

@ttsuru
Copy link
Contributor

ttsuru commented Dec 20, 2015

@nobuhiko @shhirose
swiftmailer/swiftmailer#71
こちらにあるようにロジックの差し替えが必要ですね。

@Yangsin
Copy link

Yangsin commented Dec 20, 2015

ざっとご意見拝見したかぎり。

ガラケーのサポートとRFC違反のメールアドレスの許容は別問題で、RFC違反のアドレスは未だ利用されており切替可能な事が望ましいですね。

@ryo-endo ryo-endo added this to the 3.x milestone Aug 1, 2016
@nanasess
Copy link
Contributor

修正箇所が多く、切り替えできるまでは至ってないのですが、こんな感じの対応で送信できるようになると思います。
nanasess@5a646b1

@Yangsin Yangsin modified the milestones: 3.1.0, 3.x Nov 29, 2016
@Yangsin Yangsin changed the title 【フロント側】お客様情報のメールアドレスについて RFC違反のメールアドレス の許容 Oct 10, 2017
@Yangsin Yangsin added the enhancement 機能追加 label Oct 10, 2017
@Yangsin
Copy link

Yangsin commented Oct 17, 2017

切替まで実装することが困難なことから、カスタマイズTipsとしての扱いでドキュメントとしてまとめていくこととします。

@Yangsin Yangsin added document Improvements or additions to documentation and removed enhancement 機能追加 experimental question Further information is requested labels Oct 17, 2017
@Yangsin Yangsin modified the milestones: 3.n.0, Not release Oct 17, 2017
@ttsuru
Copy link
Contributor

ttsuru commented Oct 18, 2017

こちら、他のSymfonyの案件で対応しました。
swiftmailer 6ではValidationの実装が分離されており、カスタマイズ可能となっています。

@ttsuru
Copy link
Contributor

ttsuru commented Oct 18, 2017

            "require": {
                "egulias/email-validator": "~2.0",
                "php": ">=7.0.0"
            },

なので採用は少しむずかしいかもしれません。

@chihiro-adachi
Copy link
Contributor

#3667

@Yangsin Yangsin modified the milestones: Not release, 4.0 Jul 11, 2023
@Yangsin
Copy link

Yangsin commented Jul 11, 2023

#3667 が採用され、4系で実装済み

@Yangsin Yangsin closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
document Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

8 participants