Module: Sisimai::Reason::MailboxFull
- Defined in:
- lib/sisimai/reason/mailboxfull.rb
Overview
Sisimai::Reason::MailboxFull checks the bounce reason is "MailboxFull" or not. This class is called only Sisimai::Reason class.
This is the error that a recipient's mailbox is full. Sisimai will set "MailboxFull" to the reason of email bounce if the value of Status: field in a bounce email is "4.2.2" or "5.2.2".
Constant Summary collapse
- Index =
[ "452 insufficient disk space", "account disabled temporarly for exceeding receiving limits", "boite du destinataire pleine", "exceeded storage allocation", "full mailbox", "mailbox exceeds allowed size", "mailbox size limit exceeded", "mailbox would exceed maximum allowed storage", "mailfolder is full", "no space left on device", "not sufficient disk space", "quota violation for", "too much mail data", # @docomo.ne.jp "user has exceeded quota, bouncing mail", "user has too many messages on the server", "user's space has been used up", ].freeze
- Pairs =
[ ["account is ", " quota"], ["disk", "quota"], ["enough ", " space"], ["mailbox ", "exceeded", " limit"], ["mailbox ", "full"], # Exim/transports/appendfile.c:2567 ["mailbox ", "quota"], ["maildir ", "quota"], ["over ", "quota"], ["quota ", "exceeded"], # Exim/transports/appendfile.c:3050 ].freeze
Class Method Summary collapse
- .description ⇒ Object
-
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions.
- .text ⇒ Object
-
.true(argvs) ⇒ Boolean
The envelope recipient's mailbox is full or not.
Class Method Details
.description ⇒ Object
42 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 42 def description; return "Email rejected due to a recipient's mailbox is full"; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
47 48 49 50 51 52 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 47 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return true if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) } return false end |
.text ⇒ Object
41 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 41 def text; return Sisimai::Eb::ReFULL; end |
.true(argvs) ⇒ Boolean
The envelope recipient's mailbox is full or not
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 59 def true(argvs) return false if argvs['deliverystatus'].empty? return true if argvs['reason'] == Sisimai::Eb::ReFULL # Delivery status code points "MailboxFull". # Status: 4.2.2 # Diagnostic-Code: SMTP; 450 4.2.2 <***@example.jp>... Mailbox Full return true if Sisimai::SMTP::Status.name(argvs['deliverystatus']) == Sisimai::Eb::ReFULL return match(argvs['diagnosticcode'].downcase) end |