Complete Virtual Mail Server/Courier-IMAP to Database/ko

도입부
Courier-IMAP will be used to provide both IMAP and POP3 services. Many will be interested in IMAP as POP3 is not being used as much anymore. This is quite understandable as IMAP has many advantages.

The major difference between POP3 and IMAP would be that IMAP keeps messages on the server whereas with POP3, the client retrieves the messages and are then gone from the server. Having the messages kept on server allows for several clients to actively work with the same mailbox from different locations. The most basic example would be webmail and a desktop client, both accessing the same mailbox at the same time. Also in general, webmail clients strongly favor IMAP. The price this comes with of course, is primarily disk space and processing power on the mail server. With disk space being as cheap as it is these days, 32Gb set aside pure for e-mail offers a lot of space for mails, at hardly any cost. And if processing power is an issue, server-side based searches can be disabled to reduce the stress on the machine.

This chapter will mainly focus on IMAP, but will include POP3 for completeness sake. Some research into the two protocols may be required if the choice is not so certain.

Courier-IMAP 설치
has a few USE flags that need to be examined. is an important dependency as it is responsible for how users authenticate, so it's USE flags are examined aswell.

원하는 데이터베이스 백엔드만 선택하십시오.

적당한 USE 플래그를 설정하고 나면 courier-imap을 courier-authlib에 이머징하여 끌어와야합니다:

Postgres
Courier-authlib을 루트 권한으로 실행하여 기본적인 소켓 접근 권한을 가져옵니다.

If logins are used in the syntax of  instead of , the value of   needs to be changed from   to.

To use more advanced authentication SQL statements the  can be used. Courier-authlib will ignore any of the previous set parameters for statements, but will use them for counting the number of accounts or for changing the password and thus when changing the password the username field is still used. If authentication is done against username remember that usernames need to be unique.

MySQL
Next reconfigure the authentication to use the mailsql database in courier-imap and postfix. In all of the following examples, replace  with the password set for the mailsql mysql user.

Reload the necessary services:

authdaemon 설정
Authdaemon is actually responsible for doing the authentication. Here authdaemon is configured to use the right database backend. Portage actually does set the  variable properly. Verify this in the configuration file. Also enable debugging here as this will help with any potential issues later.

접근 권한
Permissions must be set correctly, as the files can contain sensitive password information.

courier-authlib 시험
Courier-authlib includes a simple testing utility. It requires a valid username as parameter. Don't hesitate to check out the manual page for more information. It is short but concise.

To perform some basic tests start the authlib daemon:

testuser로 를 실행하십시오:

POP3
POP3 requires little configuring to get working. It is however recommended to skip this section and not enable/use pop3 and thus leave this setting at NO. A user may be able to remove all messages that were supposed to be stored on the server for imap usage, then incorrectly configure his mail client and purge the server of his mailbox this way.

IMAP
IMAP has a few capabilities that can be enabled.


 * to allow server side searching through messages.
 * to allow 'push' like connections.

Some clients need a minimum DH parameter length of 2048 bits (such as those using >=dev-libs/nss-3.19.1). Generate one with:

다음 Courier에서 이 파일을 사용하는지 확인하십시오:

POP3
Courier-pop3d를 시작해야합니다:

Once started, telnet could be used to identify initial problems. Once logging in with telnet works, a mail client can be used:

If testing works properly, add courier-pop3d to the default runlevel:

IMAP
Courier-imapd를 시작해야합니다:

Once started, telnet could be used to identify initial problems. Once logging in with telnet works, a mail client can be used:

시험 동작이 정상이라면 courier-imap을 기본 런레벨에 추가하십시오:

Wrapping things up
Turn off debugging if this stage works properly.