Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
postfix/mysql/pam not working together
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
metalgeek
n00b
n00b


Joined: 21 Oct 2002
Posts: 13

PostPosted: Mon Feb 24, 2003 12:01 am    Post subject: postfix/mysql/pam not working together Reply with quote

I'm having problems getting my postfix and mysql/pam working together.
It keeps giving me
User unknown in local recipient table
for my local domain name
and
User unknown in virtual mailbox table
for virtual users.
it appears that postfix can log into mysql just fine, as m mysql log shows it doing queries.
it just doesn't seem to be matching the names.
I followed the instructions on this page:
http://www.gentoo.org/doc/en/virt-mail-howto.xml
can anyone help me?
Back to top
View user's profile Send private message
vicay
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2002
Posts: 97
Location: Dresden, Germany

PostPosted: Mon Feb 24, 2003 7:46 am    Post subject: Reply with quote

Hello,


maybe you could show us some logs, your postfix-mysql
query configs and your database-structure?

thanks in advance

vicay
Back to top
View user's profile Send private message
metalgeek
n00b
n00b


Joined: 21 Oct 2002
Posts: 13

PostPosted: Tue Feb 25, 2003 1:10 am    Post subject: Reply with quote

ok heres what my mail log gives.

Code:

Feb 24 18:02:25 [postfix/smtpd] match_string: mynetworks ~? debug_peer_list
Feb 24 18:02:25 [postfix/smtpd] match_string: mynetworks ~? fast_flush_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: mynetworks ~? mynetworks
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? debug_peer_list
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? fast_flush_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? mynetworks
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? permit_mx_backup_networks
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? qmqpd_authorized_clients
Feb 24 18:02:25 [postfix/smtpd] match_string: relay_domains ~? relay_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: permit_mx_backup_networks ~? debug_peer_list
Feb 24 18:02:25 [postfix/smtpd] match_string: permit_mx_backup_networks ~? fast_flush_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: permit_mx_backup_networks ~? mynetworks
Feb 24 18:02:25 [postfix/smtpd] match_string: permit_mx_backup_networks ~? permit_mx_backup_networks
Feb 24 18:02:25 [postfix/smtpd] maps_append: mysql:/etc/postfix/mysql-aliases.cf
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set username to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set password to '******'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set database name to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set table name to 'alias'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set select_field to 'destination'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set where_field to 'alias'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set additional_conditions to ''
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts
Feb 24 18:02:25 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-aliases.cf
Feb 24 18:02:25 [postfix/smtpd] maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set username to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set password to '*******'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set database name to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set table name to 'users'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set select_field to 'maildir'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set where_field to 'email'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set additional_conditions to 'and postfix = 'y''
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts
Feb 24 18:02:25 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-virtual-maps.cf
Feb 24 18:02:25 [postfix/smtpd] maps_append: unix:passwd.byname
Feb 24 18:02:25 [postfix/smtpd] dict_open: unix:passwd.byname
Feb 24 18:02:25 [postfix/smtpd] maps_append: mysql:/etc/postfix/mysql-virtual.cf
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set username to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set password to '******'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set database name to 'mailsql'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set table name to 'virtual'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set select_field to 'destination'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set where_field to 'email'
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): set additional_conditions to ''
Feb 24 18:02:25 [postfix/smtpd] mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts
Feb 24 18:02:25 [postfix/smtpd] dict_open: mysql:/etc/postfix/mysql-virtual.cf
Feb 24 18:02:25 [postfix/smtpd] maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? debug_peer_list
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? fast_flush_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? mynetworks
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? permit_mx_backup_networks
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? qmqpd_authorized_clients
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? relay_domains
Feb 24 18:02:25 [postfix/smtpd] match_string: smtpd_access_maps ~? smtpd_access_maps
Feb 24 18:02:25 [postfix/smtpd] name_mask: noanonymous
Feb 24 18:02:25 [postfix/smtpd] starting TLS engine
Feb 24 18:02:25 [postfix/smtpd] unable to get certificate from '/etc/postfix/newcert.pem'
Feb 24 18:02:25 [postfix/smtpd] 3046:error:02001002:system library:fopen:No such file or directory:bss_file.c:245:fopen('/etc/postfix/newcert.pem','r'):
Feb 24 18:02:25 [postfix/smtpd] 3046:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:247:
Feb 24 18:02:25 [postfix/smtpd] 3046:error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:758:
Feb 24 18:02:25 [postfix/smtpd] TLS engine: cannot load RSA cert/key data
Feb 24 18:02:25 [postfix/smtpd] watchdog_create: 0x8096a30 18000
Feb 24 18:02:25 [postfix/smtpd] watchdog_stop: 0x8096a30
Feb 24 18:02:25 [postfix/smtpd] watchdog_start: 0x8096a30
Feb 24 18:02:25 [postfix/smtpd] connection established
Feb 24 18:02:25 [postfix/smtpd] master_notify: status 0
Feb 24 18:02:25 [postfix/smtpd] name_mask: resource
Feb 24 18:02:25 [postfix/smtpd] name_mask: software
Feb 24 18:02:25 [postfix/smtpd] connect from localhost[127.0.0.1]
Feb 24 18:02:25 [postfix/smtpd] > localhost[127.0.0.1]: 220 strider.spinningvortex.net ESMTP Postfix
Feb 24 18:02:25 [postfix/smtpd] watchdog_pat: 0x8096a30
Feb 24 18:02:37 [postfix/smtpd] < localhost[127.0.0.1]: mail from: metal@spinningvortex.net
Feb 24 18:02:37 [postfix/smtpd] extract_addr: input: metal@spinningvortex.net
Feb 24 18:02:37 [postfix/smtpd] extract_addr: result: metal@spinningvortex.net
Feb 24 18:02:37 [postfix/smtpd] fsspace: .: block size 4096, blocks free 2318121
Feb 24 18:02:37 [postfix/smtpd] smtpd_check_size: blocks 4096 avail 2318121 min_free 0 size 0
Feb 24 18:02:37 [postfix/smtpd] connect to subsystem public/cleanup
Feb 24 18:02:37 [postfix/smtpd] public/cleanup socket: wanted attribute: queue_id
Feb 24 18:02:37 [postfix/smtpd] input attribute name: queue_id
Feb 24 18:02:37 [postfix/smtpd] input attribute value: 6DE1B3BB17
Feb 24 18:02:37 [postfix/smtpd] public/cleanup socket: wanted attribute: (list terminator)
Feb 24 18:02:37 [postfix/smtpd] input attribute name: (end)
Feb 24 18:02:37 [postfix/smtpd] send attr flags = 2
Feb 24 18:02:37 [postfix/smtpd] 6DE1B3BB17: client=localhost[127.0.0.1]
Feb 24 18:02:37 [postfix/smtpd] > localhost[127.0.0.1]: 250 Ok
Feb 24 18:02:37 [postfix/smtpd] watchdog_pat: 0x8096a30
Feb 24 18:02:44 [postfix/smtpd] < localhost[127.0.0.1]: rcpt to: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] extract_addr: input: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] extract_addr: result: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] generic_checks: START
Feb 24 18:02:44 [postfix/smtpd] generic_checks: name=permit_sasl_authenticated
Feb 24 18:02:44 [postfix/smtpd] generic_checks: name=permit_sasl_authenticated status=0
Feb 24 18:02:44 [postfix/smtpd] generic_checks: name=permit_mynetworks
Feb 24 18:02:44 [postfix/smtpd] permit_mynetworks: localhost 127.0.0.1
Feb 24 18:02:44 [postfix/smtpd] match_hostname: localhost ~? 142.179.183.215/32
Feb 24 18:02:44 [postfix/smtpd] match_hostaddr: 127.0.0.1 ~? 142.179.183.215/32
Feb 24 18:02:44 [postfix/smtpd] match_hostname: localhost ~? 127.0.0.0/8
Feb 24 18:02:44 [postfix/smtpd] match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Feb 24 18:02:44 [postfix/smtpd] generic_checks: name=permit_mynetworks status=1
Feb 24 18:02:44 [postfix/smtpd] smtpd_check_rcptmap: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] connect to subsystem private/rewrite
Feb 24 18:02:44 [postfix/smtpd] send attr request = rewrite
Feb 24 18:02:44 [postfix/smtpd] send attr rule = canonicalize
Feb 24 18:02:44 [postfix/smtpd] send attr address = metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: address
Feb 24 18:02:44 [postfix/smtpd] input attribute name: address
Feb 24 18:02:44 [postfix/smtpd] input attribute value: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)
Feb 24 18:02:44 [postfix/smtpd] input attribute name: (end)
Feb 24 18:02:44 [postfix/smtpd] rewrite_clnt: canonicalize: metal@spinningvortex.net -> metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] send attr request = resolve
Feb 24 18:02:44 [postfix/smtpd] send attr address = metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: transport
Feb 24 18:02:44 [postfix/smtpd] input attribute name: transport
Feb 24 18:02:44 [postfix/smtpd] input attribute value: local
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: nexthop
Feb 24 18:02:44 [postfix/smtpd] input attribute name: nexthop
Feb 24 18:02:44 [postfix/smtpd] input attribute value: spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: recipient
Feb 24 18:02:44 [postfix/smtpd] input attribute name: recipient
Feb 24 18:02:44 [postfix/smtpd] input attribute value: metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: flags
Feb 24 18:02:44 [postfix/smtpd] input attribute name: flags
Feb 24 18:02:44 [postfix/smtpd] input attribute value: 256
Feb 24 18:02:44 [postfix/smtpd] private/rewrite socket: wanted attribute: (list terminator)
Feb 24 18:02:44 [postfix/smtpd] input attribute name: (end)
Feb 24 18:02:44 [postfix/smtpd] resolve_clnt_query: `metal@spinningvortex.net' -> t=`local' h=`spinningvortex.net' r=`metal@spinningvortex.net'
Feb 24 18:02:44 [postfix/smtpd] ctable_locate: install entry key metal@spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal@spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? strider.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? localhost.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal: not found
Feb 24 18:02:44 [postfix/smtpd] maps_find: @spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] mail_addr_find: metal@spinningvortex.net -> (not found)
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal@spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? strider.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? localhost.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal: not found
Feb 24 18:02:44 [postfix/smtpd] maps_find: @spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] mail_addr_find: metal@spinningvortex.net -> (not found)
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = 'metal@spinningvortex.net'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal@spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? strider.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? localhost.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = 'metal'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal: not found
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from virtual where email = '@spinningvortex.net'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: @spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] mail_addr_find: metal@spinningvortex.net -> (not found)
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from alias where alias = 'metal@spinningvortex.net'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select maildir from users where email = 'metal@spinningvortex.net' and postfix = 'y'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal@spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? strider.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? localhost.spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] match_string: spinningvortex.net ~? spinningvortex.net
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from alias where alias = 'metal'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select maildir from users where email = 'metal' and postfix = 'y'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: metal: not found
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select destination from alias where alias = '@spinningvortex.net'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup using sql query: select maildir from users where email = '@spinningvortex.net' and postfix = 'y'
Feb 24 18:02:44 [postfix/smtpd] dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Feb 24 18:02:44 [postfix/smtpd] dict_mysql_lookup: retrieved 0 rows
Feb 24 18:02:44 [postfix/smtpd] maps_find: @spinningvortex.net: not found
Feb 24 18:02:44 [postfix/smtpd] mail_addr_find: metal@spinningvortex.net -> (not found)
Feb 24 18:02:44 [postfix/smtpd] 6DE1B3BB17: reject: RCPT from localhost[127.0.0.1]: 450 <metal@spinningvortex.net>: User unknown in local recipient table; from=<metal@spinningvortex.net> proto=SMTP

note, my various config files, are exaclt yas found here:
http://www.gentoo.org/doc/en/virt-mail-howto.xml
just with my own information found within.
Back to top
View user's profile Send private message
vicay
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2002
Posts: 97
Location: Dresden, Germany

PostPosted: Tue Feb 25, 2003 7:24 am    Post subject: Reply with quote

Hello again,


all your MySQL queries return 0 result rows.
what happens if you query the MySQL Server manually?
does the user exist at all in your database?


best regards

vicay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum