蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 网络通讯


    

蓝森林 http://www.lslnet.com 2006年7月26日 13:28

!!!着急请教RHEL4中cyrus-imap的具体配置!!!

各位好,最近几天因为公司需要一个RHEL4的sendmail服务器,搭建好之后,需要安装imap,结果发现以前在rh9.0中的imap包在RHEL4中变成了cyrus-imap包,安装之后,想按照以前在rh9.0中的方法配置,肯定是不对了。而且,cyrus-imap还需要认证的库,好像是sasl,反正我搞来搞去始终不对。郁闷死了,公司正急需!!!
有哪位高手,配置过cyrus-imap阿,可否详细告知如何配置阿,真的很着急啊。还请大家自己做一下实验,看看如何是好,谢谢了!!!


Re: !!!着急请教RHEL4中cyrus-imap的具体配置!!!


http://kbase.redhat.com/faq/FAQ_79_5254.shtm


Issue:
How do you setup cyrus for POP3 to work with Sendmail with Red Hat Enterprise Linux 4?
Resolution:

All of the command provided are required to run locally. We recommend that you back-up any files that you will edit, before editing them. For example, us the cp (copy) command to save an instance of the file before you edit:

cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.bak

To begin, first run:

service saslauthd status
service cyrus-imapd status
service sendmail status

To setup cyrus, leave /etc/imapd.conf as default from the RPM package. For /etc/cyrus.conf leave as default except for the following:

# UNIX sockets start with a slash and are put into /var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
# imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
# pop3s cmd="pop3d -s" listen="pop3s" prefork=1
# sieve cmd="timsieved" listen="sieve" prefork=0

# these are only necessary if receiving/exporting usenet via NNTP
# nntp cmd="nntpd" listen="nntp" prefork=3
# nntps cmd="nntpd -s" listen="nntps" prefork=1

# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp" prefork=1

# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify" proto="udp" prefork=1
}

Note: You will need imap even if you are not planning on running an imap server.

Next, set the password for cyrus:

passwd cyrus

Set the saslauthd password:

saslpasswd -c cyrus

su to the cyrus user and execute:

/usr/lib/cyrus-imapd/mkimap

Add a user with both passwords:

useradd testuser
saslpasswd -c testuser

Now restart or start the services and turn them on to start at boot time:

service saslauthd restart
service cyrus-imapd restart
service sendmail restart
service xinetd restart
chkconfig saslauthd on
chkconfig cyrus-imapd on
chkconfig sendmail on

You might need to reboot to allow cyrus to take ownership of the port.

Login in as cyrus to cyrus-imap:

cyradm --user cyrus localhost

You can type help for more information. The prompt should also change:

localhost.localdomain> help

Now make the users mailbox. Note the "user." must come before the username:

localhost.localdomain> cm user.testuser

You can now exit:

localhost.localdomain> quit

You can now test the user:

telnet localhost 110
the login:
user testuser
pass test
You should see:
+OK Name is a valid mailbox
+OK Mailbox locked and ready

You now have cyrus working correctly. The mail box should show up:


/var/spool/imap/t/user/

You will now need to set Sendmail up to receive mail and send it to cyrus. Edit the configuration file /etc/mail/sendmail.mc and add this line to the bottom:

dnl MAILER(smtp)dnl
dnl MAILER(procmail)dnl
define(`confLOCAL_MAILER', `cyrus')
MAILER(`cyrus')

If you want Sendmail to be able to receive mail from other places then itself, change this line from:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

to

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Next, execute:

# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

You will then need to restart Sendmail:

service sendmail restart

You can test, by doing:

# mail testuser@localhost
Subject: test
test
.
#make sure you put the “.” at the end of the email.

The mail should show up in: /var/spool/imap/t/user/testuser/ and you should be able to check it with any local POP3 client.



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com