MT6 webmail
install Mail Toaster index
jailmanage webmail mkdir -p /usr/local/www/data fetch -o /usr/local/www/data/index.html http://mail-toaster.com/install/mt6-index.txt
install PHP
pkg install -y php56 php56-fileinfo php56-mcrypt php56-exif php56-openssl cd /usr/local/etc && cp php.ini-production php.ini sed -i .bak -e 's/^;date.timezone =/date.timezone = America\/Los_Angeles/' php.ini grep -q php_fpm_enable /etc/rc.conf || echo 'php_fpm_enable=YES' >> /etc/rc.conf service php-fpm start
Install a HTTP server
Install and configure nginx, lighttpd or Apache.
Install webmail apps
install roundcube
pkg install -y roundcube perl5 cd /usr/local/www/roundcube/config cp config.inc.php.sample config.inc.php perl -pi -e "if (m/default_host/) { s/'localhost';/'127.0.0.8';/ }" config.inc.php perl -pi -e "if (m/smtp_server/) { s/'';/'tls:\/\/127.0.0.9';/ }" config.inc.php perl -pi -e 'if (m/^\$/ && m/db_dsnw/) { s/localhost/127.0.0.4/; }' config.inc.php perl -pi -e "if (m/smtp_port/) { s/25;/587;/ }" config.inc.php perl -pi -e "if (m/smtp_user/) { s/'';/'%u';/ }" config.inc.php perl -pi -e "if (m/smtp_pass/) { s/'';/'%p';/ }" config.inc.php cat << 'EO_RC_CONF' >> config.inc.php $config['log_driver'] = 'syslog'; $config['session_lifetime'] = 30; $config['enable_installer'] = true; $config['mime_types'] = '/usr/local/etc/mime.types'; $config['smtp_conn_options'] = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, ), ); EO_RC_CONF
Roundcube wants a mime.types file.
fetch -o /usr/local/etc/mime.types http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
Update the DSN for our MySQL connection, making sure to alter this command with your password.
perl -pi -e 'if (m/^\$/ && m/db_dsnw/) { s/pass/YOUR_PASS_HERE/ }' config.inc.php
Run roundcube installer
http://your.jailhost.com/roundcube/installer/
During Step 2 of the Roundcube install, click the button to initialize the database. After step 3, disable the installer:
perl -pi -e "if (m/enable_installer/) { s/true;/false;/ }" config.inc.php
Test roundcube in browser
http://your.jail.host/roundcube/
You should be able to hit the roundcube page, login with postmaster@[yourdomain], and see the test email you sent with swaks. Compose a new message and send it, making sure outbound works.
Roundcube Plugins
Optional plugins to customize Roundcube with:
optionally with SQLite
pkg install php5-pdo_sqlite
sed -i .bak -e '/ / /' db.inc.php
cd /usr/ports/databases/php5-sqlite3 && make install clean
sqlite3 /var/db/roundcube/email.db < /usr/local/www/roundcube/SQL/sqlite.initial.sql
install squirrelmail
Optionally, install squirrelmail