Contact HowTo

Wonderful
SMTP Server

Download (Debian)

How to install

Download and setup breakermindsmtp server (Debian 8, 9)


# Login as root user
su

# go to root folder
cd

# download zip file
wget https://breakermind.github.io/breakermindsmtp.zip

Install LAMP with mysql database

# install packages
apt-get update
apt-get install apache2 php php-mysql php-gd php-mcrypt php-mbstring mysql-server openssl unzip wget

# Set password for root user 'toor' (default in breakermindsmtp server settings files)
mysql_secure_installation

Create mysql users

# login to mysql server from terminal
mysql -u root -p
use mysql

# Show root users
SELECT host, user, password FROM user WHERE user = 'root';

# mysql allow mysql root user access to all databases
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'toor';
GRANT ALL PRIVILEGES ON *.* TO 'root'@127.0.0.1 IDENTIFIED BY 'toor';
FLUSH PRIVILEGES;

Configure php

# Enable php extension in /etc/php/php.ini or /etc/php/7.0/apache2/php.ini
extension=php_mbstring.dll
extension=php_pdo_mysql.dll
extension=php_openssl.dll

# restart apache
/etc/init.d/apache2 restart
systemctl restart apache2
service apache2 restart

Unpack server files

# unzip
unzip breakermindsmtp.zip

# Copy C++ library files
cd breakermindsmtp
cp library/* /usr/lib

# Create mysql database from file
mysql -u root -p < mysql/breakermindsmtp.sql

Copy WebClient to apache server folder

# Copy breakermindsmtp server webclient
cp webclient /var/www/html

# Add permission
chown -R www-data:www-data /var/www/html
chmod -R 555 /var/www/html

# webclient/media and webclient/ckeditor/media (Allow write files, images) chmod 755 /var/www/html/webclient
chmod -R 755 /var/www/html/webclient/files
chmod -R 755 /var/www/html/webclient/media
chmod 755 /var/www/html/webclient/ckeditor
chmod -R 755 /var/www/html/webclient/ckeditor/media

# and files in folder # chmod 644 /var/www/html/webclient/media/*
# chmod 644 /var/www/html/webclient/ckeditor/media/*

Run breakermindsmtp server

# Run breakermindsmtp server in background logs to file nohup.out
chmod u+x breakermindsmtp
nohup ./breakermindsmtp &

Show logs for breakermindsmtp server

# Show smtp server logs
cat nohup.out
tail -f nohup.out

Login to webclient panel and change admin password in settings

# Admin Panel
https://localhost/webclient
# Administrator username
admin@local.host
# Password
pass

Smtp server and webclient settings files

# Admin Panel
webclient/config.php

# Breakermindsmtp server config
breakermindsmtp/settings.cnf

SSL/TLS certificates

# Add ssl certificate to certificate folder (Private key without password)
# Public certs and chains in .pem format
certificate.pem
# Private key
private.key

# You can use free certificates from
https://sslforfree.com

SMS API

# If you need send sms passwords you need create account on
https://www.smsapi.pl

# And add login, password and change settings in config file
webclient/config.php

DNS Settings

# You need to add TXT (SPF) record to your domain dns
domain.com. TXT "v=spf1 a mx ptr:domain.com ip4:1.2.3.4 -all"

# Set revers dns to server ip (ask server or vps provider)
# if you need sign messages add dkim key from webclient (login to admin user admin@local.host)