# Postfix and virutal mail does not work :S [SOLVED]

## useche

hi,

I recently install a Postfix server with virtual users and domains following the gentoo guide http://www.gentoo.org/doc/en/virt-mail-howto.xml. I have that the local users or "real users" works fine. However, when i try with virtual users i receive a delivery message telling me "<luis@postgrado.usb.ve>: unknown user: "luis"". I read the logs and all seems fine. I paste the log and main.cf anyway:

```

--log--

Apr 12 20:55:27 [postfix/smtpd] name_mask: subnet

Apr 12 20:55:27 [postfix/smtpd] inet_addr_local: configured 2 IPv4 addresses

Apr 12 20:55:27 [postfix/smtpd] warning: inet_addr_local[procnet_ifinet6]: Couldn't open /proc/net/if_inet6 for reading: No such file or directory

Apr 12 20:55:27 [postfix/smtpd] inet_addr_local: configured 0 IPv6 addresses

Apr 12 20:55:27 [postfix/smtpd] mynetworks: 127.0.0.0/8 159.90.36.0/23

Apr 12 20:55:27 [postfix/smtpd] match_string: mynetworks ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: mynetworks ~? fast_flush_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: mynetworks ~? mynetworks

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? fast_flush_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? mynetworks

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? permit_mx_backup_networks

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? qmqpd_authorized_clients

Apr 12 20:55:27 [postfix/smtpd] match_string: relay_domains ~? relay_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: permit_mx_backup_networks ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: permit_mx_backup_networks ~? fast_flush_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: permit_mx_backup_networks ~? mynetworks

Apr 12 20:55:27 [postfix/smtpd] match_string: permit_mx_backup_networks ~? permit_mx_backup_networks

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: user = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: password = password

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: dbname = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: table = alias

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: select_field = destination

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: where_field = alias

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: additional_conditions =

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-aliases.cf: hosts = unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] mysqlname_parse: /etc/postfix/mysql-aliases.cf: adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr 12 20:55:27 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-aliases.cf

Apr 12 20:55:27 [postfix/smtpd] dict_open: hash:/etc/mail/aliases

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: user = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: password = password

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: dbname = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: table = users

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: select_field = maildir

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: where_field = email

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: additional_conditions = and postfix = 'y'

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual-maps.cf: hosts = unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] mysqlname_parse: /etc/postfix/mysql-virtual-maps.cf: adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr 12 20:55:27 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr 12 20:55:27 [postfix/smtpd] dict_open: unix:passwd.byname

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: user = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: password = password

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: dbname = mailsql

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: table = virtual

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: select_field = destination

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: where_field = email

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: additional_conditions =

Apr 12 20:55:27 [postfix/smtpd] cfg_get_str: /etc/postfix/mysql-virtual.cf: hosts = unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] mysqlname_parse: /etc/postfix/mysql-virtual.cf: adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr 12 20:55:27 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-virtual.cf

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? fast_flush_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? mynetworks

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? permit_mx_backup_networks

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? qmqpd_authorized_clients

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? relay_domains

Apr 12 20:55:27 [postfix/smtpd] match_string: smtpd_access_maps ~? smtpd_access_maps

Apr 12 20:55:27 [postfix/smtpd] match_string: debug_peer_list ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: fast_flush_domains ~? debug_peer_list

Apr 12 20:55:27 [postfix/smtpd] match_string: fast_flush_domains ~? fast_flush_domains

Apr 12 20:55:27 [postfix/smtpd] watchdog_create: 0x80a42d0 18000

Apr 12 20:55:27 [postfix/smtpd] watchdog_stop: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] watchdog_start: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] connection established

Apr 12 20:55:27 [postfix/smtpd] master_notify: status 0

Apr 12 20:55:27 [postfix/smtpd] name_mask: resource

Apr 12 20:55:27 [postfix/smtpd] name_mask: software

Apr 12 20:55:27 [postfix/smtpd] connect from mail.gia.usb.ve[159.90.8.132]

Apr 12 20:55:27 [postfix/smtpd] match_list_match: mail.gia.usb.ve: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: 159.90.8.132: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: mail.gia.usb.ve: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: 159.90.8.132: no match

Apr 12 20:55:27 [postfix/smtpd] match_hostname: mail.gia.usb.ve ~? postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] match_hostaddr: 159.90.8.132 ~? postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] warning: std_addr_pattern: invalid address pattern "postgrado.usb.ve"

Apr 12 20:55:27 [postfix/smtpd] match_list_match: mail.gia.usb.ve: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: 159.90.8.132: no match

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 220 www.postgrado.usb.ve ESMTP Postfix

Apr 12 20:55:27 [postfix/smtpd] watchdog_pat: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] < mail.gia.usb.ve[159.90.8.132]: EHLO mail.gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250-www.postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250-PIPELINING

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250-SIZE 10240000

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250-VRFY

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250-ETRN

Apr 12 20:55:27 [postfix/smtpd] match_list_match: mail.gia.usb.ve: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: 159.90.8.132: no match

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250 8BITMIME

Apr 12 20:55:27 [postfix/smtpd] watchdog_pat: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] < mail.gia.usb.ve[159.90.8.132]: MAIL FROM:<luis@gia.usb.ve> SIZE=630

Apr 12 20:55:27 [postfix/smtpd] extract_addr: input: <luis@gia.usb.ve>

Apr 12 20:55:27 [postfix/smtpd] smtpd_check_addr: addr=luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] connect to subsystem private/rewrite

Apr 12 20:55:27 [postfix/smtpd] send attr request = rewrite

Apr 12 20:55:27 [postfix/smtpd] send attr rule = canonicalize

Apr 12 20:55:27 [postfix/smtpd] send attr address = luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: address

Apr 12 20:55:27 [postfix/smtpd] input attribute name: address

Apr 12 20:55:27 [postfix/smtpd] input attribute value: luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] rewrite_clnt: canonicalize: luis@gia.usb.ve -> luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] send attr request = resolve

Apr 12 20:55:27 [postfix/smtpd] send attr address = luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: transport

Apr 12 20:55:27 [postfix/smtpd] input attribute name: transport

Apr 12 20:55:27 [postfix/smtpd] input attribute value: smtp

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: nexthop

Apr 12 20:55:27 [postfix/smtpd] input attribute name: nexthop

Apr 12 20:55:27 [postfix/smtpd] input attribute value: gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: recipient

Apr 12 20:55:27 [postfix/smtpd] input attribute name: recipient

Apr 12 20:55:27 [postfix/smtpd] input attribute value: luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: flags

Apr 12 20:55:27 [postfix/smtpd] input attribute name: flags

Apr 12 20:55:27 [postfix/smtpd] input attribute value: 4096

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] resolve_clnt: `luis@gia.usb.ve' -> transp=`smtp' host=`gia.usb.ve' rcpt=`luis@gia.usb.ve' flags= class=default

