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
41 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 41 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
46 47 48 49 50 51 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 46 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
40 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 40 def text; return 'mailboxfull'; end |
.true(argvs) ⇒ Boolean
The envelope recipient’s mailbox is full or not
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/sisimai/reason/mailboxfull.rb', line 58 def true(argvs) return false if argvs['deliverystatus'].empty? return true if argvs['reason'] == 'mailboxfull' # 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']) == 'mailboxfull' return match(argvs['diagnosticcode'].downcase) end |