ubuntu-qmail安装配置详解(step by step)(3)

运行

root@ubuntu-sdp:/home/deepfuture# /var/daemontool/command/svscanboot &
[1] 1550

最后检查是否成功安装(如果失败请检查(2)中的命令参数是否大小写错误)

 root@ubuntu-sdp:/home/deepfuture#

root@ubuntu-sdp:/home/deepfuture# ps -ef|grep qmail
qmails    1598     1  0 15:37 pts/0    00:00:00 qmail-send
root      1600  1598  0 15:37 pts/0    00:00:00 qmail-lspawn ./Maildir/
qmailr    1601  1598  0 15:37 pts/0    00:00:00 qmail-rspawn
qmailq    1602  1598  0 15:37 pts/0    00:00:00 qmail-clean
root      1623  1580  0 15:44 pts/0    00:00:00 /bin/sh /var/daemontool/service/qmail-smtpd/run
root      1624  1623  0 15:44 pts/0    00:00:00 /usr/local/bin/tcpserver -H -r -c 100 -l 0 -t 1 -v -p -x /etc/tcp.smtp.cdb -u id -u vpopmail -g id -g vpopmail 0 smtp /var/qmail/bin/qmail-smtpd deepfuture.imwork.net /bin/vchkpw /bin/true
root      1666  1580  0 16:51 pts/0    00:00:00 /bin/sh /var/daemontool/service/qmail-pop3d/run
root      1667  1666  0 16:51 pts/0    00:00:00 /usr/local/bin/tcpserver -l 0 -U -c 100 -v -R 0 pop3 /var/qmail/bin/qmail-popup deepfuture.imwork.net /bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir
root      1669  1580  0 16:51 pts/0    00:00:00 grep qmail
root@ubuntu-sdp:/home/deepfuture# telnet 127.0.0.1 110
Trying 127.0.0.1...
tcpserver: status: 1/100
tcpserver: pid 1671 from 127.0.0.1
Connected to 127.0.0.1.
Escape character is '^]'.
tcpserver: ok 1671 0:127.0.0.1:110 localhost:127.0.0.1::53412
+OK <[email protected]>
quit
tcpserver: end 1671 status 256
tcpserver: status: 0/100
+OK
Connection closed by foreign host.
root@ubuntu-sdp:/home/deepfuture# telnet 127.0.0.1 25
Trying 127.0.0.1...
tcpserver: status: 1/100
tcpserver: pid 1673 from 127.0.0.1
tcpserver: ok 1673 0:127.0.0.1:25 :127.0.0.1::39835
Connected to 127.0.0.1.
Escape character is '^]'.
220 deepfuture.imwork.net ESMTP
quit
tcpserver: end 1673 status 0
tcpserver: status: 0/100
221 deepfuture.imwork.net
Connection closed by foreign host.

十三、安装PAM,以支持internet上的认证

root@ubuntu-sdp:/home/deepfuture# apt-get install libpam0g-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列软件包是自动安装的并且现在不再被使用了:
  linux-headers-2.6.31-14-generic-pae linux-headers-2.6.31-14 libdns50
