个人工具

Courier

来自Ubuntu中文

跳转至: 导航, 搜索

Courier 简介

原文出处:https://wiki.ubuntu.com/Courier

原文作者:UbuntuWiki

授权许可:

翻译人员:isone

校正人员:purewind

贡献人员:

适用版本: 文章状态:翻译完成



引言

Courier is one of the most known mail delivery agent. It only supports Maildir mailboxes and can be integrated with external databases (LDAP, MySQL, etc.).

Courier是知名邮件发送代理程序之一。它只支持Maildir格式的邮箱,并能与外部数据库相集成(LDAP, MySQL等)。

You will find a complete description on how to setup a virtual Postfix + Courier mail system on PostfixCompleteVirtualMailSystemHowto.

您可以在PostfixCompleteVirtualMailSystemHowto找到一个关于如何安装虚拟Postfix+Courier邮件系统的完整描述。

In this howto, a basic Courier installation will be described: it will deliver mail to local existing users, mailbox will be situated in home directory. User accounts can be on an NFS file system (this is on of the advantage of Courier).

本文中描述了Courier的基本安装,实现转发邮件到本地存在的用户,邮箱设置在主文件夹下。值得注意的是,Courier支持NFS文件系统中的用户帐号(这也是Courier的一大优势)。

安装

For installing courier, install the following packages: courier-imap courier-imap-ssl (see InstallingSoftware)

安装Courier需要安装的包有: courier-imapcourier-imap-ssl (参见 InstallingSoftware)。

If you want pop3 support, alse install courier-pop and courier-pop-ssl packages.

如果您想支持POP3,需要安装 courier-popcourier-pop-ssl

配置

The configuration options are all located in /etc/courier/imapd for imap daemon and in /etc/courier/imapd-ssl for imap-ssl daemon. For a first installation, the default options perfectly match most of the needs. So no modification will be done.

所有的配置选项在 /etc/courier/imapd/etc/courier/imapd-ssl ,前者用于配置imap后台程序,后者用于配置imap-ssl后台程序。 如果您是首次安装,缺省的配置就能很好的满足您的大多数需要,不用做任何修改。

认证

Courier authenticated on PAM out of the box.

Courier的认证使用PAM,不需要任何配置即可使用。

邮件目录设置

Basicaly, Maildir forlders are located in the user home directory. That's a good idea to create Maildir for future users:

通常,邮件目录设置在用户的主文件夹下。这样可以方便以后新增用户时邮件目录的创建:

maildirmake /etc/skel/Maildir
maildirmake /etc/skel/Maildir/.Drafts
maildirmake /etc/skel/Maildir/.Sent
maildirmake /etc/skel/Maildir/.Trash
maildirmake /etc/skel/Maildir/.Templates

Then, for an existent user:

那么对于现存的用户:

cp -r /etc/skel/Maildir /home/myuser/
chown -R myuser:usergroup /home/myuser/Maildir
chmod -R 700 /home/myuser/Maildir

测试

You can easily test that your rescent installation is working:

您可容易地测试安装之后的程序是否能正常工作:

telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.
imap login user password
imap OK LOGIN Ok.

Where user and passord are local accounts with a Maildir directory. If it does not work you will get an error message, and do not forget to check /var/log/mail.log

其中userpassword是具有邮件目录的本地账户。如果无法工作,您将会看到错误提示信息,也别忘了查看日志信息 /var/log/mail.log

管理和维护

Administering a Courier IMAP/POP mail server does not really require some specific administration tasks. For each user connecting correspond a process of the system (in fact a process per Maildir directory open). For backup, only backing up user accounts (as usual ;-)) is necessary.

管理Courier的IMAP/POP邮件服务器无需额外的工作。每一个连接的用户对应系统的一个进程(实际是每一个打开的邮件目录对应一个进程)。如考虑备份,那么通常只要备份用户的帐户信息即可。