Apr 12 20:55:27 [postfix/smtpd] ctable_locate: install entry key luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] extract_addr: result: luis@gia.usb.ve

Apr 12 20:55:27 [postfix/smtpd] fsspace: .: block size 4096, blocks free 2937942

Apr 12 20:55:27 [postfix/smtpd] smtpd_check_size: blocks 4096 avail 2937942 min_free 0 msg_size_limit 10240000

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250 Ok

Apr 12 20:55:27 [postfix/smtpd] watchdog_pat: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] < mail.gia.usb.ve[159.90.8.132]: RCPT TO:<luis@postgrado.usb.ve>

Apr 12 20:55:27 [postfix/smtpd] extract_addr: input: <luis@postgrado.usb.ve>

Apr 12 20:55:27 [postfix/smtpd] smtpd_check_addr: addr=luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] send attr request = rewrite

Apr 12 20:55:27 [postfix/smtpd] send attr rule = canonicalize

Apr 12 20:55:27 [postfix/smtpd] send attr address = luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: address

Apr 12 20:55:27 [postfix/smtpd] input attribute name: address

Apr 12 20:55:27 [postfix/smtpd] input attribute value: luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] rewrite_clnt: canonicalize: luis@postgrado.usb.ve -> luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] send attr request = resolve

