]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - src/postfixadmin_db.rb
Use the 'mailbox' table instead of 'alias'; the alias.goto field can contain a list...
[mailshears.git] / src / postfixadmin_db.rb
index 7998bfe677681638766b26a54275419b0a18d20f..5291a53987587b0ee1da11ccee4e33c835191885 100644 (file)
@@ -33,7 +33,7 @@ class PostfixadminDb
 
       # If address = goto, then the alias basically says, "really
       # deliver to that address; it's not an alias."
 
       # If address = goto, then the alias basically says, "really
       # deliver to that address; it's not an alias."
-      sql_query = 'SELECT address FROM alias WHERE address = goto;'
+      sql_query = 'SELECT username FROM mailbox;'
       result = connection.query(sql_query)
       connection.close()
     rescue PGError => e
       result = connection.query(sql_query)
       connection.close()
     rescue PGError => e