WEB开发网
开发学院操作系统CentOS CentOS下载生成RPM与创建maildrop rpm 阅读

CentOS下载生成RPM与创建maildrop rpm

 2010-05-27 23:10:27 来源:WEB开发网   
核心提示:经过长时间学习CentOS安装maildrop,你可能会遇到CentOS安装maildrop下载问题,CentOS下载生成RPM与创建maildrop rpm,这里将介绍CentOS安装maildrop问题的解决方法,他的缩写既是CentOS,操作系统CentOS安装maildrop,A、CentOS安装maildro

经过长时间学习CentOS安装maildrop,你可能会遇到CentOS安装maildrop下载问题,这里将介绍CentOS安装maildrop问题的解决方法,他的缩写既是CentOS。CentOS社区将Redhat的网站上的所有源代码下载下来,进行重新编译。操作系统CentOS安装maildrop。

A、CentOS安装maildrop下载生成RPM
[[email protected] postfix]# cd
[[email protected] ~]# wget http://prdownloads.sourceforge.net/courier/maildrop-2.0.4.tar.bz2
[[email protected] ~]# cp maildrop-2.0.4.tar.bz2 $SOURCE
[[email protected] ~]# tar xjf maildrop-2.0.4.tar.bz2
[[email protected] ~]# cd maildrop-2.0.4
[[email protected] maildrop-2.0.4]# cp maildrop.spec $SPEC
[[email protected] maildrop-2.0.4]# cd $SPEC

CentOS安装编辑maildrop.spec 把下面:
BuildRequires: /usr/include/fam.h gdbm-devel pcre-devel
改为:
BuildRequires:  gdbm-devel pcre-devel
把下面:
%configure --with-devel --enable-userdb --enable-maildirquota  \
--enable-syslog=1 --enable-trusted-users='root mail daemon postmaster qmaild mmdf' \
--enable-restrict-trusted=0 \
--enable-sendmail=/usr/sbin/sendmail
改为:
%configure --with-devel --enable-userdb --enable-maildirquota \
--enable-syslog=1 --enable-trusted-users='root mail daemon postmaster qmaild mmdf' \
--enable-restrict-trusted=0 --enable-sendmail=/usr/sbin/sendmail \
--enable-authlib

B、CentOS安装创建maildrop rpm
[[email protected] SPECS]# yum -y install pcre-devel
[[email protected] SPECS]# rpmbuild -bb maildrop.spec
[[email protected] SPECS]# cd $RPMS/i386
[[email protected] i386]# rpm -ivh maildrop-2.0.4-1.i386.rpm

C、CentOS安装添加虚似用户及创建目录
[[email protected] i386]# cd
[[email protected] ~]# groupadd -g 1000 vgroup
[[email protected] ~]# useradd -g 1000 -u 1000 -s /sbin/nologin -d /dev/null vuser
编辑/etc/postfix/master.cf ,加入下面的内容:
maildrop unix -   n   n   -   -   pipe
flags=DRhu user=vuser argv=/usr/bin/maildrop -d ${user}@${nexthop} ${recipient} ${user} ${extension} ${nexthop}

D、CentOS安装创建邮件存储目录
[[email protected] ~]# mkdir -p /home/data/domains/extmail.org/postmaster
[[email protected] ~]# maildirmake /home/data/domains/extmail.org/postmaster/Maildir
[[email protected] ~]# chown -R vuser:vgroup /home/data/domains/  

E、CentOS安装测试maildrop
[[email protected] ~]# echo "test" | maildrop -V 10 -d [email protected]
maildrop: authlib: groupid=1000
maildrop: authlib: userid=1000
maildrop: authlib: [email protected], home=/home/data/domains/extmail.org/postmaster, mail=/home/data/domains/extmail.org/postmaster/Maildir/
maildrop: Changing to /home/data/domains/extmail.org/postmaster
Message start at 0 bytes, envelope [email protected]
maildrop: Attempting .mailfilter
maildrop: Delivery complete.
出现上以信息说明authlib,maildrop 工作正常

F、CentOS安装测试pop3
[[email protected] ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Hello there.
user [email protected]
+OK Password required.
pass extmail
+OK logged in.
list
+OK POP3 clients that break here, they violate STD53.
1 6
.
retr 1
+OK 6 octets follow.
test
.
quit
+OK Bye-bye.
Connection closed by foreign host.

G、CentOS安装测试postfix
[[email protected] ~]# perl -MMIME::Base64 -e 'print encode_base64("postmaster\@extmail.org");'
cG9zdG1hc3RlckBleHRtYWlsLm9yZw==
[[email protected] ~]# perl -MMIME::Base64 -e 'print encode_base64("extmail");'        
ZXh0bWFpbA==
[[email protected] ~]# service postfix restart (重启一下)
[[email protected] ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 yiyou.org ESMTP Mail System
ehlo test.com
250-mail.yiyou.org
250-PIPELINING
250-SIZE 14680064
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
cG9zdG1hc3RlckBleHRtYWlsLm9yZw==
334 UGFzc3dvcmQ6
ZXh0bWFpbA==
235 2.7.0 Authentication successful
quit
221 2.0.0 Bye
Connection closed by foreign host

Tags:CentOS 下载 生成

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接