# Postfix can't send and receive email

## SnEptUne

Hi,

My postfix isn't working anymore.  Here's my log:

postfix/trivial-rewrite[10324]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10324]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10325]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10325]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10327]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10327]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10328]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10328]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10329]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10329]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10330]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10330]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10326]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10326]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/smtpd[9959]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10121]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10324 exit status 1

postfix/master[8539]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling

postfix/smtpd[9959]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10121]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10325 exit status 1

postfix/smtpd[10123]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9968]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10123]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9968]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10327 exit status 1

postfix/smtpd[10196]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9958]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10196]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9958]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10328 exit status 1

postfix/qmgr[10309]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9961]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/qmgr[10309]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9961]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10329 exit status 1

postfix/smtpd[9964]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10032]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9964]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10032]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10330 exit status 1

postfix/smtpd[9962]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9962]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9954]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9963]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10326 exit status 1

postfix/smtpd[9954]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9963]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10333]: match_string: mynetworks ~? debug_peer_list

postfix/smtpd[10333]: match_string: mynetworks ~? fast_flush_domains

postfix/smtpd[10333]: match_string: mynetworks ~? mynetworks

postfix/smtpd[10333]: match_string: relay_domains ~? debug_peer_list

postfix/smtpd[10333]: match_string: relay_domains ~? fast_flush_domains

postfix/smtpd[10333]: match_string: relay_domains ~? mynetworks

postfix/smtpd[10333]: match_string: relay_domains ~? permit_mx_backup_networks

postfix/smtpd[10333]: match_string: relay_domains ~? qmqpd_authorized_clients

postfix/smtpd[10333]: match_string: relay_domains ~? relay_domains

postfix/smtpd[10333]: connect to subsystem private/proxymap

postfix/smtpd[10333]: send attr request = open

postfix/smtpd[10333]: send attr table = mysql:/etc/postfix/mysql_relay_domains_maps.cf

postfix/smtpd[10333]: send attr flags = 64

postfix/smtpd[10333]: private/proxymap socket: wanted attribute: status

postfix/smtpd[10333]: input attribute name: status

postfix/smtpd[10333]: input attribute value: 0

postfix/smtpd[10333]: private/proxymap socket: wanted attribute: flags

postfix/smtpd[10333]: input attribute name: flags

postfix/smtpd[10333]: input attribute value: 80

postfix/smtpd[10333]: private/proxymap socket: wanted attribute: (list terminator)

postfix/smtpd[10333]: input attribute name: (end)

postfix/smtpd[10333]: dict_proxy_open: connect to map=mysql:/etc/postfix/mysql_relay_domains_maps.cf status=0 server_flags=0120

postfix/smtpd[10333]: dict_open: proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf

postfix/smtpd[10333]: match_string: permit_mx_backup_networks ~? debug_peer_list

postfix/smtpd[10333]: match_string: permit_mx_backup_networks ~? fast_flush_domains

postfix/smtpd[10333]: match_string: permit_mx_backup_networks ~? mynetworks

postfix/smtpd[10333]: match_string: permit_mx_backup_networks ~? permit_mx_backup_networks

postfix/smtpd[10333]: maps_append: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

postfix/smtpd[10333]: mysqlname_parse(): set username to 'postfixadmin'

postfix/smtpd[10333]: mysqlname_parse(): set password to 'postfixadmin'

postfix/smtpd[10333]: mysqlname_parse(): set database name to 'postfix'

postfix/smtpd[10333]: mysqlname_parse(): set table name to 'mailbox'

postfix/smtpd[10333]: mysqlname_parse(): set select_field to 'maildir'

postfix/smtpd[10333]: mysqlname_parse(): set where_field to 'username'

postfix/smtpd[10333]: mysqlname_parse(): set additional_conditions to ''

postfix/smtpd[10333]: mysqlname_parse(): adding host 'localhost' to list of mysql server hosts

postfix/smtpd[10333]: dict_open: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

