Project

General

Profile

« Previous | Next » 

Revision 2f1c6b5b

Added by Marc Dequènes almost 14 years ago

  • ID 2f1c6b5bfb3ebbadde902db6e5d540530976de36

[evol] configuration defaults and schema checking (closes 21)

View differences:

lib/cyborghood/imap.rb
@available_mails = 0
@available_mails_mutex = Mutex.new
if not (@config.debug.nil? or @config.debug.flags.nil?) and @config.debug.flags.include?(:debug_imapverbose)
if @config.debug.flags.include?('debug_imapverbose')
Net::IMAP.debug = true
end
end
......
end
def delete
if @config.debug.nil? or @config.debug.flags.nil? or not @config.debug.flags.include?(:debug_nomaildeletion)
if not @config.debug.flags.include?('debug_nomaildeletion')
@imap.store(@message_id, "+FLAGS", [:Deleted])
end
end
......
def connect
return true if @imap
# using SSL because TLS does not work in the NET::IMAP library
# using SSL because TLS does not work in the NET::IMAP library in Ruby 1.8
# (but available in 1.9)
ssl = (not @params.ca_cert.nil?)
port = @params.port || (ssl ? 993 : 143)
check_ca = ssl
......
begin
check_inbox(&message_handler)
# don't loop forever
return if not (@config.debug.nil? or @config.debug.flags.nil?) and @config.debug.flags.include?(:debug_nomaildeletion)
return if @config.debug.flags.include?('debug_nomaildeletion')
end while waiting_mails?
if self.capabilities.include?("IDLE")

Also available in: Unified diff