Method: Fluent::SendmailInput#queued

Defined in:
lib/fluent/plugin/in_sendmail.rb

#queued(es, deliveryid, time, to_line) ⇒ Object



127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/fluent/plugin/in_sendmail.rb', line 127

def queued(es, deliveryid, time, to_line)
  from_line = @delivers[deliveryid].from_line
  record = from_line.merge(to_line)
  delay = to_line["delay_in_sec"]
  # when a queue is expired, the mail will be bounced
  if delay >= queuereturn
    record["canonical_status"] = "bounced"
    sent(es, deliveryid, time, record)
    return
  end
  record = from_line.merge(to_line)
  es.add(time, record)
end