[tpop3d-discuss]SHA1 hashes in MySQL and more verbose debug

estoy@ver.megared.net.mx estoy at ver.megared.net.mx
Wed, 29 Sep 2004 17:19:38 -0500 (CDT)


Thanks a lot for the patch... unfortunately I don't have the equipment 
(80486,16MB RAM,512MB HDD/71M Free) for installing the development 
environment (gcc,automake, autoconf...) to compile support for SHA1 in 
tpop3d ith your patch... :(

So, in order to make it work with the default support from tpop3d 
('{crypt}' / '{crypt_md5}') I changed the password hash in DB... i.e., 
using ENCRYPT('mypassword') in MySQL... but it is not working, and the 
log reveals nothing that I can use to trace the error (and I'm using 
the -v switch):

% /usr/local/sbin/tpop3d -v -f /usr/local/etc/tpop3d.conf \
-p /var/run/tpop3d.pid

my conf file:
~~~~~~~~</usr/local/etc/tpop3d.conf>~~~~~~~~~~~
auth-mysql-pass-query: SELECT CONCAT(emp_home,'/Maildir'), \
        CONCAT('{crypt}',pwd_hash), \
        'mailnull','maildir' \
        FROM emp \
        WHERE login='$(local_part)'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MySQL data:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mysql> INSERT INTO emp VALUES ('myuser',ENCRYPT
('mypassword'),'/var/mail/myuser');
mysql> select login,pwd_hash from emp;
+----------+---------------+
| login    | pwd_hash      |
+----------+---------------+
| myuser   | MQ86xIUVJlvBs |
+----------+---------------+

mysql> select encrypt('mypassword');
+-----------------------+
| encrypt('mypassword') |
+-----------------------+
| MQ86xIUVJlvBs         |
+-----------------------+

mysql> select encrypt('mypassword','MQ86xIUVJlvBs');
+---------------------------------------+
| encrypt('mypassword','MQ86xIUVJlvBs') |
+---------------------------------------+
| MQ86xIUVJlvBs                         |
+---------------------------------------+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The logs:
~~~~~~~~~~~~~~~~~~</var/log/maillog>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sep 29 16:59:53 mail tpop3d[27400]: TCP Wrappers support enabled, using 
daemon name `tpop3d'
Sep 29 16:59:53 mail tpop3d[27400]: listener_new: gethostbyaddr
(0.0.0.0): cannot resolve name
Sep 29 16:59:53 mail tpop3d[27400]: listener_new: 0.0.0.0:110: cannot 
obtain domain suffix for this address
Sep 29 16:59:53 mail tpop3d[27400]: listener_new: 0.0.0.0:110: using 
fallback domain suffix `mydomain.com'
Sep 29 16:59:53 mail tpop3d[27400]: parse_listeners: listening on 
address 0.0.0.0:110
Sep 29 16:59:53 mail tpop3d[27400]: /usr/local/etc/tpop3d.conf: I hope 
you realise that use of the log-bad-passwords option is an invasion of 
privacy
Sep 29 16:59:53 mail tpop3d[27400]: 1 authentication drivers 
successfully loaded
Sep 29 16:59:53 mail tpop3d[27400]: net_loop: tpop3d version 1.5.3 
successfully started
Sep 29 16:59:57 mail tpop3d[27400]: listeners_post_select: client [6]
172.16.1.3/mydomain.com: connected to local address 172.16.1.252:110
Sep 29 16:59:57 mail tpop3d[27400]: connection_do: client `[6]
172.16.1.3/mydomain.com': username `myuser': failing password is 
`mypassword'
Sep 29 16:59:57 mail tpop3d[27400]: connection_do: client `[6]
172.16.1.3/mydomain.com': username `myuser': 1 authentication failures
Sep 29 17:00:00 mail tpop3d[27400]: ioabs_tcp_post_select: client [6]
172.16.1.3/mydomain.com: connection closed by peer
Sep 29 17:00:00 mail tpop3d[27400]: connections_post_select: client [6]
172.16.1.3/mydomain.com: disconnected; 32/107 bytes read/written
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks a lot for the help I barely know tpop3d and I really love it, so 
I'm desperate to make it work...

Regards,
Ed