postfix/smtpd[10333]: maps_append: mysql:/etc/postfix/mysql_virtual_alias_maps.cf

postfix/smtpd[10333]: mysqlname_parse(): set username to 'postfixadmin'

postfix/smtpd[10333]: mysqlname_parse(): set password to 'postfixadmin'

postfix/smtpd[10333]: mysqlname_parse(): set database name to 'postfix'

postfix/smtpd[10333]: mysqlname_parse(): set table name to 'alias'

postfix/smtpd[10333]: mysqlname_parse(): set select_field to 'goto'

postfix/smtpd[10333]: mysqlname_parse(): set where_field to 'address'

postfix/smtpd[10333]: mysqlname_parse(): set additional_conditions to ''

postfix/smtpd[10333]: mysqlname_parse(): adding host 'localhost' to list of mysql server hosts

postfix/smtpd[10333]: dict_open: mysql:/etc/postfix/mysql_virtual_alias_maps.cf

postfix/smtpd[10333]: maps_append: mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? debug_peer_list

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? fast_flush_domains

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? mynetworks

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? permit_mx_backup_networks

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? qmqpd_authorized_clients

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? relay_domains

postfix/smtpd[10333]: match_string: smtpd_access_maps ~? smtpd_access_maps

postfix/smtpd[10333]: watchdog_create: 0x10068268 18000

postfix/smtpd[10333]: watchdog_stop: 0x10068268

postfix/smtpd[10333]: watchdog_start: 0x10068268

postfix/smtpd[10333]: connection established

postfix/smtpd[10333]: master_notify: status 0

postfix/smtpd[10333]: name_mask: resource

postfix/smtpd[10333]: name_mask: software

postfix/smtpd[10333]: connect from localhost[127.0.0.1]

postfix/smtpd[10333]: > localhost[127.0.0.1]: 220 mail.unimax.hk ESMTP Postfix

postfix/smtpd[10333]: watchdog_pat: 0x10068268

postfix/smtpd[10333]: < localhost[127.0.0.1]: EHLO localhost

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-mail.unimax.hk

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-PIPELINING

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-SIZE 10240000

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-VRFY

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-ETRN

postfix/smtpd[10333]: match_hostname: localhost ~? 192.168.1.0/24

postfix/smtpd[10333]: match_hostaddr: 127.0.0.1 ~? 192.168.1.0/24

postfix/smtpd[10333]: match_hostname: localhost ~? 127.0.0.0/8

postfix/smtpd[10333]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250-XVERP

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250 8BITMIME

postfix/smtpd[10333]: watchdog_pat: 0x10068268

postfix/smtpd[10333]: < localhost[127.0.0.1]: MAIL FROM:<postmaster@unimax.hk>

postfix/smtpd[10333]: extract_addr: input: <postmaster@unimax.hk>

postfix/smtpd[10333]: extract_addr: result: postmaster@unimax.hk

postfix/smtpd[10333]: fsspace: .: block size 4096, blocks free 260438

postfix/smtpd[10333]: smtpd_check_size: blocks 4096 avail 260438 min_free 0 size 0

postfix/smtpd[10333]: connect to subsystem public/cleanup

postfix/smtpd[10333]: public/cleanup socket: wanted attribute: queue_id

postfix/smtpd[10333]: input attribute name: queue_id

postfix/smtpd[10333]: input attribute value: 23EEF11DE8

postfix/smtpd[10333]: public/cleanup socket: wanted attribute: (list terminator)

postfix/smtpd[10333]: input attribute name: (end)

postfix/smtpd[10333]: send attr flags = 2

postfix/smtpd[10333]: 23EEF11DE8: client=localhost[127.0.0.1]

postfix/smtpd[10333]: > localhost[127.0.0.1]: 250 Ok

postfix/smtpd[10333]: watchdog_pat: 0x10068268

postfix/smtpd[10333]: < localhost[127.0.0.1]: RCPT TO:<test@unimax.hk>

postfix/smtpd[10333]: extract_addr: input: <test@unimax.hk>

