Commits

Anonymous committed e9e8227

Fixed issue in JunkEmailJanitor
Added console_script hook for remove-known-spammers

Comments (0)

Files changed (2)

jaraco/net/email.py

 logging.basicConfig(level=logging.INFO)
 log = logging.getLogger(__name__)
 
+DEFAULT_SERVER = 'mail.jaraco.com'
+
 def get_login_params(options):
 	if not options.username:
 		options.username = raw_input('username [%s]: ' % getuser()) or getuser()
 
 def add_options(parser):
 	parser.add_option('-u', '--username')
-	parser.add_option('--hostname', default='hornigold.jaraco.com')
+	parser.add_option('--hostname', default=DEFAULT_SERVER)
 
 def get_options():
 	parser = OptionParser()
 	remove messages sent by blocklisted servers.
 	"""
 	def run(self):
-		self.messages = self.get_folder_messages('Junk E-mail')
+		self.messages = list(self.get_folder_messages('Junk E-mail'))
 		self.summarize()
 
 def remove_known_spammers():
 				'dns-forward-service = jaraco.net.dns:start_service',
 				'dnsbl-check = jaraco.net.dnsbl:handle_cmdline',
 				'ntp = jaraco.net.ntp:handle_command_line',
+				'remove-known-spammers = jaraco.net.email:remove_known_spammers',
 				],
 		},
 		install_requires=[