Apr 12 20:55:27 [postfix/smtpd] send attr address = luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: transport

Apr 12 20:55:27 [postfix/smtpd] input attribute name: transport

Apr 12 20:55:27 [postfix/smtpd] input attribute value: local

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: nexthop

Apr 12 20:55:27 [postfix/smtpd] input attribute name: nexthop

Apr 12 20:55:27 [postfix/smtpd] input attribute value: postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: recipient

Apr 12 20:55:27 [postfix/smtpd] input attribute name: recipient

Apr 12 20:55:27 [postfix/smtpd] input attribute value: luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: flags

Apr 12 20:55:27 [postfix/smtpd] input attribute name: flags

Apr 12 20:55:27 [postfix/smtpd] input attribute value: 256

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] resolve_clnt: `luis@postgrado.usb.ve' -> transp=`local' host=`postgrado.usb.ve' rcpt=`luis@postgrado.usb.ve' flags= class=local

Apr 12 20:55:27 [postfix/smtpd] ctable_locate: install entry key luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] extract_addr: result: luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] send attr request = rewrite

Apr 12 20:55:27 [postfix/smtpd] send attr rule = canonicalize

Apr 12 20:55:27 [postfix/smtpd] send attr address = postmaster

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: address

Apr 12 20:55:27 [postfix/smtpd] input attribute name: address

Apr 12 20:55:27 [postfix/smtpd] input attribute value: postmaster@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] rewrite_clnt: canonicalize: postmaster -> postmaster@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] >>> START Recipient address RESTRICTIONS <<<

Apr 12 20:55:27 [postfix/smtpd] generic_checks: name=permit_mynetworks

Apr 12 20:55:27 [postfix/smtpd] permit_mynetworks: mail.gia.usb.ve 159.90.8.132

Apr 12 20:55:27 [postfix/smtpd] match_hostname: mail.gia.usb.ve ~? 127.0.0.0/8

Apr 12 20:55:27 [postfix/smtpd] match_hostaddr: 159.90.8.132 ~? 127.0.0.0/8

Apr 12 20:55:27 [postfix/smtpd] match_hostname: mail.gia.usb.ve ~? 159.90.36.0/23

Apr 12 20:55:27 [postfix/smtpd] match_hostaddr: 159.90.8.132 ~? 159.90.36.0/23

Apr 12 20:55:27 [postfix/smtpd] match_list_match: mail.gia.usb.ve: no match

Apr 12 20:55:27 [postfix/smtpd] match_list_match: 159.90.8.132: no match

Apr 12 20:55:27 [postfix/smtpd] generic_checks: name=permit_mynetworks status=0

Apr 12 20:55:27 [postfix/smtpd] generic_checks: name=reject_unauth_destination

Apr 12 20:55:27 [postfix/smtpd] reject_unauth_destination: luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] permit_auth_destination: luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] ctable_locate: leave existing entry key luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] generic_checks: name=reject_unauth_destination status=0

Apr 12 20:55:27 [postfix/smtpd] >>> END Recipient address RESTRICTIONS <<<

Apr 12 20:55:27 [postfix/smtpd] >>> CHECKING RECIPIENT MAPS <<<

Apr 12 20:55:27 [postfix/smtpd] ctable_locate: leave existing entry key luis@postgrado.usb.ve

Apr 12 20:55:27 [postfix/smtpd] maps_find: recipient_canonical_maps: luis@postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] maps_find: recipient_canonical_maps: luis: not found

Apr 12 20:55:27 [postfix/smtpd] maps_find: recipient_canonical_maps: @postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] mail_addr_find: luis@postgrado.usb.ve -> (not found)

Apr 12 20:55:27 [postfix/smtpd] maps_find: canonical_maps: luis@postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] maps_find: canonical_maps: luis: not found

Apr 12 20:55:27 [postfix/smtpd] maps_find: canonical_maps: @postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] mail_addr_find: luis@postgrado.usb.ve -> (not found)

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = 'luis@postgrado.usb.ve'

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_get_active: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows

Apr 12 20:55:27 [postfix/smtpd] maps_find: virtual_alias_maps: luis@postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = 'luis'

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_get_active: found active connection to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows

Apr 12 20:55:27 [postfix/smtpd] maps_find: virtual_alias_maps: luis: not found

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = '@postgrado.usb.ve'

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_get_active: found active connection to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows

Apr 12 20:55:27 [postfix/smtpd] maps_find: virtual_alias_maps: @postgrado.usb.ve: not found

Apr 12 20:55:27 [postfix/smtpd] mail_addr_find: luis@postgrado.usb.ve -> (not found)

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from alias where alias = 'luis@postgrado.usb.ve'

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_get_active: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup using sql query: select maildir from users where email = 'luis@postgrado.usb.ve' and postfix = 'y'

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_get_active: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr 12 20:55:27 [postfix/smtpd] dict_mysql_lookup: retrieved 1 rows

Apr 12 20:55:27 [postfix/smtpd] maps_find: local_recipient_maps: mysql:/etc/postfix/mysql-virtual-maps.cf(0,100): luis@postgrado.usb.ve = /home/vmail/luis/Maildir/

Apr 12 20:55:27 [postfix/smtpd] mail_addr_find: luis@postgrado.usb.ve -> /home/vmail/luis/Maildir/

Apr 12 20:55:27 [postfix/smtpd] connect to subsystem public/cleanup

Apr 12 20:55:27 [postfix/smtpd] public/cleanup socket: wanted attribute: queue_id

Apr 12 20:55:27 [postfix/smtpd] input attribute name: queue_id

Apr 12 20:55:27 [postfix/smtpd] input attribute value: 900DD3C9DBE3

Apr 12 20:55:27 [postfix/smtpd] public/cleanup socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] send attr flags = 50

Apr 12 20:55:27 [postfix/smtpd] 900DD3C9DBE3: client=mail.gia.usb.ve[159.90.8.132]

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250 Ok

Apr 12 20:55:27 [postfix/smtpd] watchdog_pat: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] < mail.gia.usb.ve[159.90.8.132]: DATA

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 354 End data with <CR><LF>.<CR><LF>

Apr 12 20:55:27 [postfix/smtpd] public/cleanup socket: wanted attribute: status

Apr 12 20:55:27 [postfix/cleanup] 900DD3C9DBE3: message-id=<20050413045519.GB1240@paris.gia.usb.ve>

Apr 12 20:55:27 [postfix/qmgr] 900DD3C9DBE3: from=<luis@gia.usb.ve>, size=827, nrcpt=1 (queue active)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: status

Apr 12 20:55:27 [postfix/smtpd] input attribute value: 0

Apr 12 20:55:27 [postfix/smtpd] public/cleanup socket: wanted attribute: reason

Apr 12 20:55:27 [postfix/smtpd] input attribute name: reason

Apr 12 20:55:27 [postfix/smtpd] input attribute value: (end)

Apr 12 20:55:27 [postfix/smtpd] public/cleanup socket: wanted attribute: (list terminator)

Apr 12 20:55:27 [postfix/smtpd] input attribute name: (end)

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 250 Ok: queued as 900DD3C9DBE3

Apr 12 20:55:27 [postfix/smtpd] watchdog_pat: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] < mail.gia.usb.ve[159.90.8.132]: QUIT

Apr 12 20:55:27 [postfix/smtpd] > mail.gia.usb.ve[159.90.8.132]: 221 Bye

Apr 12 20:55:27 [postfix/smtpd] disconnect from mail.gia.usb.ve[159.90.8.132]

Apr 12 20:55:27 [postfix/smtpd] master_notify: status 1

Apr 12 20:55:27 [postfix/smtpd] connection closed

Apr 12 20:55:27 [postfix/smtpd] watchdog_stop: 0x80a42d0

Apr 12 20:55:27 [postfix/smtpd] watchdog_start: 0x80a42d0

Apr 12 20:55:27 [postfix/local] 900DD3C9DBE3: to=<luis@postgrado.usb.ve>, relay=local, delay=0, status=bounced (unknown user: "luis")

Apr 12 20:55:27 [postfix/cleanup] 9DC5D3C9DBE4: message-id=<20050413005527.9DC5D3C9DBE4@www.postgrado.usb.ve>

Apr 12 20:55:27 [postfix/qmgr] 9DC5D3C9DBE4: from=<>, size=2507, nrcpt=1 (queue active)

Apr 12 20:55:27 [postfix/qmgr] 900DD3C9DBE3: removed

Apr 12 20:55:27 [postfix/smtp] 9DC5D3C9DBE4: to=<luis@gia.usb.ve>, relay=mail.gia.usb.ve[159.90.8.132], delay=0, status=sent (250 Ok: queued as 43BC13EF31)

Apr 12 20:55:27 [postfix/qmgr] 9DC5D3C9DBE4: removed

```

