diff --git a/backend/gvadm/DomainTools.py b/backend/gvadm/DomainTools.py
index 0235261..45c86f4 100644
--- a/backend/gvadm/DomainTools.py
+++ b/backend/gvadm/DomainTools.py
@@ -20,6 +20,15 @@ class NoSysuserForDomain(Exception):
   def __str__(self):
     return repr("No system user for domain %s" % (self.domain))
 
+class InvalidPopUser(Exception):
+  """This exception is raised if an invalid POP3/IMAP user has been specified."""
+  def __init__(self, domain, username):
+    self.domain = domain
+    self.username = username
+
+  def __str__(self):
+    return "Invalid POP3/IMAP user %s in domain %s." % (self.username, self.domain)
+
 class Domain:
   """A Domain representation object with service methods."""
   def __init__(self, domain):
@@ -43,7 +52,7 @@ class Domain:
       raise InvalidDomain(self)
 
   def __str__(self):
-    return repr(self.domain)
+    return str(self.domain)
 
   def getSysuser(self):
     """Gets the system user id of the domain."""
@@ -120,3 +129,34 @@ Password: %(password)s""" % {'domain': self.domain,
     s.connect()
     s.sendmail(Settings.mailsender, [Settings.mailreceiver], themail.as_string())
     s.close()
+
+  def listPopUsers(self):
+    sysuser = self.getSysuser()
+  
+    cr = self.cnx.cursor()
+    cr.execute("SELECT id FROM mailpasswd WHERE id LIKE %(user)s" % {
+               'user': psycopg.QuotedString(sysuser + '%')})
+    self.cnx.commit()
+
+    result = cr.fetchall()
+    return [line[0] for line in result]
+
+  def hasPopUser(self, username):
+    """Checks whether the specified POP3/IMAP user exists in the domain."""
+    return ([user for user in domain.listPopUsers() if (user == username)])
+  
+  def updatePopPassword(self, username, password=PasswordTools.generate_password()):
+    """Updates the password of the given POP3/IMAP user."""
+    if self.hasPopUser(username):
+      print("will update password of user %s to %s" % (username, password))
+    else:
+      raise InvalidPopUser(self, username)
+ 
+if __name__ == '__main__':
+  domain = Domain('efs-sohland.de')
+  # check for not existing user
+  try:
+    domain.updatePopPassword('usr03p2', 'test')
+  except InvalidPopUser, ipu:
+    print ipu
+  domain.updatePopPassword('usr05p2')