Postfix, Dovecot, Roundcube Setup

Some Links to setting up an Email Server on Ubuntu 14:

http://wiki.vpsget.com/index.php/Dovecot_/postfix_with_Roundcube_WebUI

Setup mail server on ubuntu 14.04 ( Postfix – dovecot )

How to Setup a Complete Mail Server (Postfix) using ‘SquirrelMail’ (Webmail) on Ubuntu/Debian


https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04
https://www.linode.com/docs/email/clients/install-roundcube-on-ubuntu-14-04
Unixmen – https://www.unixmen.com/install-configure-roundcube-webmail-ubuntu/

Useful command:


sudo dpkg-reconfigure postfix

Set up roundcube conf file:


sudo wget https://linode.com/docs/assets/apache2-roundcube.sample.conf

SMTP Error -1 Connection to server failed on Roundcube

Issue: Please server with postfix and roundcube

Pots changed for SMTP mail.

Edit the roundcube config:

 /usr/share/psa-roundcube/config

Check that the config is correct:

SMTP server host

// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$rcmail_config['smtp_server'] = 'smtp.domain.com';

Port

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$rcmail_config['smtp_port'] = 9025;