Complete Virtual Mail Server/POP3

From Gentoo Wiki
Jump to:navigation Jump to:search
This page contains changes which are not marked for translation.


Note
This article is part of the Complete Virtual Mail Server series, and may require previous parts to have been read or followed.

This guide will configure a mail server to use POP3 instead of IMAP.

Warning
POP3 is an old protocol without many features that are considered vital for modern mail systems. It is HEAVILY DISCOURAGED to use POP3. By proceeding, please make sure to fully understand the consequences of this choice.
Note
POP3 and IMAP can NOT coexist on one server without the threat of losing mail. Many POP3 clients delete mail after downloading it by default, which interferes with the operation of IMAP. Please choose one of them.

Courier-IMAP to Database

Note
Please follow Complete_Virtual_Mail_Server/Courier-IMAP_to_Database until arriving at sections "Configuring/Testing IMAP". These should be substituted with the following sections.

Configuring 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 unwittingly remove all messages that were supposed to be stored on the server for imap usage, then incorrectly configure their mail client and purge the server of their mailbox if configured this way!

FILE /etc/courier-imap/pop3dEnable pop3
##NAME: POP3DSTART:0
POP3DSTART=YES

Testing POP3

Courier-pop3d should be started:

root #/etc/init.d/courier-pop3d start

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

user $telnet foo.example.com 110
+OK Hello there.
user testuser
+OK Password required
Pass secret
+OK logged in
Note
This is the first time the password is used in plain text. It was previously only known as $1$16117118$ajxN3QRilmP5zLVHjTkE31.
Warning
Remember to prepare the user maildir with the courier-maildirmake tool.

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

root #rc-update add courier-pop3d default

SSL Certificates

FILE /etc/courier-imap/pop3d-sslConfigure certificate
##NAME: POP3DSSLSTART:0
POP3DSSLSTART=YES
 
##NAME: TLS_CERTFILE:0
TLS_CERTFILE=/etc/ssl/courier-imap/foo.example.com.pem

Starting this server should allow pop3 to work through SSL:

root #/etc/init.d/courier-pop3d-ssl restart