postfix/smtpd[10333]: extract_addr: result: test@unimax.hk

postfix/smtpd[10333]: generic_checks: START

postfix/smtpd[10333]: generic_checks: name=permit_mynetworks

postfix/smtpd[10333]: permit_mynetworks: localhost 127.0.0.1

postfix/smtpd[10333]: match_hostname: localhost ~? 192.168.1.0/24

postfix/smtpd[10333]: match_hostaddr: 127.0.0.1 ~? 192.168.1.0/24

postfix/smtpd[10333]: match_hostname: localhost ~? 127.0.0.0/8

postfix/smtpd[10333]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8

postfix/smtpd[10333]: generic_checks: name=permit_mynetworks status=1

postfix/smtpd[10333]: connect to subsystem private/rewrite

postfix/smtpd[10333]: send attr request = rewrite

postfix/smtpd[10333]: send attr rule = canonicalize

postfix/smtpd[10333]: send attr address = test@unimax.hk

postfix/smtpd[10333]: private/rewrite socket: wanted attribute: address

postfix/smtpd[9959]: rewrite stream disconnect

postfix/smtpd[9959]: connect to subsystem private/rewrite

postfix/smtpd[9959]: send attr request = resolve

postfix/smtpd[9959]: send attr address = test1@unimax.hk

postfix/smtpd[9959]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10121]: rewrite stream disconnect

postfix/smtpd[10121]: connect to subsystem private/rewrite

postfix/smtpd[10121]: send attr request = resolve

postfix/smtpd[10121]: send attr address = test@unimax.hk

postfix/smtpd[10121]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10123]: rewrite stream disconnect

postfix/smtpd[10123]: connect to subsystem private/rewrite

postfix/smtpd[10123]: send attr request = resolve

postfix/smtpd[10123]: send attr address = test@unimax.hk

postfix/smtpd[10123]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9968]: rewrite stream disconnect

postfix/smtpd[9968]: connect to subsystem private/rewrite

postfix/smtpd[9968]: send attr request = resolve

postfix/smtpd[9968]: send attr address = test@unimax.hk

postfix/smtpd[9968]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10196]: rewrite stream disconnect

postfix/smtpd[10196]: connect to subsystem private/rewrite

postfix/smtpd[10196]: send attr request = resolve

postfix/smtpd[10196]: send attr address = test@unimax.hk

postfix/smtpd[10196]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9958]: rewrite stream disconnect

postfix/smtpd[9958]: connect to subsystem private/rewrite

postfix/smtpd[9958]: send attr request = resolve

postfix/smtpd[9958]: send attr address = test@unimax.hk

postfix/smtpd[9958]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9961]: rewrite stream disconnect

postfix/smtpd[9961]: connect to subsystem private/rewrite

postfix/smtpd[9961]: send attr request = resolve

postfix/smtpd[9961]: send attr address = test@unimax.hk

postfix/smtpd[9961]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9964]: rewrite stream disconnect

postfix/smtpd[9964]: connect to subsystem private/rewrite

postfix/smtpd[9964]: send attr request = resolve

postfix/smtpd[9964]: send attr address = test@unimax.hk

postfix/smtpd[9964]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10032]: rewrite stream disconnect

postfix/smtpd[10032]: connect to subsystem private/rewrite

postfix/smtpd[10032]: send attr request = resolve

postfix/smtpd[10032]: send attr address = steuria@unimax.hk

postfix/smtpd[10032]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9962]: rewrite stream disconnect

postfix/smtpd[9962]: connect to subsystem private/rewrite

postfix/smtpd[9962]: send attr request = resolve

postfix/smtpd[9962]: send attr address = test1@unimax.hk

postfix/smtpd[9962]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9954]: rewrite stream disconnect

postfix/smtpd[9954]: connect to subsystem private/rewrite

postfix/smtpd[9954]: send attr request = resolve

postfix/smtpd[9954]: send attr address = test@unimax.hk

postfix/smtpd[9954]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9963]: rewrite stream disconnect