```

--main.cf--

config_directory = /etc/postfix

#soft_bounce = no

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/lib/postfix

mail_owner = postfix

#default_privs = nobody

#myhostname = host.domain.tld

myhostname = www.postgrado.usb.ve

mydomain = postgrado.usb.ve

#myorigin = $myhostname

myorigin = $mydomain

inet_interfaces = all

#inet_interfaces = $myhostname

#inet_interfaces = $myhostname, localhost

#proxy_interfaces =

#proxy_interfaces = 1.2.3.4

#mydestination = $myhostname, localhost.$mydomain, $mydomain

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

#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,

#       mail.$mydomain, www.$mydomain, ftp.$mydomain

#local_recipient_maps = unix:passwd.byname $alias_maps

#local_recipient_maps = proxy:unix:passwd.byname $alias_maps

#local_recipient_maps =

unknown_local_recipient_reject_code = 550

#mynetworks_style = class

#mynetworks_style = subnet

#mynetworks_style = host

#mynetworks = 159.90.36.0/27, 127.0.0.0/8

#mynetworks = $config_directory/mynetworks

#mynetworks = hash:/etc/postfix/network_table

#relay_domains = $mydestination

#relayhost = $mydomain

#relayhost = [gateway.my.domain]

#relayhost = [mailserver.isp.tld]

#relayhost = uucphost

#relayhost = [an.ip.add.ress]

#relay_recipient_maps = hash:/etc/postfix/relay_recipients

#in_flow_delay = 1s

#alias_maps = dbm:/etc/aliases

#alias_maps = hash:/etc/aliases

#alias_maps = hash:/etc/aliases, nis:mail.aliases

#alias_maps = netinfo:/aliases

#alias_database = dbm:/etc/aliases

#alias_database = dbm:/etc/mail/aliases

#alias_database = hash:/etc/aliases

#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

#recipient_delimiter = +

#home_mailbox = Mailbox

home_mailbox = Maildir/

mail_spool_directory = /var/mail

#mail_spool_directory = /var/spool/mail

#mailbox_command = /some/where/procmail

#mailbox_command = /some/where/procmail -a "$EXTENSION"

#mailbox_transport = lmtp:unix:/file/name

#mailbox_transport = cyrus

#fallback_transport = lmtp:unix:/file/name

#fallback_transport = cyrus

#fallback_transport =

#luser_relay = $user@other.host

#luser_relay = $local@other.host

#luser_relay = admin+$local

#header_checks = regexp:/etc/postfix/header_checks

#fast_flush_domains = $relay_domains

smtpd_banner = $myhostname ESMTP $mail_name

#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

local_destination_concurrency_limit = 2

default_destination_concurrency_limit = 20

debug_peer_level = 5

#debug_peer_list = 127.0.0.1

debug_peer_list = postgrado.usb.ve

#debugger_command =

#        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

#        xxgdb $daemon_directory/$process_name $process_id & sleep 5

debugger_command =

        PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;

        echo where) | gdb $daemon_directory/$process_name $process_id 2>&1

        >$config_directory/$process_name.$process_id.log & sleep 5

sendmail_path = /usr/sbin/sendmail

newaliases_path = /usr/bin/newaliases

mailq_path = /usr/bin/mailq

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /etc/postfix

readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme

alias_database = hash:/etc/mail/aliases

#alias_maps = hash:/etc/mail/aliases, nis:mail.aliases

# smtpd_sasl_auth_enable = yes

# smtpd_sasl2_auth_enable = yes

# smtpd_sasl_security_options = noanonymous

# broken_sasl_auth_clients = yes

# smtpd_sasl_local_domain =

# smtpd_recipient_restrictions =

#         permit_sasl_authenticated,

#         permit_mynetworks,

#         reject_unauth_destination

# smtpd_use_tls = yes

# #smtpd_tls_auth_only = yes

# smtpd_tls_key_file = /etc/postfix/newreq.pem

# smtpd_tls_cert_file = /etc/postfix/newcert.pem

# smtpd_tls_CAfile = /etc/postfix/cacert.pem

# smtpd_tls_loglevel = 3

# smtpd_tls_received_header = yes

# smtpd_tls_session_cache_timeout = 3600s

# tls_random_source = dev:/dev/urandom

alias_maps = mysql:/etc/postfix/mysql-aliases.cf,

             hash:/etc/mail/aliases

relocated_maps = mysql:/etc/postfix/mysql-relocated.cf

local_transport = local

local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname

virtual_transport = virtual

virtual_mailbox_domains =

virtual_minimum_uid = 1000

virtual_gid_maps = static:100

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

virtual_uid_maps = static:1000

virtual_mailbox_base = /

#virtual_mailbox_limit =

```

