快速业务通道

搭建Linux下邮件服务器(extmail postfix clamav)

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-06
asl_security_options = noanonymous
broken_sasl_auth_clients = yes


smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname
复制extman/docs 目录的cf 文件到/etc/postfix
[root@localhost postfix]# cp /root/extman-0.2.5b1/docs/mysql_virtual_* .
并修改这些配置文件的用户名为root,密码为uusql#2010
[root@localhost postfix]# service postfix start


7、安装maildrop

A、创建安装maildrop rpm
[root@localhost SPECS]# yum -y install pcre-devel

Empire CMS,phome.net

[root@localhost i386]# rpm -ivh maildrop-2.0.4-1.i386.rpm

B、添加虚似用户及创建目录
[root@localhost i386]# cd
[root@localhost ~]# groupadd -g 1000 vgroup
[root@localhost ~]# 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}

C、创建邮件存储目录
[root@localhost ~]# mkdir -p /home/data/domains/extmail.org/postmaster
[root@localhost ~]# maildirmake /home/data/domains/extmail.org/postmaster/Maildir
[root@localhost ~]# chown -R vuser:vgroup /home/data/domains/

D、测试maildrop
[root@localhost ~]# echo "test" | maildrop -V 10 -d postmaster@extmail.org
maildrop: authlib: groupid=1000
maildrop: authlib: userid=1000
maildrop: authlib: logname=postmaster@extmail.org, 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 sender=postmaster@extmail.org
maildrop: Attempting .mailfilter
maildrop: Delivery complete.
出现上以信息说明authlib,maildrop 工作正常


E、测试pop3
[root@localhost ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is ''^]''.
OK Hello there.
user postmaster@extmail.org
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.

Empire CMS,phome.net

test
.
quit
OK Bye-bye.
Connection closed by foreign host.

F、测试postfix
[root@localhost ~]# perl -MMIME::Base64 -e ''print encode_base64("postmaster@extmail.org");''
cG9zdG1hc3RlckBleHRtYWlsLm9yZw==
[root@localhost ~]# perl -MMIME::Base64 -e ''print encode_base64("extmail");''
ZXh0bWFpbA==
[root@localhost ~]# service postfix restart (重启一下)
[root@localhost ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is ''^]''.
220 uucun.lan ESMTP Mail System
ehlo test.com
250-mail.uucun.lan
250-PIPELINING
250-SIZE 14680064
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号