使用'apt-get autoremove'来删除它们
下列【新】软件包将被安装:
  libpam0g-dev
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 32 个软件未被升级。
需要下载 190kB 的软件包。
解压缩后会消耗掉 528kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com karmic/main libpam0g-dev 1.1.0-2ubuntu1 [190kB]
下载 190kB,耗时 3s (53.3kB/s)        
选中了曾被取消选择的软件包 libpam0g-dev。
(正在读取数据库 ... 系统当前总共安装有 80120 个文件和目录。)
正在解压缩 libpam0g-dev (从 .../libpam0g-dev_1.1.0-2ubuntu1_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 libpam0g-dev (1.1.0-2ubuntu1) ...
root@ubuntu-sdp:/home/deepfuture# cd /usr/tmp
root@ubuntu-sdp:/usr/tmp# ls
admin                         ucspi-tcp-0.88                 ucspi-tcp-0.88.nobase.patch  vpopmail-5.4.30.tar.gz
daemontools-0.76.errno.patch  ucspi-tcp-0.88.a_record.patch  ucspi-tcp-0.88.tar.gz
daemontools-0.76.tar.gz       ucspi-tcp-0.88.errno.patch     vpopmail-5.4.30
root@ubuntu-sdp:/usr/tmp# wget http://nchc.dl.sourceforge.net/sourceforge/checkpasswd-pam/checkpassword-pam-0.99.tar.gz
--2010-02-11 17:26:10--  http://nchc.dl.sourceforge.net/sourceforge/checkpasswd-pam/checkpassword-pam-0.99.tar.gz
Resolving nchc.dl.sourceforge.net... 211.79.60.17
Connecting to nchc.dl.sourceforge.net|211.79.60.17|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/sourceforge/checkpasswd-pam/checkpassword-pam-0.99.tar.gz?download&failedmirror=nchc.dl.sourceforge.net [following]
--2010-02-11 17:26:11--  http://downloads.sourceforge.net/sourceforge/checkpasswd-pam/checkpassword-pam-0.99.tar.gz?download&failedmirror=nchc.dl.sourceforge.net
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://ncu.dl.sourceforge.net/project/checkpasswd-pam/checkpasswd-pam/0.99/checkpassword-pam-0.99.tar.gz [following]
--2010-02-11 17:26:11--  http://ncu.dl.sourceforge.net/project/checkpasswd-pam/checkpasswd-pam/0.99/checkpassword-pam-0.99.tar.gz
Resolving ncu.dl.sourceforge.net... 140.115.17.45
Connecting to ncu.dl.sourceforge.net|140.115.17.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 83751 (82K) [application/x-gzip]
Saving to: `checkpassword-pam-0.99.tar.gz'

100%[===================================================================================>] 83,751      62.5K/s   in 1.3s   

2010-02-11 17:26:13 (62.5 KB/s) - `checkpassword-pam-0.99.tar.gz' saved [83751/83751]

root@ubuntu-sdp:/usr/tmp# tar xvfz checkpassword-pam-0.99.tar.gz
checkpassword-pam-0.99/
checkpassword-pam-0.99/debian/
checkpassword-pam-0.99/debian/changelog
checkpassword-pam-0.99/debian/control
checkpassword-pam-0.99/debian/copyright
checkpassword-pam-0.99/debian/docs
checkpassword-pam-0.99/debian/checkpassword-pam.files
checkpassword-pam-0.99/debian/checkpassword-pam.manpages
checkpassword-pam-0.99/debian/rules
checkpassword-pam-0.99/README
checkpassword-pam-0.99/Makefile.in
checkpassword-pam-0.99/configure
checkpassword-pam-0.99/AUTHORS
checkpassword-pam-0.99/COPYING
checkpassword-pam-0.99/ChangeLog
checkpassword-pam-0.99/INSTALL
checkpassword-pam-0.99/Makefile.am
checkpassword-pam-0.99/NEWS
checkpassword-pam-0.99/aclocal.m4
checkpassword-pam-0.99/checkpassword-pam.spec.in
checkpassword-pam-0.99/config.h.in
checkpassword-pam-0.99/configure.ac
checkpassword-pam-0.99/depcomp
checkpassword-pam-0.99/install-sh
checkpassword-pam-0.99/missing
checkpassword-pam-0.99/mkinstalldirs
checkpassword-pam-0.99/checkpassword-pam.c
checkpassword-pam-0.99/logging.h
checkpassword-pam-0.99/pam-support.h
checkpassword-pam-0.99/pam-support.c
checkpassword-pam-0.99/getopt.h
checkpassword-pam-0.99/getopt.c
checkpassword-pam-0.99/getopt1.c
checkpassword-pam-0.99/checkpassword-pam.8
checkpassword-pam-0.99/interface.html

root@ubuntu-sdp:/usr/tmp# cd checkpassword-pam-0.99
root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
checking for dlopen in -ldl... yes
checking for pam_start in -lpam... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating checkpassword-pam.spec
config.status: creating config.h
config.status: executing depfiles commands
root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99#

root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99# make
make  all-am
make[1]: Entering directory `/usr/tmp/checkpassword-pam-0.99'
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -MT checkpassword-pam.o -MD -MP -MF ".deps/checkpassword-pam.Tpo" \
          -c -o checkpassword-pam.o `test -f 'checkpassword-pam.c' || echo './'`checkpassword-pam.c; \
        then mv -f ".deps/checkpassword-pam.Tpo" ".deps/checkpassword-pam.Po"; \
        else rm -f ".deps/checkpassword-pam.Tpo"; exit 1; \
        fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -MT pam-support.o -MD -MP -MF ".deps/pam-support.Tpo" \
          -c -o pam-support.o `test -f 'pam-support.c' || echo './'`pam-support.c; \
        then mv -f ".deps/pam-support.Tpo" ".deps/pam-support.Po"; \
        else rm -f ".deps/pam-support.Tpo"; exit 1; \
        fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -MT getopt.o -MD -MP -MF ".deps/getopt.Tpo" \
          -c -o getopt.o `test -f 'getopt.c' || echo './'`getopt.c; \
        then mv -f ".deps/getopt.Tpo" ".deps/getopt.Po"; \
        else rm -f ".deps/getopt.Tpo"; exit 1; \
        fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -MT getopt1.o -MD -MP -MF ".deps/getopt1.Tpo" \
          -c -o getopt1.o `test -f 'getopt1.c' || echo './'`getopt1.c; \
        then mv -f ".deps/getopt1.Tpo" ".deps/getopt1.Po"; \
        else rm -f ".deps/getopt1.Tpo"; exit 1; \
        fi
gcc  -g -O2   -o checkpassword-pam  checkpassword-pam.o pam-support.o getopt.o getopt1.o  -lpam -ldl
make[1]: Leaving directory `/usr/tmp/checkpassword-pam-0.99'
root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99# make install
make[1]: Entering directory `/usr/tmp/checkpassword-pam-0.99'
/bin/bash ./mkinstalldirs /usr/local/bin
  /usr/bin/install -c checkpassword-pam /usr/local/bin/checkpassword-pam
/bin/bash ./mkinstalldirs /usr/local/man/man8
mkdir /usr/local/man/man8
 /usr/bin/install -c -m 644 ./checkpassword-pam.8 /usr/local/man/man8/checkpassword-pam.8
make[1]: Leaving directory `/usr/tmp/checkpassword-pam-0.99'
root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99#

root@ubuntu-sdp:/usr/tmp/checkpassword-pam-0.99# /var/qmail/bin/qmail-popup 127.0.0.1 /usr/local/bin/checkpassword-pam -s ssh
+OK <[email protected]>
user deepfuture
+OK
pass *********(这里输入你的密码)

认证成功

设置mysql登录用户及密码

root@ubuntu-sdp:/# nano /var/vpopmail/etc/vpopmail.mysql

  GNU nano 2.0.9                     File: /var/vpopmail/etc/vpopmail.mysql                                                 

# MYSQL CONNECTION SETTINGS FOR VPOPMAIL
#
# Line 1 defines the connection to use for database reads,
# Line 2 defines the connection to use for database updates/writes.
#
# If you omit line 2, then the same settings will be
# used for both read and write.
#
# settings for each line:
# host|port|user|password|database
#
127.0.0.1|0|root|mypass|vpopmail
#
# Note:
#   The value of host may be either a hostname or an IP address.
#   If host is 'localhost', then sockets (Unix) or named pipes (Windows)
#   will be used instead of TCP/IP to connect to the server.

增加域和用户

root@ubuntu-sdp:/# /var/vpopmail/bin/vadddomain deepfuture.imwork.net
Please enter password for postmaster:
enter password again:
root@ubuntu-sdp:/# /var/vpopmail/bin/vadduser liuxing
You did not use a full email address for the user name
Only full email addresses should be used
root@ubuntu-sdp:/# /var/vpopmail/bin/vadduser [email protected]
Please enter password for [email protected]:
enter password again:
root@ubuntu-sdp:/#

再次增加一个用户,然后删除

root@ubuntu-sdp:/# /var/vpopmail/bin/vadduser [email protected]
Please enter password for [email protected]:
enter password again:

删除用户

root@ubuntu-sdp:/# /var/vpopmail/bin/vdeluser [email protected]

验证用户认证是否成功

root@ubuntu-sdp:/# /var/qmail/bin/qmail-popup deepfuture.imwork.net /bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir
+OK <[email protected]>
user [email protected]
+OK
pass mypass

+OK
list
+OK
.
stat
+OK 0 0
quit
+OK

 

 root@ubuntu-sdp:/# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 deepfuture.imwork.net ESMTP
auth login
334 VXNlcm5hbWU6
bGl1eGluZ0BkZWVwZnV0dXJlLmltd29yay5uZXQ=([email protected]的base64码)
334 UGFzc3dvcmQ6

xxxxxxx(密码的base64码)

 加上默认域,这样以后增加用户名就不用加@及以后的东东了

root@ubuntu-sdp:/# nano /var/vpopmail/etc/defaultdomain

  GNU nano 2.0.9                      File: /var/vpopmail/etc/defaultdomain                                                 

deepfuture.imwork.net
root@ubuntu-sdp:/# nano /var/qmail/control/defaultdomain

  GNU nano 2.0.9                     File: /var/qmail/control/defaultdomain                                                 

deepfuture.imwork.net

增加 一个用户


root@ubuntu-sdp:/# /var/vpopmail/bin/vadduser lx
Please enter password for lx:
enter password again:
root@ubuntu-sdp:/#

我们就用liuxing用户来收发邮件,激动人心的时刻来了,终于可以收发邮件了

启动foxmail


ubuntu-qmail安装配置详解(step by step)(3)_第1张图片
 
ubuntu-qmail安装配置详解(step by step)(3)_第2张图片
 
ubuntu-qmail安装配置详解(step by step)(3)_第3张图片
 显然已经成功了

我们再用刚才增加 的lx用户试试

在foxmail修改成lx的邮箱信息,成功


ubuntu-qmail安装配置详解(step by step)(3)_第4张图片
 


ubuntu-qmail安装配置详解(step by step)(3)_第5张图片
 


ubuntu-qmail安装配置详解(step by step)(3)_第6张图片
 


ubuntu-qmail安装配置详解(step by step)(3)_第7张图片
 


ubuntu-qmail安装配置详解(step by step)(3)_第8张图片
 

 

你可能感兴趣的:(.net,Debian,gcc,ubuntu,C#)