文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>postfix + cyrus-sasl+ dovecot 配置简单邮件系统

postfix + cyrus-sasl+ dovecot 配置简单邮件系统

时间:2006-12-05  来源:wsshun

软件环境: redhat AS4U2   0、DNS
E:\>nslookup
*** Can't find server name for address 192.168.1.1: Non-existent domain
*** Default servers are not available
Default Server:  UnKnown
Address:  192.168.1.1
> server <DNS Server IP> > ls -t all test.com  test.com.                     MX     10   mail.test.com
 mail                           A     <Mail Server IP>
  1、cyrus-sasl #rpm -qa | grep cyrus-sasl cyrus-sasl-2.1.19-5.EL4   #cd /usr/lib/sasl2 # echo 'pwcheck_method: saslauthd' > smtpd.conf
# echo 'mech_list:plain login' >> smtpd.conf
# service saslauthd start   Test: #/usr/sbin/testsaslauthd -u <username> -p '<passwd>' 0:OK "Sucess"   2、dovecot #rpm -qa | grep dovecot dovecot-0.99.11-2.EL4.1   # vi /etc/dovecot.conf
protocols = imap imaps pop3 pop3s
#imap_listen = [::]
#pop3_listen = [::]
login = imap login = pop3
default_mail_env = maildir:/home/%u/Maildir
auth = default
auth_mechanisms = plain
auth_userdb = passwd
auth_passdb = pam
auth_user = root
  Test: #telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK dovecot ready.
user <username>
+OK
pass <passwd>
+OK Logged in.
  3、postfix-2.x # rpm -qa |grep postfix
postfix-2.1.5-4.2.RHEL4
  # vi /etc/postfix/main.cf myhostname = mail.test.com
mydomain = test.com
myorigin = $mydomain
  #inet_interfaces = localhost
inet_interfaces = all
  mydestination = $myhostname, localhost.$mydomain, $mydomain   mynetworks = 192.168.1.0/24, 127.0.0.0/8   relay_domains = $mydestination   alias_database = hash:/etc/aliases   #home_mailbox = Mailbox
home_mailbox = Maildir/

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_unauth_destination,
  reject_rbl_client cblless.anti-spam.org.cn
#content_filter = smtp-amavis:[127.0.0.1]:10024 message_size_limit = 15000000
mailbox_size_limit = 100000000
  #service postfix restart   Test: 220 mail.test.com ESMTP Postfix
ehlo test.com
250-mail.test.com
250-PIPELINING
250-SIZE 15000000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250 8BITMIME
auth login
334 VXNlcm5hbWU6
<username base64 code>
334 UGFzc3dvcmQ6
<passwd base64 code>
235 Authentication successful
mail from: <username>@test.com
250 Ok
rcpt to: <username>@msn.com
250 Ok
data
354 Please start mail input.
mail test from new mail server
.
250 Mail queued for delivery.
  4、create mail user #useradd -g users <username> #passwd <username> #mkdir /home/<username>/Maildir #mkdir /home/<username>/Maildir/new #mkdir /home/<username>/Maildir/cur #mkdir /home/<username>/Maildir/tmp #chown -R <username>.users /home/<username>/Maildir #chmod -R 700 /home<username>/Maildir
相关阅读 更多 +
排行榜 更多 +
风度

风度

游戏工具 下载
大姨妈月经提醒

大姨妈月经提醒

健康医疗 下载
海岸线小说网

海岸线小说网

浏览阅读 下载