sisimai 4.14.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sisimai might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +165 -0
- data/.travis.yml +21 -0
- data/ANALYTICAL-PRECISION +54 -0
- data/Changes +5 -0
- data/Developers.mk +129 -0
- data/Gemfile +9 -0
- data/LICENSE +26 -0
- data/Makefile +56 -0
- data/README.md +300 -0
- data/Rakefile +7 -0
- data/Repository.mk +69 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/sisimai.rb +60 -0
- data/lib/sisimai/address.rb +218 -0
- data/lib/sisimai/arf.rb +343 -0
- data/lib/sisimai/data.rb +413 -0
- data/lib/sisimai/data/json.rb +36 -0
- data/lib/sisimai/data/yaml.rb +32 -0
- data/lib/sisimai/datetime.rb +518 -0
- data/lib/sisimai/mail.rb +82 -0
- data/lib/sisimai/mail/maildir.rb +85 -0
- data/lib/sisimai/mail/mbox.rb +69 -0
- data/lib/sisimai/mail/stdin.rb +52 -0
- data/lib/sisimai/mda.rb +152 -0
- data/lib/sisimai/message.rb +510 -0
- data/lib/sisimai/mime.rb +127 -0
- data/lib/sisimai/msp.rb +54 -0
- data/lib/sisimai/msp/de/einsundeins.rb +174 -0
- data/lib/sisimai/msp/de/gmx.rb +197 -0
- data/lib/sisimai/msp/jp/biglobe.rb +179 -0
- data/lib/sisimai/msp/jp/ezweb.rb +292 -0
- data/lib/sisimai/msp/jp/kddi.rb +195 -0
- data/lib/sisimai/msp/ru/mailru.rb +306 -0
- data/lib/sisimai/msp/ru/yandex.rb +241 -0
- data/lib/sisimai/msp/uk/messagelabs.rb +250 -0
- data/lib/sisimai/msp/us/amazonses.rb +248 -0
- data/lib/sisimai/msp/us/aol.rb +234 -0
- data/lib/sisimai/msp/us/bigfoot.rb +243 -0
- data/lib/sisimai/msp/us/facebook.rb +306 -0
- data/lib/sisimai/msp/us/google.rb +357 -0
- data/lib/sisimai/msp/us/outlook.rb +243 -0
- data/lib/sisimai/msp/us/receivingses.rb +247 -0
- data/lib/sisimai/msp/us/sendgrid.rb +257 -0
- data/lib/sisimai/msp/us/verizon.rb +311 -0
- data/lib/sisimai/msp/us/yahoo.rb +178 -0
- data/lib/sisimai/msp/us/zoho.rb +198 -0
- data/lib/sisimai/mta.rb +55 -0
- data/lib/sisimai/mta/activehunter.rb +155 -0
- data/lib/sisimai/mta/apachejames.rb +194 -0
- data/lib/sisimai/mta/courier.rb +307 -0
- data/lib/sisimai/mta/domino.rb +209 -0
- data/lib/sisimai/mta/exchange.rb +314 -0
- data/lib/sisimai/mta/exim.rb +549 -0
- data/lib/sisimai/mta/imailserver.rb +227 -0
- data/lib/sisimai/mta/interscanmss.rb +167 -0
- data/lib/sisimai/mta/mailfoundry.rb +173 -0
- data/lib/sisimai/mta/mailmarshalsmtp.rb +206 -0
- data/lib/sisimai/mta/mcafee.rb +201 -0
- data/lib/sisimai/mta/messagingserver.rb +241 -0
- data/lib/sisimai/mta/mfilter.rb +190 -0
- data/lib/sisimai/mta/mxlogic.rb +283 -0
- data/lib/sisimai/mta/notes.rb +206 -0
- data/lib/sisimai/mta/opensmtpd.rb +225 -0
- data/lib/sisimai/mta/postfix.rb +306 -0
- data/lib/sisimai/mta/qmail.rb +335 -0
- data/lib/sisimai/mta/sendmail.rb +317 -0
- data/lib/sisimai/mta/surfcontrol.rb +193 -0
- data/lib/sisimai/mta/userdefined.rb +148 -0
- data/lib/sisimai/mta/v5sendmail.rb +232 -0
- data/lib/sisimai/mta/x1.rb +156 -0
- data/lib/sisimai/mta/x2.rb +157 -0
- data/lib/sisimai/mta/x3.rb +171 -0
- data/lib/sisimai/mta/x4.rb +365 -0
- data/lib/sisimai/mta/x5.rb +208 -0
- data/lib/sisimai/order.rb +217 -0
- data/lib/sisimai/reason.rb +235 -0
- data/lib/sisimai/reason/blocked.rb +105 -0
- data/lib/sisimai/reason/contenterror.rb +53 -0
- data/lib/sisimai/reason/exceedlimit.rb +60 -0
- data/lib/sisimai/reason/expired.rb +53 -0
- data/lib/sisimai/reason/filtered.rb +98 -0
- data/lib/sisimai/reason/hasmoved.rb +45 -0
- data/lib/sisimai/reason/hostunknown.rb +74 -0
- data/lib/sisimai/reason/mailboxfull.rb +118 -0
- data/lib/sisimai/reason/mailererror.rb +55 -0
- data/lib/sisimai/reason/mesgtoobig.rb +77 -0
- data/lib/sisimai/reason/networkerror.rb +57 -0
- data/lib/sisimai/reason/norelaying.rb +71 -0
- data/lib/sisimai/reason/notaccept.rb +63 -0
- data/lib/sisimai/reason/onhold.rb +45 -0
- data/lib/sisimai/reason/rejected.rb +101 -0
- data/lib/sisimai/reason/securityerror.rb +72 -0
- data/lib/sisimai/reason/spamdetected.rb +172 -0
- data/lib/sisimai/reason/suspend.rb +58 -0
- data/lib/sisimai/reason/systemerror.rb +69 -0
- data/lib/sisimai/reason/systemfull.rb +45 -0
- data/lib/sisimai/reason/toomanyconn.rb +73 -0
- data/lib/sisimai/reason/userunknown.rb +194 -0
- data/lib/sisimai/rfc2606.rb +24 -0
- data/lib/sisimai/rfc3464.rb +497 -0
- data/lib/sisimai/rfc3834.rb +150 -0
- data/lib/sisimai/rfc5322.rb +204 -0
- data/lib/sisimai/rhost.rb +47 -0
- data/lib/sisimai/rhost/googleapps.rb +237 -0
- data/lib/sisimai/smtp.rb +58 -0
- data/lib/sisimai/smtp/reply.rb +81 -0
- data/lib/sisimai/smtp/status.rb +755 -0
- data/lib/sisimai/string.rb +65 -0
- data/lib/sisimai/time.rb +11 -0
- data/lib/sisimai/version.rb +4 -0
- data/set-of-emails/README.md +35 -0
- data/set-of-emails/mailbox/mbox-0 +2467 -0
- data/set-of-emails/mailbox/mbox-1 +71 -0
- data/set-of-emails/maildir/bsd/README.md +261 -0
- data/set-of-emails/maildir/bsd/activehunter-01.eml +54 -0
- data/set-of-emails/maildir/bsd/activehunter-02.eml +53 -0
- data/set-of-emails/maildir/bsd/apachejames-01.eml +46 -0
- data/set-of-emails/maildir/bsd/arf-01.eml +66 -0
- data/set-of-emails/maildir/bsd/arf-02.eml +68 -0
- data/set-of-emails/maildir/bsd/arf-03.eml +56 -0
- data/set-of-emails/maildir/bsd/arf-04.eml +89 -0
- data/set-of-emails/maildir/bsd/arf-05.eml +82 -0
- data/set-of-emails/maildir/bsd/arf-06.eml +166 -0
- data/set-of-emails/maildir/bsd/arf-07.eml +59 -0
- data/set-of-emails/maildir/bsd/arf-08.eml +103 -0
- data/set-of-emails/maildir/bsd/arf-09.eml +104 -0
- data/set-of-emails/maildir/bsd/arf-10.eml +56 -0
- data/set-of-emails/maildir/bsd/arf-11.eml +37 -0
- data/set-of-emails/maildir/bsd/arf-12.eml +40 -0
- data/set-of-emails/maildir/bsd/arf-13.eml +76 -0
- data/set-of-emails/maildir/bsd/arf-14.eml +333 -0
- data/set-of-emails/maildir/bsd/arf-15.eml +66 -0
- data/set-of-emails/maildir/bsd/courier-01.eml +79 -0
- data/set-of-emails/maildir/bsd/courier-02.eml +83 -0
- data/set-of-emails/maildir/bsd/courier-03.eml +85 -0
- data/set-of-emails/maildir/bsd/courier-04.eml +87 -0
- data/set-of-emails/maildir/bsd/de-einsundeins-01.eml +38 -0
- data/set-of-emails/maildir/bsd/de-gmx-01.eml +52 -0
- data/set-of-emails/maildir/bsd/de-gmx-02.eml +51 -0
- data/set-of-emails/maildir/bsd/de-gmx-03.eml +56 -0
- data/set-of-emails/maildir/bsd/de-gmx-04.eml +51 -0
- data/set-of-emails/maildir/bsd/domino-01.eml +33 -0
- data/set-of-emails/maildir/bsd/domino-02.eml +83 -0
- data/set-of-emails/maildir/bsd/exchange-01.eml +31 -0
- data/set-of-emails/maildir/bsd/exchange-02.eml +67 -0
- data/set-of-emails/maildir/bsd/exchange-03.eml +52 -0
- data/set-of-emails/maildir/bsd/exchange-04.eml +28 -0
- data/set-of-emails/maildir/bsd/exchange-05.eml +56 -0
- data/set-of-emails/maildir/bsd/exchange-06.eml +151 -0
- data/set-of-emails/maildir/bsd/exim-01.eml +46 -0
- data/set-of-emails/maildir/bsd/exim-02.eml +41 -0
- data/set-of-emails/maildir/bsd/exim-03.eml +42 -0
- data/set-of-emails/maildir/bsd/exim-04.eml +46 -0
- data/set-of-emails/maildir/bsd/exim-05.eml +49 -0
- data/set-of-emails/maildir/bsd/exim-06.eml +44 -0
- data/set-of-emails/maildir/bsd/exim-07.eml +28 -0
- data/set-of-emails/maildir/bsd/exim-08.eml +42 -0
- data/set-of-emails/maildir/bsd/exim-09.eml +169 -0
- data/set-of-emails/maildir/bsd/exim-10.eml +718 -0
- data/set-of-emails/maildir/bsd/exim-11.eml +718 -0
- data/set-of-emails/maildir/bsd/exim-12.eml +75 -0
- data/set-of-emails/maildir/bsd/exim-13.eml +145 -0
- data/set-of-emails/maildir/bsd/exim-14.eml +32 -0
- data/set-of-emails/maildir/bsd/exim-15.eml +49 -0
- data/set-of-emails/maildir/bsd/exim-16.eml +98 -0
- data/set-of-emails/maildir/bsd/exim-17.eml +50 -0
- data/set-of-emails/maildir/bsd/exim-18.eml +96 -0
- data/set-of-emails/maildir/bsd/exim-19.eml +52 -0
- data/set-of-emails/maildir/bsd/exim-20.eml +159 -0
- data/set-of-emails/maildir/bsd/exim-21.eml +150 -0
- data/set-of-emails/maildir/bsd/exim-22.eml +50 -0
- data/set-of-emails/maildir/bsd/exim-23.eml +57 -0
- data/set-of-emails/maildir/bsd/exim-24.eml +107 -0
- data/set-of-emails/maildir/bsd/exim-25.eml +18 -0
- data/set-of-emails/maildir/bsd/exim-26.eml +111 -0
- data/set-of-emails/maildir/bsd/exim-27.eml +120 -0
- data/set-of-emails/maildir/bsd/exim-28.eml +148 -0
- data/set-of-emails/maildir/bsd/google-apps-01.eml +66 -0
- data/set-of-emails/maildir/bsd/imailserver-01.eml +27 -0
- data/set-of-emails/maildir/bsd/imailserver-02.eml +36 -0
- data/set-of-emails/maildir/bsd/imailserver-03.eml +28 -0
- data/set-of-emails/maildir/bsd/imailserver-04.eml +15 -0
- data/set-of-emails/maildir/bsd/imailserver-05.eml +92 -0
- data/set-of-emails/maildir/bsd/imailserver-06.eml +29 -0
- data/set-of-emails/maildir/bsd/interscanmss-01.eml +49 -0
- data/set-of-emails/maildir/bsd/interscanmss-02.eml +259 -0
- data/set-of-emails/maildir/bsd/jp-biglobe-01.eml +43 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-01.eml +36 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-02.eml +65 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-03.eml +35 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-04.eml +38 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-05.eml +38 -0
- data/set-of-emails/maildir/bsd/jp-ezweb-06.eml +33 -0
- data/set-of-emails/maildir/bsd/jp-kddi-01.eml +49 -0
- data/set-of-emails/maildir/bsd/jp-kddi-02.eml +54 -0
- data/set-of-emails/maildir/bsd/jp-kddi-03.eml +54 -0
- data/set-of-emails/maildir/bsd/mailfoundry-01.eml +50 -0
- data/set-of-emails/maildir/bsd/mailfoundry-02.eml +49 -0
- data/set-of-emails/maildir/bsd/mailmarshalsmtp-01.eml +43 -0
- data/set-of-emails/maildir/bsd/mcafee-01.eml +63 -0
- data/set-of-emails/maildir/bsd/mcafee-02.eml +65 -0
- data/set-of-emails/maildir/bsd/mcafee-03.eml +59 -0
- data/set-of-emails/maildir/bsd/messagingserver-01.eml +102 -0
- data/set-of-emails/maildir/bsd/messagingserver-02.eml +72 -0
- data/set-of-emails/maildir/bsd/messagingserver-03.eml +70 -0
- data/set-of-emails/maildir/bsd/messagingserver-04.eml +102 -0
- data/set-of-emails/maildir/bsd/messagingserver-05.eml +98 -0
- data/set-of-emails/maildir/bsd/messagingserver-06.eml +101 -0
- data/set-of-emails/maildir/bsd/messagingserver-07.eml +129 -0
- data/set-of-emails/maildir/bsd/mfilter-01.eml +49 -0
- data/set-of-emails/maildir/bsd/mfilter-02.eml +48 -0
- data/set-of-emails/maildir/bsd/mfilter-03.eml +43 -0
- data/set-of-emails/maildir/bsd/mxlogic-01.eml +47 -0
- data/set-of-emails/maildir/bsd/mxlogic-02.eml +44 -0
- data/set-of-emails/maildir/bsd/mxlogic-03.eml +46 -0
- data/set-of-emails/maildir/bsd/notes-01.eml +42 -0
- data/set-of-emails/maildir/bsd/notes-02.eml +42 -0
- data/set-of-emails/maildir/bsd/notes-03.eml +38 -0
- data/set-of-emails/maildir/bsd/notes-04.eml +181 -0
- data/set-of-emails/maildir/bsd/opensmtpd-01.eml +33 -0
- data/set-of-emails/maildir/bsd/opensmtpd-02.eml +33 -0
- data/set-of-emails/maildir/bsd/opensmtpd-03.eml +36 -0
- data/set-of-emails/maildir/bsd/opensmtpd-04.eml +40 -0
- data/set-of-emails/maildir/bsd/opensmtpd-05.eml +36 -0
- data/set-of-emails/maildir/bsd/postfix-01.eml +60 -0
- data/set-of-emails/maildir/bsd/postfix-02.eml +78 -0
- data/set-of-emails/maildir/bsd/postfix-03.eml +71 -0
- data/set-of-emails/maildir/bsd/postfix-04.eml +89 -0
- data/set-of-emails/maildir/bsd/postfix-05.eml +78 -0
- data/set-of-emails/maildir/bsd/postfix-06.eml +72 -0
- data/set-of-emails/maildir/bsd/postfix-07.eml +74 -0
- data/set-of-emails/maildir/bsd/postfix-08.eml +78 -0
- data/set-of-emails/maildir/bsd/postfix-09.eml +76 -0
- data/set-of-emails/maildir/bsd/postfix-10.eml +73 -0
- data/set-of-emails/maildir/bsd/postfix-11.eml +86 -0
- data/set-of-emails/maildir/bsd/postfix-12.eml +71 -0
- data/set-of-emails/maildir/bsd/postfix-13.eml +81 -0
- data/set-of-emails/maildir/bsd/postfix-14.eml +68 -0
- data/set-of-emails/maildir/bsd/postfix-15.eml +69 -0
- data/set-of-emails/maildir/bsd/postfix-16.eml +73 -0
- data/set-of-emails/maildir/bsd/postfix-17.eml +68 -0
- data/set-of-emails/maildir/bsd/postfix-18.eml +121 -0
- data/set-of-emails/maildir/bsd/postfix-19.eml +105 -0
- data/set-of-emails/maildir/bsd/postfix-20.eml +231 -0
- data/set-of-emails/maildir/bsd/postfix-21.eml +60 -0
- data/set-of-emails/maildir/bsd/qmail-01.eml +40 -0
- data/set-of-emails/maildir/bsd/qmail-02.eml +35 -0
- data/set-of-emails/maildir/bsd/qmail-03.eml +22 -0
- data/set-of-emails/maildir/bsd/qmail-04.eml +31 -0
- data/set-of-emails/maildir/bsd/qmail-05.eml +31 -0
- data/set-of-emails/maildir/bsd/qmail-06.eml +39 -0
- data/set-of-emails/maildir/bsd/qmail-07.eml +22 -0
- data/set-of-emails/maildir/bsd/qmail-08.eml +23 -0
- data/set-of-emails/maildir/bsd/qmail-09.eml +103 -0
- data/set-of-emails/maildir/bsd/rfc3464-01.eml +60 -0
- data/set-of-emails/maildir/bsd/rfc3464-02.eml +43 -0
- data/set-of-emails/maildir/bsd/rfc3464-03.eml +40 -0
- data/set-of-emails/maildir/bsd/rfc3464-04.eml +50 -0
- data/set-of-emails/maildir/bsd/rfc3464-05.eml +63 -0
- data/set-of-emails/maildir/bsd/rfc3464-06.eml +48 -0
- data/set-of-emails/maildir/bsd/rfc3464-07.eml +88 -0
- data/set-of-emails/maildir/bsd/rfc3464-08.eml +70 -0
- data/set-of-emails/maildir/bsd/rfc3464-09.eml +93 -0
- data/set-of-emails/maildir/bsd/rfc3464-10.eml +467 -0
- data/set-of-emails/maildir/bsd/rfc3464-11.eml +1171 -0
- data/set-of-emails/maildir/bsd/rfc3464-12.eml +101 -0
- data/set-of-emails/maildir/bsd/rfc3464-13.eml +131 -0
- data/set-of-emails/maildir/bsd/rfc3464-14.eml +121 -0
- data/set-of-emails/maildir/bsd/rfc3464-15.eml +144 -0
- data/set-of-emails/maildir/bsd/rfc3464-16.eml +36 -0
- data/set-of-emails/maildir/bsd/rfc3464-17.eml +109 -0
- data/set-of-emails/maildir/bsd/rfc3464-18.eml +149 -0
- data/set-of-emails/maildir/bsd/rfc3464-19.eml +65 -0
- data/set-of-emails/maildir/bsd/rfc3464-20.eml +145 -0
- data/set-of-emails/maildir/bsd/rfc3464-21.eml +146 -0
- data/set-of-emails/maildir/bsd/rfc3464-22.eml +105 -0
- data/set-of-emails/maildir/bsd/rfc3464-23.eml +21 -0
- data/set-of-emails/maildir/bsd/rfc3464-24.eml +27 -0
- data/set-of-emails/maildir/bsd/rfc3464-25.eml +33 -0
- data/set-of-emails/maildir/bsd/rfc3464-26.eml +98 -0
- data/set-of-emails/maildir/bsd/rfc3464-27.eml +180 -0
- data/set-of-emails/maildir/bsd/rfc3834-01.eml +37 -0
- data/set-of-emails/maildir/bsd/rfc3834-02.eml +51 -0
- data/set-of-emails/maildir/bsd/rfc3834-03.eml +33 -0
- data/set-of-emails/maildir/bsd/ru-mailru-01.eml +54 -0
- data/set-of-emails/maildir/bsd/ru-mailru-02.eml +54 -0
- data/set-of-emails/maildir/bsd/ru-mailru-03.eml +62 -0
- data/set-of-emails/maildir/bsd/ru-mailru-04.eml +54 -0
- data/set-of-emails/maildir/bsd/ru-yandex-01.eml +102 -0
- data/set-of-emails/maildir/bsd/ru-yandex-02.eml +113 -0
- data/set-of-emails/maildir/bsd/ru-yandex-03.eml +101 -0
- data/set-of-emails/maildir/bsd/sendmail-01.eml +70 -0
- data/set-of-emails/maildir/bsd/sendmail-02.eml +82 -0
- data/set-of-emails/maildir/bsd/sendmail-03.eml +76 -0
- data/set-of-emails/maildir/bsd/sendmail-04.eml +63 -0
- data/set-of-emails/maildir/bsd/sendmail-05.eml +64 -0
- data/set-of-emails/maildir/bsd/sendmail-06.eml +67 -0
- data/set-of-emails/maildir/bsd/sendmail-07.eml +65 -0
- data/set-of-emails/maildir/bsd/sendmail-08.eml +62 -0
- data/set-of-emails/maildir/bsd/sendmail-09.eml +60 -0
- data/set-of-emails/maildir/bsd/sendmail-10.eml +82 -0
- data/set-of-emails/maildir/bsd/sendmail-11.eml +60 -0
- data/set-of-emails/maildir/bsd/sendmail-12.eml +62 -0
- data/set-of-emails/maildir/bsd/sendmail-13.eml +66 -0
- data/set-of-emails/maildir/bsd/sendmail-14.eml +64 -0
- data/set-of-emails/maildir/bsd/sendmail-15.eml +60 -0
- data/set-of-emails/maildir/bsd/sendmail-16.eml +69 -0
- data/set-of-emails/maildir/bsd/sendmail-17.eml +68 -0
- data/set-of-emails/maildir/bsd/sendmail-18.eml +64 -0
- data/set-of-emails/maildir/bsd/sendmail-19.eml +71 -0
- data/set-of-emails/maildir/bsd/sendmail-20.eml +120 -0
- data/set-of-emails/maildir/bsd/sendmail-21.eml +69 -0
- data/set-of-emails/maildir/bsd/sendmail-22.eml +73 -0
- data/set-of-emails/maildir/bsd/sendmail-23.eml +137 -0
- data/set-of-emails/maildir/bsd/sendmail-24.eml +66 -0
- data/set-of-emails/maildir/bsd/sendmail-25.eml +70 -0
- data/set-of-emails/maildir/bsd/sendmail-26.eml +71 -0
- data/set-of-emails/maildir/bsd/sendmail-27.eml +69 -0
- data/set-of-emails/maildir/bsd/sendmail-28.eml +69 -0
- data/set-of-emails/maildir/bsd/sendmail-29.eml +70 -0
- data/set-of-emails/maildir/bsd/sendmail-30.eml +68 -0
- data/set-of-emails/maildir/bsd/sendmail-31.eml +80 -0
- data/set-of-emails/maildir/bsd/sendmail-32.eml +71 -0
- data/set-of-emails/maildir/bsd/sendmail-33.eml +71 -0
- data/set-of-emails/maildir/bsd/sendmail-34.eml +75 -0
- data/set-of-emails/maildir/bsd/sendmail-35.eml +70 -0
- data/set-of-emails/maildir/bsd/sendmail-36.eml +71 -0
- data/set-of-emails/maildir/bsd/sendmail-37.eml +71 -0
- data/set-of-emails/maildir/bsd/surfcontrol-01.eml +79 -0
- data/set-of-emails/maildir/bsd/surfcontrol-02.eml +70 -0
- data/set-of-emails/maildir/bsd/surfcontrol-03.eml +70 -0
- data/set-of-emails/maildir/bsd/uk-messagelabs-01.eml +76 -0
- data/set-of-emails/maildir/bsd/us-amazonses-01.eml +59 -0
- data/set-of-emails/maildir/bsd/us-amazonses-02.eml +177 -0
- data/set-of-emails/maildir/bsd/us-amazonses-03.eml +55 -0
- data/set-of-emails/maildir/bsd/us-amazonses-04.eml +55 -0
- data/set-of-emails/maildir/bsd/us-aol-01.eml +1258 -0
- data/set-of-emails/maildir/bsd/us-aol-02.eml +1257 -0
- data/set-of-emails/maildir/bsd/us-aol-03.eml +1264 -0
- data/set-of-emails/maildir/bsd/us-aol-04.eml +1260 -0
- data/set-of-emails/maildir/bsd/us-bigfoot-01.eml +64 -0
- data/set-of-emails/maildir/bsd/us-facebook-01.eml +40 -0
- data/set-of-emails/maildir/bsd/us-facebook-02.eml +42 -0
- data/set-of-emails/maildir/bsd/us-google-01.eml +70 -0
- data/set-of-emails/maildir/bsd/us-google-02.eml +50 -0
- data/set-of-emails/maildir/bsd/us-google-03.eml +51 -0
- data/set-of-emails/maildir/bsd/us-google-04.eml +82 -0
- data/set-of-emails/maildir/bsd/us-google-05.eml +50 -0
- data/set-of-emails/maildir/bsd/us-google-06.eml +56 -0
- data/set-of-emails/maildir/bsd/us-google-07.eml +42 -0
- data/set-of-emails/maildir/bsd/us-google-08.eml +59 -0
- data/set-of-emails/maildir/bsd/us-google-09.eml +76 -0
- data/set-of-emails/maildir/bsd/us-google-10.eml +69 -0
- data/set-of-emails/maildir/bsd/us-google-11.eml +68 -0
- data/set-of-emails/maildir/bsd/us-google-12.eml +76 -0
- data/set-of-emails/maildir/bsd/us-google-13.eml +79 -0
- data/set-of-emails/maildir/bsd/us-google-14.eml +304 -0
- data/set-of-emails/maildir/bsd/us-outlook-01.eml +72 -0
- data/set-of-emails/maildir/bsd/us-outlook-02.eml +72 -0
- data/set-of-emails/maildir/bsd/us-outlook-03.eml +72 -0
- data/set-of-emails/maildir/bsd/us-outlook-04.eml +79 -0
- data/set-of-emails/maildir/bsd/us-outlook-05.eml +85 -0
- data/set-of-emails/maildir/bsd/us-outlook-06.eml +75 -0
- data/set-of-emails/maildir/bsd/us-outlook-07.eml +70 -0
- data/set-of-emails/maildir/bsd/us-receivingses-01.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-02.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-03.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-04.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-05.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-06.eml +74 -0
- data/set-of-emails/maildir/bsd/us-receivingses-07.eml +74 -0
- data/set-of-emails/maildir/bsd/us-sendgrid-01.eml +95 -0
- data/set-of-emails/maildir/bsd/us-sendgrid-02.eml +98 -0
- data/set-of-emails/maildir/bsd/us-sendgrid-03.eml +100 -0
- data/set-of-emails/maildir/bsd/us-verizon-01.eml +31 -0
- data/set-of-emails/maildir/bsd/us-yahoo-01.eml +78 -0
- data/set-of-emails/maildir/bsd/us-yahoo-02.eml +79 -0
- data/set-of-emails/maildir/bsd/us-yahoo-03.eml +93 -0
- data/set-of-emails/maildir/bsd/us-yahoo-04.eml +94 -0
- data/set-of-emails/maildir/bsd/us-yahoo-05.eml +94 -0
- data/set-of-emails/maildir/bsd/us-zoho-01.eml +40 -0
- data/set-of-emails/maildir/bsd/us-zoho-02.eml +38 -0
- data/set-of-emails/maildir/bsd/us-zoho-03.eml +37 -0
- data/set-of-emails/maildir/bsd/us-zoho-04.eml +47 -0
- data/set-of-emails/maildir/bsd/us-zoho-05.eml +37 -0
- data/set-of-emails/maildir/bsd/v5sendmail-01.eml +24 -0
- data/set-of-emails/maildir/bsd/v5sendmail-02.eml +26 -0
- data/set-of-emails/maildir/bsd/v5sendmail-03.eml +29 -0
- data/set-of-emails/maildir/bsd/v5sendmail-04.eml +29 -0
- data/set-of-emails/maildir/bsd/v5sendmail-05.eml +42 -0
- data/set-of-emails/maildir/bsd/v5sendmail-06.eml +28 -0
- data/set-of-emails/maildir/bsd/v5sendmail-07.eml +35 -0
- data/set-of-emails/maildir/bsd/x1-01.eml +61 -0
- data/set-of-emails/maildir/bsd/x1-02.eml +62 -0
- data/set-of-emails/maildir/bsd/x2-01.eml +41 -0
- data/set-of-emails/maildir/bsd/x2-02.eml +46 -0
- data/set-of-emails/maildir/bsd/x2-03.eml +34 -0
- data/set-of-emails/maildir/bsd/x2-04.eml +0 -0
- data/set-of-emails/maildir/bsd/x2-05.eml +98 -0
- data/set-of-emails/maildir/bsd/x3-01.eml +61 -0
- data/set-of-emails/maildir/bsd/x3-02.eml +64 -0
- data/set-of-emails/maildir/bsd/x3-03.eml +59 -0
- data/set-of-emails/maildir/bsd/x3-04.eml +106 -0
- data/set-of-emails/maildir/bsd/x4-01.eml +92 -0
- data/set-of-emails/maildir/bsd/x4-02.eml +112 -0
- data/set-of-emails/maildir/bsd/x4-03.eml +245 -0
- data/set-of-emails/maildir/bsd/x4-04.eml +81 -0
- data/set-of-emails/maildir/bsd/x4-05.eml +121 -0
- data/set-of-emails/maildir/bsd/x4-06.eml +32 -0
- data/set-of-emails/maildir/bsd/x4-07.eml +153 -0
- data/set-of-emails/maildir/bsd/x5-01.eml +155 -0
- data/set-of-emails/maildir/dos/activehunter-01.eml +54 -0
- data/set-of-emails/maildir/dos/apachejames-01.eml +46 -0
- data/set-of-emails/maildir/dos/arf-01.eml +66 -0
- data/set-of-emails/maildir/dos/courier-01.eml +79 -0
- data/set-of-emails/maildir/dos/de-einsundeins-01.eml +38 -0
- data/set-of-emails/maildir/dos/de-gmx-01.eml +52 -0
- data/set-of-emails/maildir/dos/domino-01.eml +33 -0
- data/set-of-emails/maildir/dos/exchange-01.eml +31 -0
- data/set-of-emails/maildir/dos/exim-01.eml +46 -0
- data/set-of-emails/maildir/dos/google-apps-01.eml +66 -0
- data/set-of-emails/maildir/dos/imailserver-01.eml +27 -0
- data/set-of-emails/maildir/dos/interscanmss-01.eml +49 -0
- data/set-of-emails/maildir/dos/jp-biglobe-01.eml +43 -0
- data/set-of-emails/maildir/dos/jp-ezweb-01.eml +36 -0
- data/set-of-emails/maildir/dos/jp-kddi-01.eml +49 -0
- data/set-of-emails/maildir/dos/mailfoundry-01.eml +50 -0
- data/set-of-emails/maildir/dos/mailmarshalsmtp-01.eml +43 -0
- data/set-of-emails/maildir/dos/mcafee-01.eml +63 -0
- data/set-of-emails/maildir/dos/messagingserver-01.eml +102 -0
- data/set-of-emails/maildir/dos/mfilter-01.eml +49 -0
- data/set-of-emails/maildir/dos/mxlogic-01.eml +47 -0
- data/set-of-emails/maildir/dos/notes-01.eml +42 -0
- data/set-of-emails/maildir/dos/opensmtpd-01.eml +33 -0
- data/set-of-emails/maildir/dos/postfix-01.eml +60 -0
- data/set-of-emails/maildir/dos/qmail-01.eml +40 -0
- data/set-of-emails/maildir/dos/rfc3464-01.eml +59 -0
- data/set-of-emails/maildir/dos/rfc3834-01.eml +37 -0
- data/set-of-emails/maildir/dos/ru-mailru-01.eml +54 -0
- data/set-of-emails/maildir/dos/ru-yandex-01.eml +102 -0
- data/set-of-emails/maildir/dos/sendmail-01.eml +69 -0
- data/set-of-emails/maildir/dos/surfcontrol-01.eml +79 -0
- data/set-of-emails/maildir/dos/uk-messagelabs-01.eml +76 -0
- data/set-of-emails/maildir/dos/us-amazonses-01.eml +59 -0
- data/set-of-emails/maildir/dos/us-aol-01.eml +1258 -0
- data/set-of-emails/maildir/dos/us-bigfoot-01.eml +64 -0
- data/set-of-emails/maildir/dos/us-facebook-01.eml +40 -0
- data/set-of-emails/maildir/dos/us-google-01.eml +70 -0
- data/set-of-emails/maildir/dos/us-outlook-01.eml +72 -0
- data/set-of-emails/maildir/dos/us-receivingses-01.eml +74 -0
- data/set-of-emails/maildir/dos/us-sendgrid-01.eml +95 -0
- data/set-of-emails/maildir/dos/us-verizon-01.eml +31 -0
- data/set-of-emails/maildir/dos/us-yahoo-01.eml +78 -0
- data/set-of-emails/maildir/dos/us-zoho-01.eml +40 -0
- data/set-of-emails/maildir/dos/v5sendmail-01.eml +24 -0
- data/set-of-emails/maildir/dos/x1-01.eml +61 -0
- data/set-of-emails/maildir/dos/x2-01.eml +41 -0
- data/set-of-emails/maildir/dos/x3-01.eml +61 -0
- data/set-of-emails/maildir/dos/x4-01.eml +90 -0
- data/set-of-emails/maildir/dos/x5-01.eml +155 -0
- data/set-of-emails/maildir/err/make-test-01.eml +70 -0
- data/set-of-emails/maildir/err/make-test-02.eml +70 -0
- data/set-of-emails/maildir/err/make-test-03.eml +64 -0
- data/set-of-emails/maildir/err/make-test-04.eml +64 -0
- data/set-of-emails/maildir/err/make-test-05.eml +66 -0
- data/set-of-emails/maildir/err/make-test-06.eml +118 -0
- data/set-of-emails/maildir/err/make-test-07.eml +26 -0
- data/set-of-emails/maildir/err/make-test-08.eml +67 -0
- data/set-of-emails/maildir/err/make-test-09.eml +55 -0
- data/set-of-emails/maildir/err/make-test-10.eml +69 -0
- data/set-of-emails/maildir/err/make-test-11.eml +64 -0
- data/set-of-emails/maildir/err/make-test-12.eml +66 -0
- data/set-of-emails/maildir/err/make-test-13.eml +67 -0
- data/set-of-emails/maildir/err/make-test-14.eml +66 -0
- data/set-of-emails/maildir/err/make-test-15.eml +70 -0
- data/set-of-emails/maildir/err/make-test-16.eml +68 -0
- data/set-of-emails/maildir/err/make-test-17.eml +68 -0
- data/set-of-emails/maildir/err/make-test-18.eml +68 -0
- data/set-of-emails/maildir/err/make-test-19.eml +69 -0
- data/set-of-emails/maildir/err/make-test-20.eml +67 -0
- data/set-of-emails/maildir/err/make-test-21.eml +69 -0
- data/set-of-emails/maildir/err/make-test-22.eml +66 -0
- data/set-of-emails/maildir/err/make-test-23.eml +70 -0
- data/set-of-emails/maildir/err/make-test-24.eml +69 -0
- data/set-of-emails/maildir/err/make-test-25.eml +67 -0
- data/set-of-emails/maildir/err/make-test-26.eml +69 -0
- data/set-of-emails/maildir/err/make-test-27.eml +69 -0
- data/set-of-emails/maildir/err/make-test-28.eml +66 -0
- data/set-of-emails/maildir/err/make-test-29.eml +68 -0
- data/set-of-emails/maildir/err/make-test-30.eml +68 -0
- data/set-of-emails/maildir/err/make-test-31.eml +80 -0
- data/set-of-emails/maildir/err/make-test-32.eml +66 -0
- data/set-of-emails/maildir/err/make-test-33.eml +68 -0
- data/set-of-emails/maildir/err/make-test-34.eml +56 -0
- data/set-of-emails/maildir/err/make-test-35.eml +59 -0
- data/set-of-emails/maildir/err/make-test-36.eml +53 -0
- data/set-of-emails/maildir/err/make-test-37.eml +62 -0
- data/set-of-emails/maildir/mac/activehunter-01.eml +1 -2
- data/set-of-emails/maildir/mac/apachejames-01.eml +1 -4
- data/set-of-emails/maildir/mac/arf-01.eml +1 -3
- data/set-of-emails/maildir/mac/courier-01.eml +1 -6
- data/set-of-emails/maildir/mac/de-einsundeins-01.eml +1 -1
- data/set-of-emails/maildir/mac/de-gmx-01.eml +1 -1
- data/set-of-emails/maildir/mac/domino-01.eml +1 -0
- data/set-of-emails/maildir/mac/exchange-01.eml +1 -0
- data/set-of-emails/maildir/mac/exim-01.eml +1 -1
- data/set-of-emails/maildir/mac/google-apps-01.eml +1 -4
- data/set-of-emails/maildir/mac/imailserver-01.eml +1 -0
- data/set-of-emails/maildir/mac/interscanmss-01.eml +1 -2
- data/set-of-emails/maildir/mac/jp-biglobe-01.eml +1 -2
- data/set-of-emails/maildir/mac/jp-ezweb-01.eml +1 -1
- data/set-of-emails/maildir/mac/jp-kddi-01.eml +1 -2
- data/set-of-emails/maildir/mac/mailfoundry-01.eml +1 -2
- data/set-of-emails/maildir/mac/mailmarshalsmtp-01.eml +1 -2
- data/set-of-emails/maildir/mac/mcafee-01.eml +1 -4
- data/set-of-emails/maildir/mac/messagingserver-01.eml +1 -4
- data/set-of-emails/maildir/mac/mfilter-01.eml +1 -3
- data/set-of-emails/maildir/mac/mxlogic-01.eml +1 -1
- data/set-of-emails/maildir/mac/notes-01.eml +1 -2
- data/set-of-emails/maildir/mac/opensmtpd-01.eml +1 -0
- data/set-of-emails/maildir/mac/postfix-01.eml +1 -3
- data/set-of-emails/maildir/mac/qmail-01.eml +1 -1
- data/set-of-emails/maildir/mac/rfc3464-01.eml +1 -4
- data/set-of-emails/maildir/mac/rfc3834-01.eml +1 -0
- data/set-of-emails/maildir/mac/ru-mailru-01.eml +1 -1
- data/set-of-emails/maildir/mac/ru-yandex-01.eml +1 -4
- data/set-of-emails/maildir/mac/sendmail-01.eml +1 -4
- data/set-of-emails/maildir/mac/surfcontrol-01.eml +1 -5
- data/set-of-emails/maildir/mac/uk-messagelabs-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-amazonses-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-aol-01.eml +1 -15
- data/set-of-emails/maildir/mac/us-bigfoot-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-facebook-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-google-01.eml +1 -1
- data/set-of-emails/maildir/mac/us-outlook-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-receivingses-01.eml +1 -4
- data/set-of-emails/maildir/mac/us-sendgrid-01.eml +1 -3
- data/set-of-emails/maildir/mac/us-verizon-01.eml +1 -2
- data/set-of-emails/maildir/mac/us-yahoo-01.eml +1 -1
- data/set-of-emails/maildir/mac/us-zoho-01.eml +1 -2
- data/set-of-emails/maildir/mac/v5sendmail-01.eml +1 -0
- data/set-of-emails/maildir/mac/x1-01.eml +1 -4
- data/set-of-emails/maildir/mac/x2-01.eml +1 -1
- data/set-of-emails/maildir/mac/x3-01.eml +1 -3
- data/set-of-emails/maildir/mac/x4-01.eml +1 -2
- data/set-of-emails/maildir/mac/x5-01.eml +1 -8
- data/set-of-emails/maildir/not/is-not-bounce-01.eml +25 -0
- data/set-of-emails/to-be-debugged-because/reason-is-onhold/onhold-0001.eml +85 -0
- data/set-of-emails/to-be-debugged-because/reason-is-undefined/undefined-0002.eml +27 -0
- data/set-of-emails/to-be-debugged-because/reason-is-undefined/undefined-0003.eml +78 -0
- data/set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet/cannot-parse-this-email-0002.eml +25 -0
- data/set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-01.eml +79 -0
- data/set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-02.eml +72 -0
- data/set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-03.eml +68 -0
- data/set-of-emails/to-be-debugged-because/something-is-wrong/no-message-id-from-pr-150.eml +75 -0
- data/set-of-emails/to-be-parsed-for-test/README.md +20 -0
- data/sisimai.gemspec +25 -0
- metadata +647 -0
data/lib/sisimai/smtp.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
module Sisimai
|
2
|
+
# Sisimai::SMTP is a parent class of Sisimai::SMTP::Status and Sisimai::SMTP::Reply.
|
3
|
+
module SMTP
|
4
|
+
class << self
|
5
|
+
# Imported from p5-Sisimail/lib/Sisimai/SMTP.pm
|
6
|
+
|
7
|
+
# Check softbounce or not
|
8
|
+
# @param [String] argv1 String including SMTP Status code
|
9
|
+
# @return [True,False,Nil] true: Soft bounce
|
10
|
+
# false: Hard bounce
|
11
|
+
# nil: May not be bounce ?
|
12
|
+
def is_softbounce(argv1 = '')
|
13
|
+
return nil unless argv1
|
14
|
+
return nil unless argv1.size > 0
|
15
|
+
|
16
|
+
mesgstring = argv1.to_s
|
17
|
+
classvalue = nil
|
18
|
+
softbounce = -1
|
19
|
+
|
20
|
+
if cv = mesgstring.match(/\b([245])\d\d\b/)
|
21
|
+
# Valid SMTP reply code such as 550, 421
|
22
|
+
classvalue = cv[1].to_i
|
23
|
+
|
24
|
+
elsif cv = mesgstring.match(/\b([245])[.][0-9][.]\d+\b/)
|
25
|
+
# DSN value such as 5.1.1, 4.4.7
|
26
|
+
classvalue = cv[1].to_i
|
27
|
+
end
|
28
|
+
|
29
|
+
if classvalue == 4
|
30
|
+
# Soft bounce, Persistent transient error
|
31
|
+
softbounce = true
|
32
|
+
|
33
|
+
elsif classvalue == 5
|
34
|
+
# Hard bounce, Permanent error
|
35
|
+
softbounce = false
|
36
|
+
else
|
37
|
+
# Check with regular expression
|
38
|
+
if mesgstring =~ /(?:temporar|persistent)/i
|
39
|
+
# Temporary failure
|
40
|
+
softbounce = true
|
41
|
+
|
42
|
+
elsif mesgstring =~ /permanent/i
|
43
|
+
# Permanently failure
|
44
|
+
softbounce = false
|
45
|
+
|
46
|
+
else
|
47
|
+
# did not find information to decide that it is a soft bounce
|
48
|
+
# or a hard bounce.
|
49
|
+
softbounce = nil
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
return softbounce
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# http://www.ietf.org/rfc/rfc5321.txt
|
2
|
+
# 4.2.1. Reply Code Severities and Theory
|
3
|
+
# 2yz Positive Completion reply
|
4
|
+
# 3yz Positive Intermediate reply
|
5
|
+
# 4yz Transient Negative Completion reply
|
6
|
+
# 5yz Permanent Negative Completion reply
|
7
|
+
#
|
8
|
+
# x0z Syntax: These replies refer to syntax errors, syntactically
|
9
|
+
# correct commands that do not fit any functional category, and
|
10
|
+
# unimplemented or superfluous commands.
|
11
|
+
# x1z Information: These are replies to requests for information, such
|
12
|
+
# as status or help.
|
13
|
+
# x2z Connections: These are replies referring to the transmission
|
14
|
+
# channel.
|
15
|
+
# x3z Unspecified.
|
16
|
+
# x4z Unspecified.
|
17
|
+
# x5z Mail system: These replies indicate the status of the receiver
|
18
|
+
# mail system vis-a-vis the requested transfer or other mail system
|
19
|
+
# action.
|
20
|
+
#
|
21
|
+
# 4.2.3. Reply Codes in Numeric Order
|
22
|
+
# 211 System status, or system help reply
|
23
|
+
# 214 Help message (Information on how to use the receiver or the
|
24
|
+
# meaning of a particular non-standard command; this reply is useful
|
25
|
+
# only to the human user)
|
26
|
+
# 220 <domain> Service ready
|
27
|
+
# 221 <domain> Service closing transmission channel
|
28
|
+
# 250 Requested mail action okay, completed
|
29
|
+
# 251 User not local; will forward to <forward-path> (See Section 3.4)
|
30
|
+
# 252 Cannot VRFY user, but will accept message and attempt delivery
|
31
|
+
# (See Section 3.5.3)
|
32
|
+
# 354 Start mail input; end with <CRLF>.<CRLF>
|
33
|
+
# 421 <domain> Service not available, closing transmission channel
|
34
|
+
# (This may be a reply to any command if the service knows it must
|
35
|
+
# shut down)
|
36
|
+
# 450 Requested mail action not taken: mailbox unavailable (e.g.,
|
37
|
+
# mailbox busy or temporarily blocked for policy reasons)
|
38
|
+
# 451 Requested action aborted: local error in processing
|
39
|
+
# 452 Requested action not taken: insufficient system storage
|
40
|
+
# 455 Server unable to accommodate parameters
|
41
|
+
# 500 Syntax error, command unrecognized (This may include errors such
|
42
|
+
# as command line too long)
|
43
|
+
# 501 Syntax error in parameters or arguments
|
44
|
+
# 502 Command not implemented (see Section 4.2.4)
|
45
|
+
# 503 Bad sequence of commands
|
46
|
+
# 504 Command parameter not implemented
|
47
|
+
# 550 Requested action not taken: mailbox unavailable (e.g., mailbox
|
48
|
+
# not found, no access, or command rejected for policy reasons)
|
49
|
+
# 551 User not local; please try <forward-path> (See Section 3.4)
|
50
|
+
# 552 Requested mail action aborted: exceeded storage allocation
|
51
|
+
# 553 Requested action not taken: mailbox name not allowed (e.g.,
|
52
|
+
# mailbox syntax incorrect)
|
53
|
+
# 554 Transaction failed (Or, in the case of a connection-opening
|
54
|
+
# response, "No SMTP service here")
|
55
|
+
# 555 MAIL FROM/RCPT TO parameters not recognized or not implemented
|
56
|
+
#
|
57
|
+
module Sisimai
|
58
|
+
module SMTP
|
59
|
+
# Sisimai::SMTP::Reply is utilities for getting SMTP Reply Code value from
|
60
|
+
# error message text.
|
61
|
+
module Reply
|
62
|
+
# Imported from p5-Sisimail/lib/Sisimai/SMTP/Reply.pm
|
63
|
+
class << self
|
64
|
+
# Get SMTP Reply Code from the given string
|
65
|
+
# @param [String] argv1 String including SMTP Reply Code like 550
|
66
|
+
# @return [String] SMTP Reply Code or empty if the first argument
|
67
|
+
# did not include SMTP Reply Code value
|
68
|
+
def find(argv1 = '')
|
69
|
+
return '' unless argv1
|
70
|
+
return '' unless argv1.size > 0
|
71
|
+
return '' if argv1 =~ /X-Unix;/i
|
72
|
+
|
73
|
+
value = argv1.match(/\b([45][0-5][0-9])\b/)
|
74
|
+
return value[1] if value
|
75
|
+
return ''
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
@@ -0,0 +1,755 @@
|
|
1
|
+
# http://www.iana.org/assignments/smtp-enhanced-status-codes/smtp-enhanced-status-codes.xhtml
|
2
|
+
#
|
3
|
+
# ------------------------------------------------------------------------------
|
4
|
+
# [Class Sub-Codes]
|
5
|
+
# 2.X.Y Success
|
6
|
+
# 4.X.Y Persistent Transient Failure
|
7
|
+
# 5.X.Y Permanent Failure
|
8
|
+
#
|
9
|
+
# ------------------------------------------------------------------------------
|
10
|
+
# [Subject Sub-Codes]
|
11
|
+
#
|
12
|
+
# X.0.X --- Other or Undefined Status
|
13
|
+
# There is no additional subject information available.
|
14
|
+
#
|
15
|
+
# X.1.X --- Addressing Status
|
16
|
+
# The address status reports on the originator or destination address.
|
17
|
+
# It may include address syntax or validity.
|
18
|
+
# These errors can generally be corrected by the sender and retried.
|
19
|
+
#
|
20
|
+
# X.2.X --- Mailbox Status
|
21
|
+
# Mailbox status indicates that something having to do with the mailbox
|
22
|
+
# has caused this DSN. Mailbox issues are assumed to be under the general
|
23
|
+
# control of the recipient.
|
24
|
+
#
|
25
|
+
# X.3.X --- Mail System Status
|
26
|
+
# Mail system status indicates that something having to do with the
|
27
|
+
# destination system has caused this DSN. System issues are assumed to
|
28
|
+
# be under the general control of the destination system administrator.
|
29
|
+
#
|
30
|
+
# X.4.X --- Network and Routing Status
|
31
|
+
# The networking or routing codes report status about the delivery
|
32
|
+
# system itself. These system components include any necessary
|
33
|
+
# infrastructure such as directory and routing services. Network issues
|
34
|
+
# are assumed to be under the control of the destination or intermediate
|
35
|
+
# system administrator.
|
36
|
+
#
|
37
|
+
# X.5.X --- Mail Delivery Protocol Status
|
38
|
+
# The mail delivery protocol status codes report failures involving
|
39
|
+
# the message delivery protocol. These failures include the full range
|
40
|
+
# of problems resulting from implementation errors or an unreliable
|
41
|
+
# connection.
|
42
|
+
#
|
43
|
+
# X.6.X --- Message Content or Media Status
|
44
|
+
# The message content or media status codes report failures involving
|
45
|
+
# the content of the message. These codes report failures due to
|
46
|
+
# translation, transcoding, or otherwise unsupported message media.
|
47
|
+
# Message content or media issues are under the control of both the
|
48
|
+
# sender and the receiver, both of which must support a common set of
|
49
|
+
# supported content-types.
|
50
|
+
#
|
51
|
+
# X.7.X --- Security or Policy Status
|
52
|
+
# The security or policy status codes report failures involving policies
|
53
|
+
# such as per-recipient or per-host filtering and cryptographic operations.
|
54
|
+
# Security and policy status issues are assumed to be under the control
|
55
|
+
# of either or both the sender and recipient.
|
56
|
+
# Both the sender and recipient must permit the exchange of messages
|
57
|
+
# and arrange the exchange of necessary keys and certificates for
|
58
|
+
# cryptographic operations.
|
59
|
+
#
|
60
|
+
# ------------------------------------------------------------------------------
|
61
|
+
# [Enumerated Status Codes]
|
62
|
+
#
|
63
|
+
# X.0.0 Any Other undefined Status:(RFC 3463)
|
64
|
+
# Other undefined status is the only undefined error code. It
|
65
|
+
# should be used for all errors for which only the class of the
|
66
|
+
# error is known.
|
67
|
+
#
|
68
|
+
# X.1.0 --- Other address status:(RFC 3463)
|
69
|
+
# Something about the address specified in the message caused
|
70
|
+
# this DSN.
|
71
|
+
#
|
72
|
+
# X.1.1 451 Bad destination mailbox address:(RFC3463)
|
73
|
+
# 550 The mailbox specified in the address does not exist.
|
74
|
+
# For Internet mail names, this means the address portion to the
|
75
|
+
# the left of the "@" sign is invalid.
|
76
|
+
# This code is only useful for permanent failures.
|
77
|
+
#
|
78
|
+
# X.1.2 --- Bad destination system addres:
|
79
|
+
# The destination system specified in the address does not exist
|
80
|
+
# or is incapable of accepting mail. For Internet mail names,
|
81
|
+
# this means the address portion to the right of the "@" is
|
82
|
+
# invalid for mail.
|
83
|
+
# This code is only useful for permanent failures.
|
84
|
+
#
|
85
|
+
# X.1.3 501 Bad destination mailbox address syntax:
|
86
|
+
# The destination address was syntactically invalid. This can
|
87
|
+
# apply to any field in the address. This code is only useful
|
88
|
+
# for permanent failures.
|
89
|
+
#
|
90
|
+
# X.1.4 --- Destination mailbox address ambiguous:(RFC 3463)
|
91
|
+
# The mailbox address as specified matches one or more recipients
|
92
|
+
# on the destination system.
|
93
|
+
# This may result if a heuristic address mapping algorithm is
|
94
|
+
# used to map the specified address to a local mailbox name.
|
95
|
+
#
|
96
|
+
# X.1.5 250 Destination address valid:(RFC 3463)
|
97
|
+
# This mailbox address as specified was valid. This status code
|
98
|
+
# should be used for positive delivery reports.
|
99
|
+
#
|
100
|
+
# X.1.6 --- Destination mailbox has moved, No forwarding address:(RFC 3463)
|
101
|
+
# The mailbox address provided was at one time valid, but mail
|
102
|
+
# is no longer being accepted for that address.
|
103
|
+
# This code is only useful for permanent failures.
|
104
|
+
#
|
105
|
+
# X.1.7 --- Bad sender's mailbox address syntax:(RFC 3463)
|
106
|
+
# The sender's address was syntactically invalid. This can apply
|
107
|
+
# to any field in the address.
|
108
|
+
#
|
109
|
+
# X.1.8 451 Bad sender's system address:(RFC 3463)
|
110
|
+
# 501 The sender's system specified in the address does not exist or
|
111
|
+
# is incapable of accepting return mail. For domain names, this
|
112
|
+
# means the address portion to the right of the "@" is invalid
|
113
|
+
# for mail.
|
114
|
+
#
|
115
|
+
# X.1.9 --- Message relayed to non-compliant mailer:(RFC 5248, 3886)
|
116
|
+
# The mailbox address specified was valid, but the message has
|
117
|
+
# been relayed to a system that does not speak this protocol;
|
118
|
+
# no further information can be provided.
|
119
|
+
#
|
120
|
+
# X.1.10 --- Recipient address has null MX:(RFC 7505)
|
121
|
+
# This status code is returned when the associated address is
|
122
|
+
# marked as invalid using a null MX.
|
123
|
+
# ------------------------------------------------------------------------------
|
124
|
+
# X.2.0 --- Other or undefined mailbox status:(RFC 3463)
|
125
|
+
# The mailbox exists, but something about the destination mailbox
|
126
|
+
# has caused the sending of this DSN.
|
127
|
+
#
|
128
|
+
# X.2.1 --- Mailbox disabled, not accepting messages:(RFC 3463)
|
129
|
+
# The mailbox exists, but is not accepting messages. This may be
|
130
|
+
# a permanent error if the mailbox will never be re-enabled or a
|
131
|
+
# transient error if the mailbox is only temporarily disabled.
|
132
|
+
#
|
133
|
+
# X.2.2 552 Mailbox full:(RFC 3463)
|
134
|
+
# The mailbox is full because the user has exceeded a per-mailbox
|
135
|
+
# administrative quota or physical capacity. The general semantics
|
136
|
+
# implies that the recipient can delete messages to make more
|
137
|
+
# space available.
|
138
|
+
# This code should be used as a persistent transient failure.
|
139
|
+
#
|
140
|
+
# X.2.3 552 Message length exceeds administrative limit:(RFC 3463)
|
141
|
+
# A per-mailbox administrative message length limit has been
|
142
|
+
# exceeded. This status code should be used when the per-mailbox
|
143
|
+
# message length limit is less than the general system limit.
|
144
|
+
# This code should be used as a permanent failure.
|
145
|
+
#
|
146
|
+
# X.2.4 450 Mailing list expansion problem:(RFC 3463)
|
147
|
+
# 452 The mailbox is a mailing list address and the mailing list was
|
148
|
+
# unable to be expanded. This code may represent a permanent
|
149
|
+
# failure or a persistent transient failure.
|
150
|
+
# ------------------------------------------------------------------------------
|
151
|
+
# X.3.0 221 Other or undefined mail system status:(RFC 3463)
|
152
|
+
# 250 The destination system exists and normally accepts mail, but
|
153
|
+
# 421,451 something about the system has caused the generation of this
|
154
|
+
# 550,554 DSN.
|
155
|
+
#
|
156
|
+
# X.3.1 452 Mail system full:(RFC 3463)
|
157
|
+
# Mail system storage has been exceeded. The general semantics
|
158
|
+
# imply that the individual recipient may not be able to delete
|
159
|
+
# material to make room for additional messages. This is useful
|
160
|
+
# only as a persistent transient error.
|
161
|
+
#
|
162
|
+
# X.3.2 453 System not accepting network messages:(RFC 3463)
|
163
|
+
# 521 The host on which the mailbox is resident is not accepting messages.
|
164
|
+
# Examples of such conditions include an imminent shutdown, excessive
|
165
|
+
# load, or system maintenance. This is useful for both permanent
|
166
|
+
# and persistent transient errors.
|
167
|
+
#
|
168
|
+
# X.3.3 --- System not capable of selected features:(RFC 3463)
|
169
|
+
# Selected features specified for the message are not supported
|
170
|
+
# by the destination system. This can occur in gateways when
|
171
|
+
# features from one domain cannot be mapped onto the supported
|
172
|
+
# feature in another.
|
173
|
+
#
|
174
|
+
# X.3.4 552 Message too big for system:(RFC 3463)
|
175
|
+
# 554 The message is larger than per-message size limit. This limit
|
176
|
+
# may either be for physical or administrative reasons. This is
|
177
|
+
# useful only as a permanent error.
|
178
|
+
#
|
179
|
+
# X.3.5 --- System incorrectly configured:(RFC 3463)
|
180
|
+
# The system is not configured in a manner that will permit it
|
181
|
+
# to accept this message.
|
182
|
+
# ------------------------------------------------------------------------------
|
183
|
+
# X.4.0 --- Other or undefined network or routing status:(RFC 3463)
|
184
|
+
# Something went wrong with the networking, but it is not clear
|
185
|
+
# what the problem is, or the problem cannot be well expressed
|
186
|
+
# with any of the other provided detail codes.
|
187
|
+
#
|
188
|
+
# X.4.1 451 No answer from host:(RFC 3463)
|
189
|
+
# The outbound connection attempt was not answered, because either
|
190
|
+
# the remote system was busy, or was unable to take a call.
|
191
|
+
# This is useful only as a persistent transient error.
|
192
|
+
#
|
193
|
+
# X.4.2 421 Bad connection:(RFC 3463)
|
194
|
+
# The outbound connection was established, but was unable to
|
195
|
+
# complete the message transaction, either because of time-out,
|
196
|
+
# or inadequate connection quality. This is useful only as a
|
197
|
+
# persistent transient error.
|
198
|
+
#
|
199
|
+
# X.4.3 451 Directory server failure:(RFC 3463)
|
200
|
+
# 550 The network system was unable to forward the message, because
|
201
|
+
# a directory server was unavailable. This is useful only as a
|
202
|
+
# persistent transient error. The inability to connect to an
|
203
|
+
# Internet DNS server is one example of the directory server
|
204
|
+
# failure error.
|
205
|
+
#
|
206
|
+
# X.4.4 --- Unable to route:(RFC 3463)
|
207
|
+
# The mail system was unable to determine the next hop for the
|
208
|
+
# message because the necessary routing information was unavailable
|
209
|
+
# from the directory server. This is useful for both permanent
|
210
|
+
# and persistent transient errors. A DNS lookup returning only
|
211
|
+
# an SOA (Start of Administration) record for a domain name is
|
212
|
+
# one example of the unable to route error.
|
213
|
+
#
|
214
|
+
# X.4.5 451 Mail system congestion:(RFC 3463)
|
215
|
+
# The mail system was unable to deliver the message because the
|
216
|
+
# mail system was congested. This is useful only as a persistent
|
217
|
+
# transient error.
|
218
|
+
#
|
219
|
+
# X.4.6 --- Routing loop detected:(RFC 3463)
|
220
|
+
# A routing loop caused the message to be forwarded too many times,
|
221
|
+
# either because of incorrect routing tables or a user-forwarding
|
222
|
+
# loop. This is useful only as a persistent transient error.
|
223
|
+
#
|
224
|
+
# X.4.7 --- Delivery time expired:(RFC 3463)
|
225
|
+
# The message was considered too old by the rejecting system,
|
226
|
+
# either because it remained on that host too long or because
|
227
|
+
# the time-to-live value specified by the sender of the message
|
228
|
+
# was exceeded. If possible, the code for the actual problem
|
229
|
+
# found when delivery was attempted should be returned rather
|
230
|
+
# than this code.
|
231
|
+
# ------------------------------------------------------------------------------
|
232
|
+
# X.5.0 220 Other or undefined protocol status:(RFC 3463)
|
233
|
+
# 250-253 Something was wrong with the protocol necessary to deliver the
|
234
|
+
# 451,452 message to the next hop and the problem cannot be well expressed
|
235
|
+
# 454,458 with any of the other provided detail codes.
|
236
|
+
# 459,554
|
237
|
+
# 501-503
|
238
|
+
#
|
239
|
+
# X.5.1 430 Invalid command:(RFC 3463)
|
240
|
+
# 500,501 A mail transaction protocol command was issued which was either
|
241
|
+
# 503,530 out of sequence or unsupported.
|
242
|
+
# 550,554 This is useful only as a permanent error.
|
243
|
+
# 555
|
244
|
+
#
|
245
|
+
# X.5.2 500 Syntax error:(RFC 3463)
|
246
|
+
# 500,501 A mail transaction protocol command was issued which could not
|
247
|
+
# 502,550 be interpreted, either because the syntax was wrong or the
|
248
|
+
# 555 command is unrecognized.
|
249
|
+
# This is useful only as a permanent error.
|
250
|
+
#
|
251
|
+
# X.5.3 451 Too many recipients:(RFC 3463)
|
252
|
+
# More recipients were specified for the message than could have
|
253
|
+
# been delivered by the protocol. This error should normally result
|
254
|
+
# in the segmentation of the message into two, the remainder of
|
255
|
+
# the recipients to be delivered on a subsequent delivery attempt.
|
256
|
+
# It is included in this list in the event that such segmentation
|
257
|
+
# is not possible.
|
258
|
+
#
|
259
|
+
# X.5.4 451 Invalid command arguments:(RFC 3463)
|
260
|
+
# 501-504 A valid mail transaction protocol command was issued with
|
261
|
+
# 550 invalid arguments, either because the arguments were out of
|
262
|
+
# 555 range or represented unrecognized features.
|
263
|
+
# This is useful only as a permanent error.
|
264
|
+
#
|
265
|
+
# X.5.5 --- Wrong protocol version:(RFC 3463)
|
266
|
+
# A protocol version mis-match existed which could not be
|
267
|
+
# automatically resolved by the communicating parties.
|
268
|
+
#
|
269
|
+
# X.5.6 550 Authentication Exchange line is too long (RFC 4954)
|
270
|
+
# This enhanced status code SHOULD be returned when the server
|
271
|
+
# fails the AUTH command due to the client sending a [BASE64]
|
272
|
+
# response which is longer than the maximum buffer size available
|
273
|
+
# for the currently selected SASL mechanism. This is useful for
|
274
|
+
# both permanent and persistent transient errors.
|
275
|
+
# ------------------------------------------------------------------------------
|
276
|
+
# X.6.0 --- Other or undefined media error:(RFC 3463)
|
277
|
+
# Something about the content of a message caused it to be considered
|
278
|
+
# undeliverable and the problem cannot be well expressed with
|
279
|
+
# any of the other provided detail codes.
|
280
|
+
#
|
281
|
+
# X.6.1 --- Media not supported:(RFC 3463)
|
282
|
+
# The media of the message is not supported by either the delivery
|
283
|
+
# protocol or the next system in the forwarding path. This is
|
284
|
+
# useful only as a permanent error.
|
285
|
+
#
|
286
|
+
# X.6.2 --- Conversion required and prohibited:(RFC 3463)
|
287
|
+
# The content of the message must be converted before it can be
|
288
|
+
# delivered and such conversion is not permitted. Such prohibitions
|
289
|
+
# may be the expression of the sender in the message itself or
|
290
|
+
# the policy of the sending host.
|
291
|
+
#
|
292
|
+
# X.6.3 554 Conversion required but not supported:(RFC 3463)
|
293
|
+
# The message content must be converted in order to be forwarded
|
294
|
+
# but such conversion is not possible or is not practical by a
|
295
|
+
# host in the forwarding path. This condition may result when
|
296
|
+
# an ESMTP gateway supports 8bit transport but is not able to
|
297
|
+
# downgrade the message to 7 bit as required for the next hop.
|
298
|
+
#
|
299
|
+
# X.6.4 250 Conversion with loss performed:(RFC 3463)
|
300
|
+
# This is a warning sent to the sender when message delivery was
|
301
|
+
# successfully but when the delivery required a conversion in
|
302
|
+
# which some data was lost. This may also be a permanent error
|
303
|
+
# if the sender has indicated that conversion with loss is
|
304
|
+
# prohibited for the message.
|
305
|
+
#
|
306
|
+
# X.6.5 --- Conversion Failed:(RFC 3463)
|
307
|
+
# A conversion was required but was unsuccessful. This may be
|
308
|
+
# useful as a permanent or persistent temporary notification.
|
309
|
+
#
|
310
|
+
# X.6.6 554 Message content not available (RFC 4468)
|
311
|
+
# The message content could not be fetched from a remote system.
|
312
|
+
# This may be useful as a permanent or persistent temporary
|
313
|
+
# notification.
|
314
|
+
#
|
315
|
+
# X.6.7 553 The ALT-ADDRESS is required but not specified:(RFC 6531)
|
316
|
+
# 550 This indicates the reception of a MAIL or RCPT command that
|
317
|
+
# non-ASCII addresses are not permitted
|
318
|
+
#
|
319
|
+
# X.6.8 252 UTF-8 string reply is required, but not permitted by the client:(RFC 6531)
|
320
|
+
# 553 This indicates that a reply containing a UTF-8 string is required
|
321
|
+
# 550 to show the mailbox name, but that form of response is not permitted
|
322
|
+
# by the SMTP client.
|
323
|
+
#
|
324
|
+
# X.6.9 550 UTF8SMTP downgrade failed:(RFC 6531)
|
325
|
+
# This indicates that transaction failed after the final "." of
|
326
|
+
# the DATA command.
|
327
|
+
#
|
328
|
+
# X.6.10 This is a duplicate of X.6.8 and is thus deprecated.
|
329
|
+
# ------------------------------------------------------------------------------
|
330
|
+
# X.7.0 220 Other or undefined security status:(RFC 3463)
|
331
|
+
# 235 Something related to security caused the message to be returned,
|
332
|
+
# 450,454 and the problem cannot be well expressed with any of the other
|
333
|
+
# 500,501 provided detail codes. This status code may also be used when
|
334
|
+
# 503,504 the condition cannot be further described because of security
|
335
|
+
# 530,535 policies in force.
|
336
|
+
# 550
|
337
|
+
#
|
338
|
+
# X.7.1 451 Delivery not authorized, message refused:(RFC 3463)
|
339
|
+
# 454,502 The sender is not authorized to send to the destination. This
|
340
|
+
# 503,533 can be the result of per-host or per-recipient filtering. This
|
341
|
+
# 550,551 memo does not discuss the merits of any such filtering, but
|
342
|
+
# provides a mechanism to report such. This is useful only as
|
343
|
+
# a permanent error.
|
344
|
+
#
|
345
|
+
# X.7.2 550 Mailing list expansion prohibited:(RFC 3463)
|
346
|
+
# The sender is not authorized to send a message to the intended
|
347
|
+
# mailing list. This is useful only as a permanent error.
|
348
|
+
#
|
349
|
+
# X.7.3 --- Security conversion required but not possible:(RFC 3463)
|
350
|
+
# A conversion from one secure messaging protocol to another was
|
351
|
+
# required for delivery and such conversion was not possible.
|
352
|
+
# This is useful only as a permanent error.
|
353
|
+
#
|
354
|
+
# X.7.4 504 Security features not supported:(RFC 3463)
|
355
|
+
# A message contained security features such as secure authentication
|
356
|
+
# that could not be supported on the delivery protocol. This is
|
357
|
+
# useful only as a permanent error.
|
358
|
+
#
|
359
|
+
# X.7.5 --- Cryptographic failure:(RFC 3463)
|
360
|
+
# A transport system otherwise authorized to validate or decrypt
|
361
|
+
# a message in transport was unable to do so because necessary
|
362
|
+
# information such as key was not available or such information
|
363
|
+
# was invalid.
|
364
|
+
#
|
365
|
+
# X.7.6 --- Cryptographic algorithm not supported:(RFC 3463)
|
366
|
+
# A transport system otherwise authorized to validate or decrypt
|
367
|
+
# a message was unable to do so because the necessary algorithm
|
368
|
+
# was not supported.
|
369
|
+
|
370
|
+
# X.7.7 --- Message integrity failure:(RFC 3463)
|
371
|
+
# A transport system otherwise authorized to validate a message
|
372
|
+
# was unable to do so because the message was corrupted or altered.
|
373
|
+
# This may be useful as a permanent, transient persistent, or
|
374
|
+
# successful delivery code.
|
375
|
+
#
|
376
|
+
# X.7.8 535 Trust relationship required:(RFC 4954)
|
377
|
+
# 554 This response to the AUTH command indicates that the authentication
|
378
|
+
# failed due to invalid or insufficient authentication credentials.
|
379
|
+
# In this case, the client SHOULD ask the user to supply new credentials
|
380
|
+
# (such as by presenting a password dialog box).
|
381
|
+
#
|
382
|
+
# X.7.9 534 Authentication mechanism is too weak:(RFC 4954)
|
383
|
+
# This response to the AUTH command indicates that the selected
|
384
|
+
# authentication mechanism is weaker than server policy permits
|
385
|
+
# for that user. The client SHOULD retry with a new authentication
|
386
|
+
# mechanism.
|
387
|
+
#
|
388
|
+
# X.7.10 523 Encryption Needed:(RFC 5248)
|
389
|
+
# This indicates that external strong privacy layer is needed in
|
390
|
+
# order to use the requested authentication mechanism. This is
|
391
|
+
# primarily intended for use with clear text authentication mechanisms.
|
392
|
+
# A client which receives this may activate a security layer such
|
393
|
+
# as TLS prior to authenticating, or attempt to use a stronger
|
394
|
+
# mechanism.
|
395
|
+
#
|
396
|
+
# X.7.11 524 Encryption required for requested authentication mechanism:(RFC 4954)
|
397
|
+
# 538 This response to the AUTH command indicates that the selected
|
398
|
+
# authentication mechanism may only be used when the underlying
|
399
|
+
# SMTP connection is encrypted. Note that this response code is
|
400
|
+
# documented here for historical purposes only. Modern implementations
|
401
|
+
# SHOULD NOT advertise mechanisms that are not permitted due to
|
402
|
+
# lack of encryption, unless an encryption layer of sufficient
|
403
|
+
# strength is currently being employed.
|
404
|
+
#
|
405
|
+
# X.7.12 422 A password transition is needed:(RFC 4954)
|
406
|
+
# 432 This response to the AUTH command indicates that the user needs
|
407
|
+
# to transition to the selected authentication mechanism. This
|
408
|
+
# is typically done by authenticating once using the [PLAIN]
|
409
|
+
# authentication mechanism. The selected mechanism SHOULD then
|
410
|
+
# work for authentications in subsequent sessions.
|
411
|
+
#
|
412
|
+
# X.7.13 525 User Account Disabled:(RFC 5248)
|
413
|
+
# Sometimes a system administrator will have to disable a user's
|
414
|
+
# account (e.g., due to lack of payment, abuse, evidence of a
|
415
|
+
# break-in attempt, etc).
|
416
|
+
# This error code occurs after a successful authentication to a
|
417
|
+
# disabled account. This informs the client that the failure is
|
418
|
+
# permanent until the user contacts their system administrator
|
419
|
+
# to get the account re-enabled.
|
420
|
+
# It differs from a generic authentication failure where the
|
421
|
+
# client's best option is to present the passphrase entry dialog
|
422
|
+
# in case the user simply mistyped their passphrase.
|
423
|
+
#
|
424
|
+
# X.7.14 535 Trust relationship required:(RFC 5248)
|
425
|
+
# 554 The submission server requires a configured trust relationship
|
426
|
+
# with a third-party server in order to access the message content.
|
427
|
+
# This value replaces the prior use of X.7.8 for this error condition.
|
428
|
+
# thereby updating [RFC4468].
|
429
|
+
#
|
430
|
+
# X.7.15 450 Priority Level is too low:(RFC6710)
|
431
|
+
# 550 The specified priority level is below the lowest priority acceptable
|
432
|
+
# 4xx for the receiving SMTP server. This condition might be temporary,
|
433
|
+
# 5xx for example the server is operating in a mode where only higher
|
434
|
+
# priority messages are accepted for transfer and delivery, while
|
435
|
+
# lower priority messages are rejected.
|
436
|
+
#
|
437
|
+
# X.7.16 552 Message is too big for the specified priority:(RFC 6710)
|
438
|
+
# 4xx The message is too big for the specified priority.
|
439
|
+
# 5xx This condition might be temporary, for example the server is
|
440
|
+
# operating in a mode where only higher priority messages below
|
441
|
+
# certain size are accepted for transfer and delivery.
|
442
|
+
#
|
443
|
+
# X.7.17 5xx Mailbox owner has changed:(RFC 6710)
|
444
|
+
# This status code is returned when a message is received with
|
445
|
+
# a Require-Recipient-Valid-Since field or RRVS extension and
|
446
|
+
# the receiving system is able to determine that the intended
|
447
|
+
# recipient mailbox has not been under continuous ownership since
|
448
|
+
# the specified date-time.
|
449
|
+
#
|
450
|
+
# X.7.18 5xx Domain owner has changed:(RFC 7293)
|
451
|
+
# This status code is returned when a message is received with
|
452
|
+
# a Require-Recipient-Valid-Since field or RRVS extension and
|
453
|
+
# the receiving system wishes to disclose that the owner of the
|
454
|
+
# domain name of the recipient has changed since the specified
|
455
|
+
# date-time.
|
456
|
+
#
|
457
|
+
# X.7.19 5xx RRVS test cannot be completed:(RFC 7293)
|
458
|
+
# This status code is returned when a message is received with
|
459
|
+
# a Require-Recipient-Valid-Since field or RRVS extension and
|
460
|
+
# the receiving system cannot complete the requested evaluation
|
461
|
+
# because the required timestamp was not recorded.
|
462
|
+
# The message originator needs to decide whether to reissue the
|
463
|
+
# message without RRVS protection.
|
464
|
+
#
|
465
|
+
# X.7.20 550 No passing DKIM signature found:(RFC 7372)
|
466
|
+
# This status code is returned when a message did not contain
|
467
|
+
# any passing DKIM signatures. (This violates the advice of
|
468
|
+
# Section 6.1 of [RFC6376].)
|
469
|
+
#
|
470
|
+
# X.7.21 550 No acceptable DKIM signature found:(RFC 7372, 6476)
|
471
|
+
# This status code is returned when a message contains one or
|
472
|
+
# more passing DKIM signatures, but none are acceptable.
|
473
|
+
# (This violates the advice of Section 6.1 of [RFC6376].)
|
474
|
+
#
|
475
|
+
# X.7.22 550 No valid author-matched DKIM signature found:(RFC 7372)
|
476
|
+
# This status code is returned when a message contains one or
|
477
|
+
# more passing DKIM signatures, but none are acceptable because
|
478
|
+
# none have an identifier(s) that matches the author address(es)
|
479
|
+
# found in the From header field.
|
480
|
+
# This is a special case of X.7.21. (This violates the advice of
|
481
|
+
# Section 6.1 of [RFC6376].)
|
482
|
+
#
|
483
|
+
# X.7.23 550 SPF validation failed:(RFC 7273, 7208)
|
484
|
+
# This status code is returned when a message completed an SPF
|
485
|
+
# check that produced a "fail" result, contrary to local policy
|
486
|
+
# requirements. Used in place of 5.7.1 as described in Section
|
487
|
+
# 8.4 of [RFC7208].
|
488
|
+
#
|
489
|
+
# X.7.24 451 SPF validation error:(RFC 7372, 7208)
|
490
|
+
# 550 This status code is returned when evaluation of SPF relative
|
491
|
+
# to an arriving message resulted in an error. Used in place of
|
492
|
+
# 4.4.3 or 5.5.2 as described in Sections 8.6 and 8.7 of [RFC7208].
|
493
|
+
#
|
494
|
+
# X.7.25 550 Reverse DNS validation failed:(RFC 7372, 7601)
|
495
|
+
# This status code is returned when an SMTP client's IP address
|
496
|
+
# failed a reverse DNS validation check, contrary to local policy
|
497
|
+
# requirements.
|
498
|
+
#
|
499
|
+
# X.7.26 550 Multiple authentication checks failed:(RFC 7372)
|
500
|
+
# This status code is returned when a message failed more than
|
501
|
+
# one message authentication check, contrary to local policy
|
502
|
+
# requirements. The particular mechanisms that failed are not
|
503
|
+
# specified.
|
504
|
+
#
|
505
|
+
# X.7.27 550 Sender address has null MX:(RFC 7505)
|
506
|
+
# This status code is returned when the associated sender address
|
507
|
+
# has a null MX, and the SMTP receiver is configured to reject
|
508
|
+
# mail from such sender (e.g., because it could not return a DSN).
|
509
|
+
# ------------------------------------------------------------------------------
|
510
|
+
# SAMPLES
|
511
|
+
#
|
512
|
+
# 554 5.5.0 No recipients have been specified
|
513
|
+
# 503 5.5.0 Valid RCPT TO required before BURL
|
514
|
+
# 554 5.6.3 Conversion required but not supported
|
515
|
+
# 554 5.3.4 Message too big for system
|
516
|
+
# 554 5.7.8 URL resolution requires trust relationship
|
517
|
+
# 552 5.2.2 Mailbox full
|
518
|
+
# 554 5.6.6 IMAP URL resolution failed
|
519
|
+
# 250 2.5.0 Waiting for additional BURL or BDAT commands
|
520
|
+
# 451 4.4.1 IMAP server unavailable
|
521
|
+
# 250 2.5.0 Ok.
|
522
|
+
# 250 2.6.4 MIME header conversion with loss performed
|
523
|
+
# 235 2.7.0 Authentication Succeeded
|
524
|
+
# 432 4.7.12 A password transition is needed
|
525
|
+
# 454 4.7.0 Temporary authentication failure
|
526
|
+
# 534 5.7.9 Authentication mechanism is too weak
|
527
|
+
# 535 5.7.8 Authentication credentials invalid
|
528
|
+
# 500 5.5.6 Authentication Exchange line is too long
|
529
|
+
# 530 5.7.0 Authentication required
|
530
|
+
# 538 5.7.11 Encryption required for requested authentication
|
531
|
+
# 5.7.8 Authentication credentials invalid
|
532
|
+
# 5.7.9 Authentication mechanism is too weak
|
533
|
+
# 5.7.11 Encryption required for requested authentication mechanism
|
534
|
+
# ------------------------------------------------------------------------------
|
535
|
+
module Sisimai
|
536
|
+
module SMTP
|
537
|
+
# Sisimai::RFC3463 is utilities for getting D.S.N. value from error reason text,
|
538
|
+
# getting the reason from D.S.N. value, and getting D.S.N. from the text including
|
539
|
+
# D.S.N.
|
540
|
+
module Status
|
541
|
+
# Imported from p5-Sisimail/lib/Sisimai/SMTP/Status.pm
|
542
|
+
class << self
|
543
|
+
StandardCode = {
|
544
|
+
'4.1.6' => 'hasmoved', # Destination mailbox has moved, No forwarding address
|
545
|
+
'4.1.7' => 'rejected', # Bad sender's mailbox address syntax
|
546
|
+
'4.1.8' => 'rejected', # Bad sender's system address
|
547
|
+
'4.1.9' => 'systemerror', # Message relayed to non-compliant mailer
|
548
|
+
'4.2.1' => 'suspend', # Mailbox disabled, not accepting messages
|
549
|
+
'4.2.2' => 'mailboxfull', # Mailbox full
|
550
|
+
'4.2.3' => 'exceedlimit', # Message length exceeds administrative limit
|
551
|
+
'4.2.4' => 'filtered', # Mailing list expansion problem
|
552
|
+
#'4.3.0' => 'systemerror', # Other or undefined mail system status
|
553
|
+
'4.3.1' => 'systemfull', # Mail system full
|
554
|
+
'4.3.2' => 'notaccept', # System not accepting network messages
|
555
|
+
'4.3.3' => 'systemerror', # System not capable of selected features
|
556
|
+
'4.3.5' => 'systemerror', # System incorrectly configured
|
557
|
+
#'4.4.0' => 'networkerror', # Other or undefined network or routing status
|
558
|
+
'4.4.1' => 'expired', # No answer from host
|
559
|
+
'4.4.2' => 'networkerror', # Bad connection
|
560
|
+
#'4.4.3' => 'systemerror', # Directory server failure
|
561
|
+
'4.4.4' => 'networkerror', # Unable to route
|
562
|
+
'4.4.5' => 'toomanyconn', # Mail system congestion
|
563
|
+
'4.4.6' => 'networkerror', # Routing loop detected
|
564
|
+
'4.4.7' => 'expired', # Delivery time expired
|
565
|
+
#'4.5.0' => 'networkerror', # Other or undefined protocol status
|
566
|
+
'4.5.3' => 'systemerror', # Too many recipients
|
567
|
+
'4.5.5' => 'systemerror', # Wrong protocol version
|
568
|
+
'4.6.0' => 'contenterror', # Other or undefined media error
|
569
|
+
'4.6.2' => 'contenterror', # Conversion required and prohibited
|
570
|
+
'4.6.5' => 'contenterror', # Conversion Failed
|
571
|
+
#'4.7.0' => 'securityerror', # Other or undefined security status
|
572
|
+
'4.7.1' => 'blocked', # Delivery not authorized, message refused
|
573
|
+
'4.7.2' => 'blocked', # Mailing list expansion prohibited
|
574
|
+
'4.7.5' => 'securityerror', # Cryptographic failure
|
575
|
+
'4.7.6' => 'securityerror', # Cryptographic algorithm not supported
|
576
|
+
'4.7.7' => 'securityerror', # Message integrity failure
|
577
|
+
'4.7.12' => 'securityerror', # A password transition is needed
|
578
|
+
'4.7.15' => 'securityerror', # Priority Level is too low
|
579
|
+
'4.7.16' => 'mesgtoobig', # Message is too big for the specified priority
|
580
|
+
'4.7.24' => 'securityerror', # SPF validation error
|
581
|
+
# ------------------------------------------------------------------------------
|
582
|
+
'5.1.0' => 'userunknown', # Other address status
|
583
|
+
'5.1.1' => 'userunknown', # Bad destination mailbox address
|
584
|
+
'5.1.2' => 'hostunknown', # Bad destination system address
|
585
|
+
'5.1.3' => 'userunknown', # Bad destination mailbox address syntax
|
586
|
+
'5.1.4' => 'filtered', # Destination mailbox address ambiguous
|
587
|
+
'5.1.6' => 'hasmoved', # Destination mailbox has moved, No forwarding address
|
588
|
+
'5.1.7' => 'rejected', # Bad sender's mailbox address syntax
|
589
|
+
'5.1.8' => 'rejected', # Bad sender's system address
|
590
|
+
'5.1.9' => 'systemerror', # Message relayed to non-compliant mailer
|
591
|
+
'5.1.10' => 'notaccept', # Recipient address has null MX
|
592
|
+
'5.2.0' => 'filtered', # Other or undefined mailbox status
|
593
|
+
'5.2.1' => 'filtered', # Mailbox disabled, not accepting messages
|
594
|
+
'5.2.2' => 'mailboxfull', # Mailbox full
|
595
|
+
'5.2.3' => 'exceedlimit', # Message length exceeds administrative limit
|
596
|
+
'5.2.4' => 'filtered', # Mailing list expansion problem
|
597
|
+
'5.3.0' => 'systemerror', # Other or undefined mail system status
|
598
|
+
'5.3.1' => 'systemfull', # Mail system full
|
599
|
+
'5.3.2' => 'notaccept', # System not accepting network messages
|
600
|
+
'5.3.3' => 'systemerror', # System not capable of selected features
|
601
|
+
'5.3.4' => 'mesgtoobig', # Message too big for system
|
602
|
+
'5.3.5' => 'systemerror', # System incorrectly configured
|
603
|
+
'5.4.0' => 'networkerror', # Other or undefined network or routing status
|
604
|
+
'5.4.3' => 'systemerror', # Directory server failure
|
605
|
+
'5.5.3' => 'toomanyconn', # Too many recipients
|
606
|
+
'5.5.4' => 'systemerror', # Invalid command arguments
|
607
|
+
'5.5.5' => 'systemerror', # Wrong protocol version
|
608
|
+
'5.5.6' => 'securityerror', # Authentication Exchange line is too long
|
609
|
+
'5.6.0' => 'contenterror', # Other or undefined media error
|
610
|
+
'5.6.1' => 'contenterror', # Media not supported
|
611
|
+
'5.6.2' => 'contenterror', # Conversion required and prohibited
|
612
|
+
'5.6.3' => 'contenterror', # Conversion required but not supported
|
613
|
+
'5.6.5' => 'contenterror', # Conversion Failed
|
614
|
+
'5.6.6' => 'contenterror', # Message content not available
|
615
|
+
'5.6.7' => 'contenterror', # Non-ASCII addresses not permitted for that sender/recipient
|
616
|
+
'5.6.8' => 'contenterror', # UTF-8 string reply is required, but not permitted by the SMTP client
|
617
|
+
'5.6.9' => 'contenterror', # UTF-8 header message cannot be transferred to one or more recipients
|
618
|
+
'5.7.0' => 'securityerror', # Other or undefined security status
|
619
|
+
'5.7.1' => 'blocked', # Delivery not authorized, message refused
|
620
|
+
'5.7.2' => 'blocked', # Mailing list expansion prohibited
|
621
|
+
'5.7.3' => 'securityerror', # Security conversion required but not possible
|
622
|
+
'5.7.4' => 'securityerror', # Security features not supported
|
623
|
+
'5.7.5' => 'securityerror', # Cryptographic failure
|
624
|
+
'5.7.6' => 'securityerror', # Cryptographic algorithm not supported
|
625
|
+
'5.7.7' => 'securityerror', # Message integrity failure
|
626
|
+
'5.7.8' => 'securityerror', # Authentication credentials invalid
|
627
|
+
'5.7.9' => 'securityerror', # Authentication mechanism is too weak
|
628
|
+
'5.7.10' => 'securityerror', # Encryption Needed
|
629
|
+
'5.7.11' => 'securityerror', # Encryption required for requested authentication mechanism
|
630
|
+
'5.7.13' => 'suspend', # User Account Disabled
|
631
|
+
'5.7.14' => 'securityerror', # Trust relationship required
|
632
|
+
'5.7.15' => 'securityerror', # Priority Level is too low
|
633
|
+
'5.7.16' => 'mesgtoobig', # Message is too big for the specified priority
|
634
|
+
'5.7.17' => 'hasmoved', # Mailbox owner has changed
|
635
|
+
'5.7.18' => 'hasmoved', # Domain owner has changed
|
636
|
+
'5.7.19' => 'securityerror', # RRVS test cannot be completed
|
637
|
+
'5.7.20' => 'securityerror', # No passing DKIM signature found
|
638
|
+
'5.7.21' => 'securityerror', # No acceptable DKIM signature found
|
639
|
+
'5.7.22' => 'securityerror', # No valid author-matched DKIM signature found
|
640
|
+
'5.7.23' => 'securityerror', # SPF validation failed
|
641
|
+
'5.7.24' => 'securityerror', # SPF validation error
|
642
|
+
'5.7.25' => 'blocked', # Reverse DNS validation failed
|
643
|
+
'5.7.26' => 'securityerror', # Multiple authentication checks failed
|
644
|
+
'5.7.27' => 'rejected', # Sender address has null MX
|
645
|
+
}
|
646
|
+
|
647
|
+
InternalCode = {
|
648
|
+
'temporary' => {
|
649
|
+
'blocked' => '4.0.971',
|
650
|
+
'contenterror' => '4.0.960',
|
651
|
+
# 'exceedlimit' => '4.0.923',
|
652
|
+
'expired' => '4.0.947',
|
653
|
+
'filtered' => '4.0.924',
|
654
|
+
# 'hasmoved' => '4.0.916',
|
655
|
+
# 'hostunknown' => '4.0.912',
|
656
|
+
'mailboxfull' => '4.0.922',
|
657
|
+
# 'mailererror' => '4.0.939',
|
658
|
+
# 'mesgtoobig' => '4.0.934',
|
659
|
+
'networkerror' => '4.0.944',
|
660
|
+
# 'norelaying' => '4.0.909',
|
661
|
+
'notaccept' => '4.0.932',
|
662
|
+
'onhold' => '4.0.901',
|
663
|
+
'rejected' => '4.0.918',
|
664
|
+
'securityerror' => '4.0.970',
|
665
|
+
'spamdetected' => '4.0.980',
|
666
|
+
# 'suspend' => '4.0.921',
|
667
|
+
'systemerror' => '4.0.930',
|
668
|
+
'systemfull' => '4.0.931',
|
669
|
+
'toomanyconn' => '4.0.945',
|
670
|
+
# 'userunknown' => '4.0.911',
|
671
|
+
'undefined' => '4.0.900',
|
672
|
+
},
|
673
|
+
'permanent' => {
|
674
|
+
'blocked' => '5.0.971',
|
675
|
+
'contenterror' => '5.0.960',
|
676
|
+
'exceedlimit' => '5.0.923',
|
677
|
+
'expired' => '5.0.947',
|
678
|
+
'filtered' => '5.0.910',
|
679
|
+
'hasmoved' => '5.0.916',
|
680
|
+
'hostunknown' => '5.0.912',
|
681
|
+
'mailboxfull' => '5.0.922',
|
682
|
+
'mailererror' => '5.0.939',
|
683
|
+
'mesgtoobig' => '5.0.934',
|
684
|
+
'networkerror' => '5.0.944',
|
685
|
+
'norelaying' => '5.0.909',
|
686
|
+
'notaccept' => '5.0.932',
|
687
|
+
'onhold' => '5.0.901',
|
688
|
+
'rejected' => '5.0.918',
|
689
|
+
'securityerror' => '5.0.970',
|
690
|
+
'spamdetected' => '5.0.980',
|
691
|
+
'suspend' => '5.0.921',
|
692
|
+
'systemerror' => '5.0.930',
|
693
|
+
'systemfull' => '5.0.931',
|
694
|
+
'toomanyconn' => '5.0.945',
|
695
|
+
'userunknown' => '5.0.911',
|
696
|
+
'undefined' => '5.0.900',
|
697
|
+
},
|
698
|
+
}
|
699
|
+
|
700
|
+
# Convert from the reason string to the internal status code
|
701
|
+
# @param [String] argv1 Reason name
|
702
|
+
# @param [True,False] argv2 false: Permanent error
|
703
|
+
# true: Temporary error
|
704
|
+
# @return [String] DSN or empty if the 1st argument is missing
|
705
|
+
# @see name
|
706
|
+
def code(argv1 = '', argv2 = false)
|
707
|
+
return '' unless argv1
|
708
|
+
return '' unless argv1.size > 0
|
709
|
+
|
710
|
+
table = argv2 ? InternalCode['temporary'] : InternalCode['permanent']
|
711
|
+
code0 = table[argv1] || InternalCode['permanent'][argv1] || ''
|
712
|
+
return code0
|
713
|
+
end
|
714
|
+
|
715
|
+
# Convert from the status code to the reason string
|
716
|
+
# @param [String] argv1 Status code(DSN)
|
717
|
+
# @return [String] Reason name or empty if the first argument did
|
718
|
+
# not match with values in Sisimai's reason list
|
719
|
+
# @see code
|
720
|
+
def name(argv1 = '')
|
721
|
+
return '' unless argv1
|
722
|
+
return '' unless argv1.size > 0
|
723
|
+
return '' unless argv1 =~ /\A[45][.]\d[.]\d+\z/
|
724
|
+
return StandardCode[argv1] || ''
|
725
|
+
end
|
726
|
+
|
727
|
+
# Get a DSN code value from given string including DSN
|
728
|
+
# @param [String] argv1 String including DSN
|
729
|
+
# @return [String] DSN or empty string if the first agument did
|
730
|
+
# not include DSN
|
731
|
+
def find(argv1 = '')
|
732
|
+
return '' unless argv1
|
733
|
+
return '' unless argv1.size > 0
|
734
|
+
|
735
|
+
foundvalue = ''
|
736
|
+
regularexp = [
|
737
|
+
%r/[ ]?[(][#]([45][.]\d[.]\d+)[)]?[ ]?/, # #5.5.1
|
738
|
+
%r/\b\d{3}[- ][#]?([45][.]\d[.]\d+)\b/, # 550-5.1.1 OR 550 5.5.1
|
739
|
+
%r/\b([45][.]\d[.]\d+)\b/, # 5.5.1
|
740
|
+
]
|
741
|
+
|
742
|
+
regularexp.each do |e|
|
743
|
+
# Get the value of D.S.N. in the text
|
744
|
+
next unless r = argv1.match(e)
|
745
|
+
foundvalue = r[1]
|
746
|
+
break
|
747
|
+
end
|
748
|
+
|
749
|
+
return foundvalue
|
750
|
+
end
|
751
|
+
end
|
752
|
+
end
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|