Class: Mailman::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/mailman/configuration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#graceful_deathboolean

rather than dropping dead immediately. Currently only works with POP3 connections.

Returns:

  • (boolean)

    catch SIGINT and allow current iteration to finish



35
36
37
# File 'lib/mailman/configuration.rb', line 35

def graceful_death
  @graceful_death
end

#ignore_stdinboolean

Returns whether or not to ignore stdin. Setting this to true stops Mailman from entering stdin processing mode.

Returns:

  • (boolean)

    whether or not to ignore stdin. Setting this to true stops Mailman from entering stdin processing mode.



30
31
32
# File 'lib/mailman/configuration.rb', line 30

def ignore_stdin
  @ignore_stdin
end

#imapHash

Returns the configuration hash for IMAP

Returns:

  • (Hash)

    the configuration hash for IMAP



11
12
13
# File 'lib/mailman/configuration.rb', line 11

def imap
  @imap
end

#loggerLogger

Returns the application's logger

Returns:

  • (Logger)

    the application's logger



5
6
7
# File 'lib/mailman/configuration.rb', line 5

def logger
  @logger
end

#maildirString

Returns the path to the maildir

Returns:

  • (String)

    the path to the maildir



18
19
20
# File 'lib/mailman/configuration.rb', line 18

def maildir
  @maildir
end

#poll_intervalFixnum

Returns the poll interval for POP3 or IMAP. Setting this to 0 disables polling

Returns:

  • (Fixnum)

    the poll interval for POP3 or IMAP. Setting this to 0 disables polling



15
16
17
# File 'lib/mailman/configuration.rb', line 15

def poll_interval
  @poll_interval
end

#pop3Hash

Returns the configuration hash for POP3

Returns:

  • (Hash)

    the configuration hash for POP3



8
9
10
# File 'lib/mailman/configuration.rb', line 8

def pop3
  @pop3
end

#rails_rootString

Returns the path to the rails root. Setting this to false to stop the rails environment from loading

Returns:

  • (String)

    the path to the rails root. Setting this to false to stop the rails environment from loading



26
27
28
# File 'lib/mailman/configuration.rb', line 26

def rails_root
  @rails_root
end

#watch_maildirboolean

Returns whether or not to watch for new messages in the maildir. Settings this to false disables listening for file changes if using the Maildir receiver.

Returns:

  • (boolean)

    whether or not to watch for new messages in the maildir. Settings this to false disables listening for file changes if using the Maildir receiver.



22
23
24
# File 'lib/mailman/configuration.rb', line 22

def watch_maildir
  @watch_maildir
end

Class Method Details

.from_hash(options) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/mailman/configuration.rb', line 57

def self.from_hash(options)
  config = self.new
  options.each do |key, value|
    config.send "#{key}=", value
  end
  config
end

Instance Method Details

#middlewareObject



37
38
39
# File 'lib/mailman/configuration.rb', line 37

def middleware
  @middleware ||= Mailman::Middleware.new
end