The final error I am getting when I start postfix is as below postfix/cleanup[8682]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (111)
So it looks as a permission issue. I hope, postfix uses DB user/password given in alias-maps (in my case /etc/postfix/mysql-virtual-alias-maps.cf) file. The content of file is as below. *user=mailuserpassword=mailpasswordhosts=127.0.0.1port=9876dbname=maildbquery=SELECT destination FROM virtual_aliases WHERE source='%s'* So in this case , postfix uses DB user *mailuser *and password *mailpassword* to connect to mysql. Next I checked the permission stuff in my DB. *mysql> mysql> show grants for 'mailuser'@'127.0.0.1';+--------------------------------------------------------------------------------------------------------------------------+| Grants for mailuser@127.0.0.1 <mailuser@127.0.0.1> |+--------------------------------------------------------------------------------------------------------------------------+| GRANT ALL PRIVILEGES ON *.* TO 'mailuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*B53D5E197345FF7F5B6BEC761F5E952BD4393656' || GRANT ALL PRIVILEGES ON `maildb`.* TO 'mailuser'@'127.0.0.1' |+--------------------------------------------------------------------------------------------------------------------------+2 rows in set (0.00 sec)* >From above one can see the permissions are in place. So, why I get mysql 111 (connection refuse) error. Any idea.., kindly help. Thanks Austin On Sun, Oct 19, 2014 at 11:10 PM, Austin Einter <austin.ein...@gmail.com> wrote: > Dear All > I am trying to setup postfix/dovecot in an Ubuntu 12.04 system. > > Though I have installed postfix, dovecot and spamassin (with complete > configurations), when I start service postfix, in terminal it shows > everything fine. > > In /var/log/mail.log and syslog I see below errors. > > 29615 Oct 19 13:33:37 Austin postfix/master[2134]: daemon started -- > version 2.9.6, configuration /etc/postfix > 29616 Oct 19 13:33:37 Austin postfix/pickup[2137]: C959EC2387: uid=0 > from=<root> > 29617 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: connect to > mysql server localhost: Can't connect to local MySQL server through > socke t '/var/run/mysqld/mysqld.sock' (2) > 29618 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29619 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: C959EC2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - - > deferring delivery > 29620 Oct 19 13:33:37 Austin postfix/pickup[2137]: CB8ADC2387: uid=0 > from=<root> > 29621 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29622 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: CB8ADC2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - - > deferring delivery > 29623 Oct 19 13:33:37 Austin postfix/pickup[2137]: CBC35C2387: uid=0 > from=<root> > 29624 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29625 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: CBC35C2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - - > deferring delivery > 29626 Oct 19 13:33:37 Austin postfix/pickup[2137]: CC130C2387: uid=0 > from=<root> > 29627 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29628 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: CC130C2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - - > deferring delivery > 29629 Oct 19 13:33:37 Austin postfix/pickup[2137]: CC4EBC2387: uid=0 > from=<root> > 29630 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29631 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: CC4EBC2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - - > deferring delivery > 29632 Oct 19 13:33:37 Austin postfix/pickup[2137]: CC80EC2387: uid=0 > from=<root> > 29633 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: > mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for " > r...@mail.mydomain.com" > 29634 Oct 19 13:33:37 Austin postfix/cleanup[2139]: warning: CC80EC2387: > virtual_alias_maps map lookup problem for r...@mail.mydomain.com - > > > I tried few things including modifying permissions (for maps files), port > numbers etc..., but no luck. > > > Can somebody kindly let me know what I need to do to avoid this error. > > Thanks > Austin > > > >