postfix/smtpd[9963]: connect to subsystem private/rewrite

postfix/smtpd[9963]: send attr request = resolve

postfix/smtpd[9963]: send attr address = test@unimax.hk

postfix/smtpd[9963]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10333]: input attribute name: address

postfix/smtpd[10333]: input attribute value: test@unimax.hk

postfix/smtpd[10333]: private/rewrite socket: wanted attribute: (list terminator)

postfix/smtpd[10333]: input attribute name: (end)

postfix/smtpd[10333]: rewrite_clnt: canonicalize: test@unimax.hk -> test@unimax.hk

postfix/smtpd[10333]: send attr request = resolve

postfix/smtpd[10333]: send attr address = test@unimax.hk

postfix/smtpd[10333]: private/rewrite socket: wanted attribute: transport

postfix/trivial-rewrite[10340]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10340]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10341]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10341]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10342]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10342]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10344]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10344]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10345]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10345]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10346]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10346]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10343]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10343]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10340 exit status 1

postfix/smtpd[10333]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9959]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10121]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10333]: warning: resolve_clnt_query: bad read: Success

postfix/smtpd[9959]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10121]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10341 exit status 1

postfix/master[8539]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling

postfix/smtpd[10123]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9968]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10123]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9968]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10342 exit status 1

postfix/smtpd[10196]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9958]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10196]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9958]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10344 exit status 1

postfix/smtpd[9964]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10032]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9964]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10032]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10345 exit status 1

postfix/smtpd[9962]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9954]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9962]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9954]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10346 exit status 1

postfix/smtpd[9963]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9963]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/qmgr[10309]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9961]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10343 exit status 1

postfix/qmgr[10309]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9961]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10333]: rewrite stream disconnect

postfix/smtpd[10333]: connect to subsystem private/rewrite

postfix/smtpd[10333]: send attr request = resolve

postfix/smtpd[10333]: send attr address = test@unimax.hk

postfix/smtpd[10333]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10121]: rewrite stream disconnect

postfix/smtpd[10121]: connect to subsystem private/rewrite

postfix/smtpd[10121]: send attr request = resolve

postfix/smtpd[10121]: send attr address = test@unimax.hk

postfix/smtpd[10121]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9959]: rewrite stream disconnect

postfix/smtpd[9959]: connect to subsystem private/rewrite

postfix/smtpd[9959]: send attr request = resolve

postfix/smtpd[9959]: send attr address = test1@unimax.hk

postfix/smtpd[9959]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10123]: rewrite stream disconnect

postfix/smtpd[10123]: connect to subsystem private/rewrite

postfix/smtpd[10123]: send attr request = resolve

postfix/smtpd[10123]: send attr address = test@unimax.hk

postfix/smtpd[10123]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9968]: rewrite stream disconnect

postfix/smtpd[9968]: connect to subsystem private/rewrite

postfix/smtpd[9968]: send attr request = resolve

postfix/smtpd[9968]: send attr address = test@unimax.hk

postfix/smtpd[9968]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10196]: rewrite stream disconnect

postfix/smtpd[10196]: connect to subsystem private/rewrite

postfix/smtpd[10196]: send attr request = resolve

postfix/smtpd[10196]: send attr address = test@unimax.hk

postfix/smtpd[10196]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9958]: rewrite stream disconnect

postfix/smtpd[9958]: connect to subsystem private/rewrite

postfix/smtpd[9958]: send attr request = resolve

postfix/smtpd[9958]: send attr address = test@unimax.hk

postfix/smtpd[9958]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9964]: rewrite stream disconnect

postfix/smtpd[9964]: connect to subsystem private/rewrite

postfix/smtpd[9964]: send attr request = resolve

postfix/smtpd[9964]: send attr address = test@unimax.hk

postfix/smtpd[9964]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10032]: rewrite stream disconnect

postfix/smtpd[10032]: connect to subsystem private/rewrite

postfix/smtpd[10032]: send attr request = resolve

