[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help please



I have redhat 6.2 and postgresql 7.1 with checkpassword 0.81 qmail 1.03 and the latest pgsql patches for qmail.
couple of questions is there anyway to store the user passwords in the database without them being encrypted?
I wanted to use the lcoalhost table so i didn't have to maintain the same control/locals file on my 3 mail servers does that work?
The only users I can ever deliver mail to are the ones in my /etc/passwd file i can not deliver mail to users in database.  Both qmail-getpw and qmail-popup work but, qmail-send won't lookup the users in the database for delivery it only checks the /etc/passwd file.
 
 
  I tried with the local table turned on and a deleted control/locals.  No emails could be delivered for either domain and /var/log/qmail/current reported
@400000003af46dec2ef5e76c delivery 4: failure: Sorry._Although_I'm_listed_as_a_b
est-preference_MX_or_A_for_that_host,/it_isn't_in_my_control/locals_file,_so_I_d
on't_treat_it_as_local._(#5.4.6)/
no emails could be delivered to postmaster@xxxxxxxxxxx either
I have a sql trace running and did not show any querys performs against the datase mail.
so then i put the domains and mail server fqdn in control/locals and remmed the line in the sqlserver file. and get this response.
@400000003af4725b3063e6bc delivery 1: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@400000003af4725b3067edfc status: local 0/10 remote 0/20
however mails to postmaster@xxxxxxxxxxx works
 
during either of the configurations where is had no control/locals and sqlserver/localhosts turned on or control/locals with sqlserver/localhost turned off does qmail-send every make a sql query to the sql database.
I checked the ldd on qmail-send
[root@mx1 bin]# ldd qmail-send
        libpq.so.2 => /usr/lib/libpq.so.2 (0x40018000)
        libc.so.6 => /lib/libc.so.6 (0x40028000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4011d000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4014a000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4015a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
 
 
current setup
control/local
mx1.mbo.net
mbo.net
mbovideo.com
control/sqlserver
db_use          yes
check_host      yes
connectionstring        host=sql1.mbo.net dbname=mail user=xxxxx password=xxxxx
popconnectionstring     host=sql1.mbo.net dbname=mail user=xxxxx password=xxxxx
dbtable                 passwd
autohomedir             yes
#localtable             locals
virt_host_field         virtual_host
login_field             login
uid_field               uid
gid_field               gid
home_field              home
quota_field             hardquota
enabled_field           enabled
startdate_field         startdate
stopdate_field          stopdate
passwd_field            password
lastlogin_field         lastlogin
localpop                mbo.net
#global_use             yes
#global_domain          mbo.net
mail.locals table
mail=# select * from locals;
 virtual_host
--------------
 mx2.mbo.net
 mx3.mbo.net
 mx1.mbo.net
 mbo.net
mbovideo.com
mail.passwd table
  login   |  uid  |  gid  |           home           | virtual_host |   password
    | hardquota |       startdate        | stopdate | enabled |       lastlogin
 
----------+-------+-------+--------------------------+--------------+-----------
----+-----------+------------------------+----------+---------+-----------------
-------
 alias    | 10000 | 10000 | /home/mbo.net            | mbo.net      |
    |   1000000 | 2001-05-04 18:02:09-05 | infinity | t       |
 alias    | 10000 | 10000 | /home/mbovideo.com       | mbovideo.com |
    |   1000000 | 2001-05-04 18:02:34-05 | infinity | t       |
 danny    | 10000 | 10000 | /home/mbovideo.com/danny | mbovideo.com | danny
    |   1000000 | 2001-05-04 17:55:57-05 | infinity | t       | 2001-05-05 12:29
:13-05
 hcrowder | 10000 | 10000 | /home/mbo.net/hcrowder   | mbo.net      | 12345
    |   1000000 | 2001-05-04 19:01:51-05 | infinity | t       | 2001-05-05 12:29
:48-05
 mark     | 10000 | 10000 | /home/mbo.net/mark       | mbo.net      | 12NXXJS8/w
mXI |   1000000 | 2001-05-04 17:55:31-05 | infinity | t       | 2001-05-05 16:22
:15-05
(5 rows)
 
2 users getpw
[root@mx1 control]# qmail-getpw mark mbo.net
mark1000010000/home/mbo.net/mark1000000[root@mx1 control]#
sql trace of get-pw
DEBUG:  InitPostgres
DEBUG:  StartTransactionCommand
DEBUG:  query: select getdatabaseencoding()
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: SELECT login,uid,gid,home,hardquota FROM passwd WHERE login='mark
' AND virtual_host='mbo.net' AND enabled='true' AND (startdate IS NULL OR startd
ate<=NOW()) AND (stopdate IS NULL OR stopdate>=NOW());
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
second user getpw
[root@mx1 control]# qmail-getpw danny mbovideo.com
danny1000010000/home/mbovideo.com/danny1000000[root@mx1 control]#
sql trace
DEBUG:  connection: host=216.150.100.6 user=qmail database=mail
DEBUG:  InitPostgres
DEBUG:  StartTransactionCommand
DEBUG:  query: select getdatabaseencoding()
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: SELECT login,uid,gid,home,hardquota FROM passwd WHERE login='dann
y' AND virtual_host='mbovideo.com' AND enabled='true' AND (startdate IS NULL OR
startdate<=NOW()) AND (stopdate IS NULL OR stopdate>=NOW());
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: CleanupProc: pid 7029 exited with status 0
 
qmail-popup test
[root@mx1 bin]# qmail-popup mx1.mbo.net /bin/checkpassword pwd
+OK <8589.989098940@xxxxxxxxxxx>
user mark@xxxxxxx
+OK
pass xxxx
/home/mbo.net/mark
 
sql trace
DEBUG:  InitPostgres
DEBUG:  StartTransactionCommand
DEBUG:  query: select getdatabaseencoding()
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: SELECT login,uid,gid,home,password FROM passwd WHERE login='mark'
 AND virtual_host='mbo.net' AND (startdate IS NULL OR startdate<=NOW()) AND (sto
pdate IS NULL OR stopdate>=NOW());
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  StartTransactionCommand
DEBUG:  query: UPDATE passwd SET lastlogin=NOW() WHERE login='mark' AND virtual_
host='mbo.net';
DEBUG:  ProcessQuery
DEBUG:  CommitTransactionCommand
DEBUG:  proc_exit(0)
DEBUG:  shmem_exit(0)
DEBUG:  exit(0)
/usr/bin/postmaster: reaping dead processes...
/usr/bin/postmaster: CleanupProc: pid 7037 exited with status 0