- def self.no_account_creation(address, domain = nil)
- match(address, domain).where(:k => "no_account_creation").exists?
+ def self.allow_account_creation(address, options = {})
+ acls = Acl.where("address >>= ?", address)
+ .and(Acl.where(:k => "allow_account_creation"))
+ acls = acls.and(Acl.where(:domain => options[:domain])) if options[:domain]
+ acls = acls.and(Acl.where(:mx => options[:mx])) if options[:mx]
+
+ !acls.empty?