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

[Qmail+PGSql] qmail-getpw : alias ...



hi~ I'm tetris. Sorry, posted my html mail message.. My orgio mail account composed only in html. So I'll move another mail service soon .. I'm trying to qmail+pgsql, but it's not pass. qmail-getpw dose not work : [root@slb /root]# /var/qmail/bin/qmail-getpw test slb.capcorps.army.mil alias77902108/var/qmail/alias-test0[root@slb /root]# 1. qmail < pgsql patch # cd /tmp # tar -zxvpf qmail-1.03.tar.gz # patch -p0 < qmail-pgsql-0.15.patch # cd qmail-1.03 postgresql 7.0.2 ( source install directory /usr/local/pgsql ) # vi pgsql.headers -I/usr/local/pgsql/include # vi pgsql.lib -L/usr/local/pgsql/lib -lpq ...... 2. about qmail install 1) account ( /etc/passwd ) alias:x:7790:2108::/var/qmail/alias:/bin/true qmaild:x:7791:2108::/var/qmail:/bin/true qmaill:x:7792:2108::/var/qmail:/bin/true qmailp:x:7793:2108::/var/qmail:/bin/true qmailq:x:7794:2107::/var/qmail:/bin/true qmailr:x:7795:2107::/var/qmail:/bin/true qmails:x:7796:2107::/var/qmail:/bin/true userconsult:x:210:210::/home/userconsult:/bin/bash usermgr:x:211:210::/home/usermgr:/bin/bash 2) group ( /etc/group ) qmail:x:2107: nofiles:x:2108: virtual:x:210: 3) rc file ( /etc/rc.d/rc.local, /var/qmail/rc ) # /etc/rc.d/rc.local # if [ -f /var/qmail/rc ]; then csh -cf '/var/qmail/rc &' fi # /var/qmail/rc # #!/bin/sh exec env - PATH="/var/qmail/bin:$PATH" \ qmail-start ./Maildir splogger qmail 4) permission ( /var/qmail, /var/qmail/queue, /var/qmail/control, /var/log/qmail, /home/mail_account, /home/mail_account/test/ ) # ls -l /var/qmail drwxr-sr-x 2 alias qmail 4096 1&#xBF;&#xF9; 14 04:22 alias/ drwxr-xr-x 2 root qmail 4096 1&#xBF;&#xF9; 12 20:23 bin/ drwxr-xr-x 2 root qmail 4096 1&#xBF;&#xF9; 12 20:23 boot/ drwxr-xr-x 2 root qmail 4096 1&#xBF;&#xF9; 14 05:54 control/ drwxr-xr-x 2 root qmail 4096 1&#xBF;&#xF9; 12 20:23 doc/ drwxr-xr-x 10 root qmail 4096 1&#xBF;&#xF9; 12 20:23 man/ drwxr-x--- 11 qmailq qmail 4096 1&#xBF;&#xF9; 12 20:23 queue/ -rwxr-xr-x 1 root root 204 1&#xBF;&#xF9; 12 20:47 rc* drwxr-xr-x 2 root qmail 4096 1&#xBF;&#xF9; 12 20:23 users/ # ls -l /var/qmail/queue drwx------ 2 qmails qmail 4096 1&#xBF;&#xF9; 12 20:23 bounce/ drwx------ 25 qmails qmail 4096 1&#xBF;&#xF9; 12 20:23 info/ drwx------ 2 qmailq qmail 4096 1&#xBF;&#xF9; 14 04:22 intd/ drwx------ 25 qmails qmail 4096 1&#xBF;&#xF9; 12 20:23 local/ drwxr-x--- 2 qmailq qmail 4096 1&#xBF;&#xF9; 12 20:23 lock/ drwxr-x--- 25 qmailq qmail 4096 1&#xBF;&#xF9; 12 20:23 mess/ drwx------ 2 qmailq qmail 4096 1&#xBF;&#xF9; 14 04:22 pid/ drwx------ 25 qmails qmail 4096 1&#xBF;&#xF9; 12 20:23 remote/ drwxr-x--- 2 qmailq qmail 4096 1&#xBF;&#xF9; 14 04:22 todo/ # ls -l /var/qmail/control -rw-r--r-- 1 root root 18 1&#xBF;&#xF9; 12 20:46 defaultdomain -rw-r--r-- 1 root root 22 1&#xBF;&#xF9; 12 20:46 locals -rw-r--r-- 1 root root 22 1&#xBF;&#xF9; 12 20:46 me -rw-r--r-- 1 root root 9 1&#xBF;&#xF9; 12 20:46 plusdomain -rw-r--r-- 1 root root 22 1&#xBF;&#xF9; 12 20:46 rcpthosts -rw-r----- 1 qmails nofiles 452 1&#xBF;&#xF9; 14 05:53 sqlserver # ls -al /var/log/qmail drwxr-xr-x 4 qmaill root 4096 12&#xBF;&#xF9; 31 21:08 ./ drwxr-xr-x 4 root root 4096 1&#xBF;&#xF9; 14 04:02 ../ drwxr-xr-x 2 qmaill root 4096 12&#xBF;&#xF9; 31 21:08 qmail-pop3d/ drwxr-xr-x 2 qmaill root 4096 1&#xBF;&#xF9; 14 18:26 qmail-smtpd/ # ls -al /home/mail_account drwxr-xr-x 3 usercons virtual 4096 1&#xBF;&#xF9; 12 05:58 ./ drwxr-xr-x 8 root root 4096 1&#xBF;&#xF9; 12 05:54 ../ drwxr-xr-x 3 usercons virtual 4096 1&#xBF;&#xF9; 12 05:58 test/ # ls -al /home/mail_account/test drwxr-xr-x 3 usercons virtual 4096 1&#xBF;&#xF9; 12 05:58 ./ drwxr-xr-x 3 usercons virtual 4096 1&#xBF;&#xF9; 12 05:58 ../ -rw-r--r-- 1 usercons virtual 11 1&#xBF;&#xF9; 12 05:58 .qmail drwx------ 5 usercons virtual 4096 1&#xBF;&#xF9; 12 05:58 Maildir/ 5) /var/qmail/control/sqlserver db_use yes check_host yes connectionstring host=localhost user=userconsult password=123456 dbname=userdb popconnectionstring user=usermgr password=123456 dbname=userdb dbtable passwd autohomedir yes localtable locals virt_host_field virtual_host login_field login uid_field uid gif_field gid home_field home quota_field hardquota enabled_field enabled startdate_field startdate stopdate_field stopdate passwd_field password lastlogin_field lastlogin 6) database info. CREATE TABLE passwd ( login varchar(64) NOT NULL, password varchar(13), name varchar(64), nicname varchar(64), uid int NOT NULL, gid int NOT NULL, home varchar(200) NOT NULL, shell varchar(64), virtual_host varchar(64), domain varchar(64), hardquota int DEFAULT '0', startdate datetime DEFAULT now(), stopdate datetime DEFAULT 'infinity', enabled bool DEFAULT '1', lastlogin datetime ); CREATE INDEX passwd_login ON passwd ( login ); CREATE INDEX passwd_virtual ON passwd ( virtual_host ); CREATE INDEX passwd_domain ON passwd ( domain ); GRANT SELECT ON passwd TO userconsult; GRANT ALL ON passwd TO usermgr; INSERT INTO passwd ( login, password, name, nicname, uid, gid, home, shell, virtual_host, domain, hardquota ) VALUES ( 'test', 'QNsPX.HrKAQ0U', 'real tetris', 'tetris', '210', '210', '/home/mail_account/test', '/bin/false', 'slb.capcorps.army.mil', 'slb.capcorps.army.mil', '100000' ); INSERT INTO locals values( 'slb.capcorps.army.mil' ); 7) ps status postgres 720 1 0 19:29 ? 00:00:00 /usr/local/pgsql/bin/postmaster qmails 725 1 0 19:29 ? 00:00:00 qmail-send qmaill 735 725 0 19:29 ? 00:00:00 splogger qmail root 736 725 0 19:29 ? 00:00:00 qmail-lspawn ./Maildir qmailr 737 725 0 19:29 ? 00:00:00 qmail-rspawn qmailq 738 725 0 19:29 ? 00:00:00 qmail-clean more : ? help me, please.