def ParseAndObscureAddress(email):
  """Break the given email into username and domain, and obscure.

  Args:
    email: string email address to process

  Returns:
    A 3-tuple (username, domain, obscured_username).
    The obscured_username is trucated the same way that Google Groups does it.
  """
  if '@' in email:
    username, user_domain = email.split('@', 1)
  else:  # don't fail if User table has unexpected email address format.
    username, user_domain = email, ''

  base_username = username.split('+')[0]
  cutoff_point = min(8, max(1, len(base_username) - 3))
  obscured_username = base_username[:cutoff_point]

  return username, user_domain, obscured_username