Ok so im setting up a postfix sql connection and for some weird reason, the same account that is accessing the previous two maps is now refusing the connection to 127.0.0.1. Two Connections are already working with the same credentials.
user = exampleadmin
password = bgfoenawox
hosts = 127.0.0.1
dbname = exampleserver
query = SELECT destination FROM virtual_aliases WHERE source='%s'
This gives me the following error in putty,
postmap: warning: connect to mysql server 127.0.0.1:Can't connect to MySQL server on '127.0.0.1' (111)
postmap: fatal: table mysql:/etc/postfix/mysql-virtual-alias-maps.cf: query error: Connection refused
user = exampleadmin
password = bgfoenawox
hosts = 127.0.0.1
dbname = exampleserver
query = SELECT 1 FROM virtual_users WHERE email='%s'
This gives me the following result in putty,
1
user = exampleadmin
password = bgfoenawox
hosts = 127.0.0.1
dbname = exampleserver
query = SELECT 1 FROM virtual_domains WHERE name='%s'
This gives me the following result in putty,
1
I am following this guide here. Postfix Guide
Finally, that didnt take long.
nano /etc/postfix/mysql-virtual-alias-maps.cf
From : 127.0.0.1 > HOSTNAME e.g. server54
postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-alias-maps.cf
Your email address ([email protected])