[tpop3d-discuss]pop3d+Mysql - Mail does not get

gladko@inbox.ru gladko at inbox.ru
Fri, 3 Sep 2004 02:04:29 +0400


Hello!

Help to understand please why mail from Maildir users does not get.
At attempt to take away a mail there is a window
for input of a login and the password.
After input of a login and the password of the letter do not come.

OS Linux.
Virtual users and domains are stored in MySQL.
Users are stored only in a database.
Passwords in db - plaintext


I. LOGS

A) Mail

error:
Sep  3 01:12:44 gw tpop3d[20428]: auth_mysql_new_user_pass: 3 fields returned by query, should be 4: mailbox location, password hash, unix user, mailbox type
Sep  3 01:12:44 gw tpop3d[20428]:connection_do:client`[6]192.168.11.4/gw.domain1.ru': username `kropov@domain1.ru': 1 authentication failures

info:
Sep  3 01:12:33 gw tpop3d[20428]: parse_listeners: listening on address 0.0.0.0:110
Sep  3 01:12:33 gw tpop3d[20428]: get_mysql_server: now using server localhost
Sep  3 01:12:33 gw tpop3d[20428]: 1 authentication drivers successfully loaded
Sep  3 01:12:33 gw tpop3d[20428]: net_loop: tpop3d version 1.5.3 successfully started
Sep  3 01:12:41 gw tpop3d[20428]: listeners_post_select:client[6]192.168.11.4/gw.domain1.ru: connected to local address 192.168.11.1:110
Sep  3 01:12:47 gw tpop3d[20428]: ioabs_tcp_post_select: client [6]192.168.11.4/gw.domain1.ru: connection closed by peer
Sep  3 01:12:47 gw tpop3d[20428]: connections_post_select: client [6]192.168.11.4/gw.domain1.ru: disconnected; 36/107 bytes read/written

warnings:
Sep  3 01:12:33 gw tpop3d[20428]: listener_new: gethostbyaddr(0.0.0.0): cannot resolve name
Sep  3 01:12:33 gw tpop3d[20428]: listener_new: 0.0.0.0:110: cannot obtain domain suffix for this address
Sep  3 01:12:33 gw tpop3d[20428]: listener_new: 0.0.0.0:110: using fallback domain suffix `gw.domain1.ru'


B) MySQL
040903 0:53:42 8972 Query  SELECT maildir,password,uid FROM users WHERE email='kropov@domain1.ru'




II.

1) Configure

./configure --prefix=/usr/local/tpop3
--enable-mbox-maildir
--enable-tls 
--enable-auth-mysql 
--with-mysql-include-dir=/usr/include/mysql 
--with-mysql-lib-dir=/usr/lib/mysql 
--with-openssl-root=/usr/local/ssl 
--disable-auth-pam 
--with-mailspool-directory=/var/spool/vmail


2) Configure and installation - OK


3) /etc/sec/tpop3/tpop3d.conf

listen-address: 0.0.0.0
max-children: 5
timeout-seconds: 600
mailbox: maildir:/var/spool/vmail/$(domain)/$(user)/Maildir

auth-mysql-enable: yes
auth-mysql-mail-group: mail
auth-mysql-hostname: localhost
auth-mysql-database: mail
auth-mysql-username: postfix
auth-mysql-password: ......
auth-mysql-pass-query: SELECT maildir,password,uid FROM users WHERE email='$(local_part)@$(domain)'



4) MySQL db

SHOW TABLES;
+----------------+
| Tables_in_mail |
+----------------+
| remote_aliases |
| transport      |
| users          |
+----------------+


SELECT * FROM users;
+-------+------+----------------------+----------------------------------------+-------------+---------+---------+
| uid   | gid  | email                | maildir                                | password    | enabled | info    |
+-------+------+----------------------+----------------------------------------+-------------+---------+---------+
| 11006 |   12 | kropov@domain1.ru    |  /var/spool/vmail/domain1.ru/kropov/   | hhh         |       1 | kropov  |
+-------+------+----------------------+----------------------------------------+-------------+---------+---------+
| 11007 |   12 | tteess@domain2.ru    |  /var/spool/vmail/domain2.ru/tteess/   | ppp         |       1 | tteess  |
+-------+------+----------------------+----------------------------------------+-------------+---------+---------+



5) drwxrwx---    3 postfix  mail         4096 Àâã 25 21:33 vmail/

6) Passwords in db - plaintext


Postfix and SASL2 work with DB well.
Send and receive a mail.
But I cannot take away a mail from (tpop3d) server.
I did under the documentation to tpop3d and 
to the sent example tpop3d.conf.


 Say where I was mistaken?


Thanks!