postfix/smtpd[10032]: send attr address = steuria@unimax.hk

postfix/smtpd[10032]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9962]: rewrite stream disconnect

postfix/smtpd[9962]: connect to subsystem private/rewrite

postfix/smtpd[9962]: send attr request = resolve

postfix/smtpd[9962]: send attr address = test1@unimax.hk

postfix/smtpd[9962]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9954]: rewrite stream disconnect

postfix/smtpd[9954]: connect to subsystem private/rewrite

postfix/smtpd[9954]: send attr request = resolve

postfix/smtpd[9954]: send attr address = test@unimax.hk

postfix/smtpd[9954]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9963]: rewrite stream disconnect

postfix/smtpd[9963]: connect to subsystem private/rewrite

postfix/smtpd[9963]: send attr request = resolve

postfix/smtpd[9963]: send attr address = test@unimax.hk

postfix/smtpd[9963]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9961]: rewrite stream disconnect

postfix/smtpd[9961]: connect to subsystem private/rewrite

postfix/smtpd[9961]: send attr request = resolve

postfix/smtpd[9961]: send attr address = test@unimax.hk

postfix/smtpd[9961]: private/rewrite socket: wanted attribute: transport

postfix/trivial-rewrite[10354]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10354]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10356]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10356]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10355]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10355]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10358]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10358]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10359]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10359]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10360]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10360]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/trivial-rewrite[10357]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

postfix/trivial-rewrite[10357]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf: table lookup problem

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10354 exit status 1

postfix/master[8539]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling

postfix/smtpd[9959]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10333]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10333]: warning: resolve_clnt_query: bad read: Success

postfix/smtpd[9959]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10356 exit status 1

postfix/smtpd[9968]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10196]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9968]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10196]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10355 exit status 1

postfix/smtpd[10121]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10123]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10121]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10123]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10358 exit status 1

postfix/smtpd[10032]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9962]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[10032]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9962]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10359 exit status 1

postfix/smtpd[9954]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9963]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9954]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9963]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10360 exit status 1

postfix/qmgr[10309]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9961]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/qmgr[10309]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9961]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9958]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/smtpd[9964]: warning: premature end-of-input on private/rewrite socket while reading input attribute name

postfix/master[8539]: warning: process /usr/lib/postfix/trivial-rewrite pid 10357 exit status 1

postfix/smtpd[9958]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[9964]: warning: resolve_clnt_query: bad read: Connection reset by peer

postfix/smtpd[10333]: rewrite stream disconnect

postfix/smtpd[10333]: connect to subsystem private/rewrite

postfix/smtpd[10333]: send attr request = resolve

postfix/smtpd[10333]: send attr address = test@unimax.hk

postfix/smtpd[10333]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9959]: rewrite stream disconnect

postfix/smtpd[9959]: connect to subsystem private/rewrite

postfix/smtpd[9959]: send attr request = resolve

postfix/smtpd[9959]: send attr address = test1@unimax.hk

postfix/smtpd[9959]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9968]: rewrite stream disconnect

postfix/smtpd[9968]: connect to subsystem private/rewrite

postfix/smtpd[9968]: send attr request = resolve

postfix/smtpd[9968]: send attr address = test@unimax.hk

postfix/smtpd[9968]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10196]: rewrite stream disconnect

postfix/smtpd[10196]: connect to subsystem private/rewrite

postfix/smtpd[10196]: send attr request = resolve

postfix/smtpd[10196]: send attr address = test@unimax.hk

postfix/smtpd[10196]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10121]: rewrite stream disconnect

postfix/smtpd[10121]: connect to subsystem private/rewrite

postfix/smtpd[10121]: send attr request = resolve

postfix/smtpd[10123]: rewrite stream disconnect

postfix/smtpd[10123]: connect to subsystem private/rewrite

postfix/smtpd[10123]: send attr request = resolve

postfix/smtpd[10123]: send attr address = test@unimax.hk

postfix/smtpd[10123]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10121]: send attr address = test@unimax.hk

postfix/smtpd[10121]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[10032]: rewrite stream disconnect

postfix/smtpd[10032]: connect to subsystem private/rewrite

postfix/smtpd[10032]: send attr request = resolve

postfix/smtpd[10032]: send attr address = steuria@unimax.hk

postfix/smtpd[10032]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9962]: rewrite stream disconnect

postfix/smtpd[9962]: connect to subsystem private/rewrite

postfix/smtpd[9962]: send attr request = resolve

postfix/smtpd[9962]: send attr address = test1@unimax.hk

postfix/smtpd[9962]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9954]: rewrite stream disconnect

postfix/smtpd[9954]: connect to subsystem private/rewrite

postfix/smtpd[9954]: send attr request = resolve

postfix/smtpd[9954]: send attr address = test@unimax.hk

postfix/smtpd[9954]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9963]: rewrite stream disconnect

postfix/smtpd[9963]: connect to subsystem private/rewrite

postfix/smtpd[9963]: send attr request = resolve

postfix/smtpd[9963]: send attr address = test@unimax.hk

postfix/smtpd[9963]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9961]: rewrite stream disconnect

postfix/smtpd[9961]: connect to subsystem private/rewrite

postfix/smtpd[9961]: send attr request = resolve

postfix/smtpd[9961]: send attr address = test@unimax.hk

postfix/smtpd[9961]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9958]: rewrite stream disconnect

postfix/smtpd[9958]: connect to subsystem private/rewrite

postfix/smtpd[9958]: send attr request = resolve

postfix/smtpd[9958]: send attr address = test@unimax.hk

postfix/smtpd[9958]: private/rewrite socket: wanted attribute: transport

postfix/smtpd[9964]: rewrite stream disconnect

postfix/smtpd[9964]: connect to subsystem private/rewrite

postfix/smtpd[9964]: send attr request = resolve

postfix/smtpd[9964]: send attr address = test@unimax.hk

postfix/smtpd[9964]: private/rewrite socket: wanted attribute: transport

And here's my postconf -n

```

alias_database = hash:/etc/postfix/aliases

alias_maps = $virtual_alias_maps

biff = no

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/lib/postfix

debug_peer_level = 2

default_destination_concurrency_limit = 10

home_mailbox = .maildir/

local_destination_concurrency_limit = 2

local_recipient_maps = $virtual_mailbox_maps

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain, $transport_maps

myhostname = mail.local.net

mynetworks = 192.168.1.0/24, 127.0.0.0/8

myorigin = $mydomain

newaliases_path = /usr/bin/newaliases

readme_directory = /usr/share/doc/postfix-2.0.11

relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf

sample_directory = /etc/postfix/sample

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

smtpd_banner = $myhostname ESMTP $mail_name

unknown_local_recipient_reject_code = 450

virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

virtual_gid_maps = static:1003

virtual_mailbox_base = /home/vmail

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf

virtual_mailbox_limit = 51200000

virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_minimum_uid = 1000

virtual_transport = virtual

virtual_uid_maps = static:1003

```

Is my main.cf correct?  What is causing the errors?

Edited:  Changed fonts and layout to make post more readable.

----------

## svyatogor

Dunno if this helps, but you might want to read this doc: 

http://www.gentoo.org/doc/en/virt-mail-howto.xml

----------

## kashani

I guess mysql isn't running or your username/password is incorrect, judging from your logs. All those "cant' connect to Mysql" errors can't be good.

kashani

----------

## SnEptUne

My password is correct and I have followed that virtual email guide like ten times already.

----------

## Adamal

have you tried connecting to mysql.  It looks like your mysql server may be down.

----------

## SnEptUne

Nope.  Mysql is running fine.  I could log into mysql and run query.  Guess what, I just changed the hosts from localhost to 127.0.0.1 in my various mysql_*.cf and it works now.  Could someone explain why?  I have localhost mapped to 127.0.0.1 in /etc/hosts and the inside the chroot jail already.

----------

