import re


def SelectAbuse(items):
	"""
	Wrapper function to selected the best effort email address from a list of email addresses for
	the abuse email. The algorithm is simple, first, try to find "abuse@domain", next, and email
	addres with "abuse" in the user id. All others are added to the potentials list.
	"""
	hit = None

	potentials = []

	for item in items:
		user,domain = item.split("@")

		if re.search("^abuse$",user):
			hit = item
		else:
			potentials.append(item)

	return hit, potentials