----------

## Z?

I'm hoping this is a typo, but shouldn't:

```
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
```

...have stuff separated by commas?

In other words, it should be this:

```
local_recipient_maps = $alias_maps, $virtual_mailbox_maps, unix:passwd.byname
```

(I doubt that's the problem, but I've seen stranger things...)

----------

## useche

That was an error. However the server keep throwing the error

----------

## Z?

Code Listing 10.10 of the document you linked to indicates that there should be a value for "virtual_mailbox_domains". The way it's listed, though, the list of domains starts on the following line, which I don't think Postfix will like - and, at a guess, you did the same thing: your virtual_mailbox_domains setting is set to ""... maybe that's the problem? It can't figure out what domains to accept mail for?

----------

## pixelid

I have the same problem with postfix. But in my case I can't even run mysql from the command line. My phpgroupware cannot find the database. Gentoo load mysql at boot time but webmin see it offline. ps -aux | grep mysql show that mysql is running but I cannot access the socket. I emerge mysql and I am still having the problem. Any idea.Last edited by pixelid on Wed Apr 13, 2005 2:29 pm; edited 1 time in total

----------

## Z?

pixelid: Even though your question is a totally separate topic, you might want to have a look at /etc/mysql/my.cnf. More specifically:

```
bind-address = 127.0.0.1
```

(which limits connections to the loopback interface)

...and...

```
skip-networking
```

(which completely eliminates any network connections...)

What you want to do is make sure that these are both commented out - but only if you understand the implications of removing these security features...

----------

## useche

Ok, I solved my problem  :Very Happy:  . I comment "mydestination" variable and puff works. This because you cannot set the same domain in mydestination and virtual_mailbox_domains.

Thanks for the help and bye

note: anyquestion send me a mail

----------

