Ubuntu Postfix Mail Server Enabling POP3/IMAP Authentication
Hi! The Tutorial shows you Step-by-Step How to Install Courier Packages to Enable POP3/IMAP eMail Clients Authentication on a Postfix Mail Server for Ubuntu 15.04 Vivid Vervet i386/amd64 GNU+Linux.
Postfix Mail Transfer Agent Receives emails via the SMTP protocol and delivers them to different places on your hard disk.
Courier is another standalone Mail Server just like Postfix but with Good Components to Allow POP3/IMAP Users Access to the mailboxes.
-
Open a Shell Session
Ctrl+Alt+t on Desktop
(Press “Enter” to Execute Commands)In case first see: Terminal QuickStart Guide.
-
Installing Courier IMAP/POP3 Auth Packages.
sudo apt-get install fam courier-pop-ssl courier-imap-ssl courier-ssl courier-pop courier-imap courier-base courier-authlib-mysql
If Got “User is Not in Sudoers file” then see: How to Enable sudo
Normally answer “No” to the Create Directory Question:
(Use Tab to Switch & Space-Bar to Select then Enter Only to Confirm!)
You’ll see Notice about the Self-Signed SSL Certificates Generation for Secure POP3/IMAP:
The pop3d.pem & imapd.pem Certificates are Stored for further Utilization under the /etc/courier Directory.
For Production use, the X.509 Certificate Must be Signed by a recognized certificate Authority, in order for mail clients to accept the certificate. -
How to Enable Postfix with MySQL Backend Management.
-
Enabling Courier IMAP Connection with MySQL Support.
sudo nano /etc/courier/authdaemonrc
Change:
authmodulelist="authmysql"
And also:
DEBUG_LOGIN=2
To save time Debugging with Passwords tailing on /var/log/mail*…
Ctrl+x to Save & Exit from nano Editor :)Then Edit the MySQL Authentication Config File like:
sudo nano /etc/courier/authmysqlrc
It should Include these Entries:
MYSQL_SERVER 127.0.0.1 MYSQL_USERNAME postfixadmin MYSQL_PASSWORD [posfixadminMySqlPass] MYSQL_DATABASE postfixadmin MYSQL_USER_TABLE mailbox MYSQL_LOGIN_FIELD username MYSQL_NAME_FIELD name MYSQL_CRYPT_PWFIELD password #MYSQL_CLEAR_PWFIELD password MYSQL_MAILDIR_FIELD maildir MYSQL_QUOTA_FIELD concat(quota,'S') MYSQL_HOME_FIELD '/home/vmail' MYSQL_UID_FIELD '5000' MYSQL_GID_FIELD '5000'
Use Ctrl+w to Search on nano…
Change the ‘posfixadminMySqlPass’!Last Restart the Courier Service with:
sudo su -c "service courier-authdaemon restart; /etc/init.d/courier-imap restart; /etc/init.d/courier-pop restart"
Possibly Check Logs with:
sudo tail -f /var/log/mail*
-
Finally, Configure Postfix to Use SASL
sudo usermod -G sasl postfix
-
How to Manage a Multi-Domain Mail Server with PostfixAdmin.