Ruby On Rails CMS Framework
Build CMS , e-commerce , blog , events ,app , API ... with ruby on rails framework

Intro


Ruby Rails CMS is a free to use, open source based ruby on rails framework. Ruby Rails CMS help quick make website with customization unlimited, Strong, Stable, Native web, Pure MVC, Clean structure + Easy setup server with rubyra script, multi-OS, maintain and extend easy.

Setup server Ruby On Rails


Create server.

Need fresh VPS from exam ( Vultr ,Linenode, Digital Ocean , Virmach , Amazon EC2, azure ..)

Recommend way (Nginx + RVM) Rails & Ruby lastest version

Login VPS SSH with root to start setup Ruby On Rails



Wizard Auto Setup Ruby On Rails (CentOS & Ubuntu) (Video)

curl -O https://rubyra.com/scripts/install && bash install





Custom Install CentOS 7

yum update -y && yum -y install cronie unzip zip sudo which nano openssl ntpdate && yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel -y && yum install -y ImageMagick ImageMagick-devel && yum install mysql-devel -y && yum install git -y && git config --global user.name "ruby rails git" && git config --global user.email "ruby@localhost" && git config --list && yum install epel-release -y && yum remove httpd -y && yum install nginx -y && systemctl start nginx.service && systemctl enable nginx.service && yum install nodejs -y && yum install nodejs -y && command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - && curl -L get.rvm.io | bash -s stable && source /etc/profile.d/rvm.sh && rvm reload && rvm requirements run && rvm install ruby 2.7 && rvm use ruby 2.7 --default && ruby -v && yum install iptables-services -y && gem install bundler && gem install rails --no-document && gem install rmagick && gem install mysql2 && yum update -y && ruby -v && rails -v
systemctl start iptables.service
iptables -I INPUT -p tcp -m multiport --dport 80,443,3306,25,465,587,5432 -j ACCEPT
service iptables save
systemctl restart iptables.service
systemctl enable iptables
systemctl mask firewalld
useradd ruby
passwd ruby


Auto start when boot or reboot server

vi /etc/rc.d/rc.local (add value)
su - ruby && /home/ruby/.bash_profile
chmod +x /etc/rc.d/rc.local
Login with user edit file : .bash_profile
add value rails start server

Auto Renew SSL

Add cronjob: crontab -e
0 1 1 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
0 1 15 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
(Run 01:00 on the 1st & 15th of every month)
Save and recheck cronjob: crontab -l

Setup SSL free (point domain before setup)

yum update -y && yum -y install git && sudo yum install epel-release -y && sudo yum install certbot-nginx -y && sudo yum install nginx -y && sudo systemctl start nginx && systemctl stop nginx.service && systemctl start nginx.service && systemctl enable nginx.service

Renew SSL

 service nginx stop && certbot renew && service nginx start

Add more website

service nginx stop && sudo certbot --nginx -d domain.com && service nginx start

Setup MariaBD 10.x (Mysql)

echo "[mariadb]" >> /etc/yum.repos.d/MariaDB.repo && echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo && echo "baseurl = http://yum.mariadb.org/10.3/centos7-amd64" >> /etc/yum.repos.d/MariaDB.repo && echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo && echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo && yum install -y mariadb mariadb-server MariaDB-client && yum install MariaDB-shared -y && service mysql start && chkconfig --levels 235 mariadb on && /usr/bin/mysql_secure_installation

Create database and remote connect

mysql -p
create database db_name COLLATE utf8_general_ci;
grant all privileges on db_name.* to 'db_user'@'%' identified by "db_password";
flush privileges;
exit;


Setup PostgreSQL 10.x

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && yum install postgresql10 -y && yum install postgresql10-server postgresql10-devel postgresql10-contrib -y && /usr/pgsql-10/bin/postgresql-10-setup initdb && yum install postgresql10-devel -y && systemctl enable postgresql-10 && mv /usr/bin/psql /usr/bin/psql-old && ln -s  /usr/pgsql*/bin/psql /usr/bin/psql && export PATH="/usr/pgsql-*/bin:$PATH" && ln -s /usr/pgsql-*/bin/p* /usr/local/bin && systemctl enable postgresql-10.service && systemctl start postgresql-10 && systemctl status postgresql-10 && yum install iptables-services -y

systemctl start iptables.service
iptables -I INPUT -p tcp -m multiport --dport 5432 -j ACCEPT
service iptables save
systemctl restart iptables.service
sudo passwd postgres

Create PostgreSQL database

sudo -u postgres psql
if set pass psql ( type: \password postgres )
create database database_name;
create user username_db with encrypted password 'db_password';
grant all privileges on database database_name to username_db;
\q 
sudo systemctl restart postgresql-10 
Remote connect
vi /var/lib/pgsql/*/data/pg_hba.conf (add last file and change indent to md5) 
host    database_name             username_db              0.0.0.0/0              md5
host    database_name             username_db              ::/0                   md5
host    database_name             username_db             127.0.0.1/32            md5
host    database_name             username_db             ::1/128                 md5
vi /var/lib/pgsql/*/data/postgresql.conf (add last file or change)
listen_addresses = '*' 

Custom Install CentOS 6

yum update -y && yum -y install cronie unzip zip sudo which nano openssl ntpdate && yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel -y && yum install -y ImageMagick ImageMagick-devel && yum install mysql-devel -y && yum install git -y && git config --global user.name "ruby rails git" && git config --global user.email "ruby@localhost" && git config --list && yum install epel-release -y && yum remove httpd -y && yum install nginx -y && chkconfig --add nginx && chkconfig --levels 235 nginx on && yum install nodejs -y && command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - && curl -L get.rvm.io | bash -s stable && source /etc/profile.d/rvm.sh && rvm reload && rvm requirements run && rvm install ruby 2.7 && rvm use ruby 2.7 --default && ruby -v && gem install bundler && gem install rails --no-document && gem install rmagick -v 2.16.0 && gem install mysql2 && yum update -y && ruby -v && rails -v
service iptables start
iptables -I INPUT -p tcp -m multiport --dport 80,443,3306,25,465,587,5432 -j ACCEPT
service iptables save
service iptables restart
useradd ruby
passwd ruby

Auto start when boot or reboot server

vi /etc/rc.d/rc.local (add value)
su - ruby && /home/ruby/.bash_profile
chmod +x /etc/rc.d/rc.local
Login with user edit file : .bash_profile
add value rails start server

Auto Renew SSL

Add cronjob: crontab -e
0 1 1 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
0 1 15 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
(Run 01:00 on the 1st & 15th of every month)
Save and recheck cronjob: crontab -l

Setup SSL free (point domain before setup)

yum update -y && yum -y install git && sudo yum install epel-release -y && sudo yum install certbot-nginx -y && sudo yum install nginx -y && sudo systemctl start nginx && systemctl stop nginx.service && systemctl start nginx.service && systemctl enable nginx.service

Renew SSL

 service nginx stop && certbot renew && service nginx start

Add more website

service nginx stop && sudo certbot --nginx -d domain.com && service nginx start

Setup MariaBD 10.x (Mysql)

echo "[mariadb]" >> /etc/yum.repos.d/MariaDB.repo && echo "name = MariaDB" >> /etc/yum.repos.d/MariaDB.repo && echo "baseurl = http://yum.mariadb.org/10.3/centos6-amd64" >> /etc/yum.repos.d/MariaDB.repo && echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /etc/yum.repos.d/MariaDB.repo && echo "gpgcheck=1" >> /etc/yum.repos.d/MariaDB.repo && yum install MariaDB-server MariaDB-client -y && yum install MariaDB-shared -y && service mysql start && chkconfig mysql on && /usr/bin/mysql_secure_installation

Create database and remote connect

mysql -p
create database db_name COLLATE utf8_general_ci;
grant all privileges on db_name.* to 'db_user'@'%' identified by "db_password";
flush privileges;
exit;


Setup PostgreSQL 10.x

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm && yum install postgresql10 -y && yum install postgresql10-server postgresql10-devel postgresql10-contrib -y && service postgresql-10 initdb && yum install postgresql10-devel -y && export PATH="/usr/pgsql-*/bin:$PATH" && ln -s /usr/pgsql-*/bin/p* /usr/local/bin && chkconfig postgresql-10 on && service postgresql-10 start && chkconfig postgresql-10 on

Create PostgreSQL database

sudo -u postgres psql
if set pass psql ( type: \password postgres )
create database database_name;
create user username_db with encrypted password 'db_password';
grant all privileges on database database_name to username_db;
\q 
service postgresql-10 restart 
Remote connect
vi /var/lib/pgsql/*/data/pg_hba.conf (add last file and change indent to md5) 
host    database_name             username_db              0.0.0.0/0              md5
host    database_name             username_db              ::/0                   md5
host    database_name             username_db             127.0.0.1/32            md5
host    database_name             username_db             ::1/128                 md5
vi /var/lib/pgsql/*/data/postgresql.conf (add last file or change)
listen_addresses = '*' 


Custom Install CentOS 8

dnf update -y && dnf -y install cronie unzip zip sudo which nano openssl gcc && dnf install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel -y && dnf install mysql-devel -y && dnf install git -y && git config --global user.name "ruby rails git" && git config --global user.email "ruby@localhost" && git config --list && dnf install epel-release -y && dnf remove httpd -y && dnf install nginx -y && systemctl start nginx.service && systemctl enable nginx.service && dnf install nodejs -y && dnf install nodejs -y && command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - && curl -L get.rvm.io | bash -s stable && source /etc/profile.d/rvm.sh && rvm reload && rvm requirements run && rvm install ruby 2.7 && rvm use ruby 2.7 --default && ruby -v && dnf install iptables-services -y && gem install bundler && gem install rails --no-document && dnf install -y ImageMagick && dnf install -y GraphicsMagick GraphicsMagick-perl && gem install rmagick && gem install mysql2 && dnf update -y && ruby -v && rails -v
systemctl start iptables.service
iptables -I INPUT -p tcp -m multiport --dport 80,443,3306,25,465,587,5432 -j ACCEPT
service iptables save
systemctl restart iptables.service
systemctl enable iptables
systemctl mask firewalld
useradd ruby
passwd ruby


Auto start when boot or reboot server

vi /etc/rc.d/rc.local (add value)
su - ruby && /home/ruby/.bash_profile
chmod +x /etc/rc.d/rc.local
Login with user edit file : .bash_profile
add value rails start server

Auto Renew SSL

Add cronjob: crontab -e
0 1 1 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
0 1 15 * * certbot renew >> /var/log/ssl-renew.log && /sbin/shutdown -r now
(Run 01:00 on the 1st & 15th of every month)
Save and recheck cronjob: crontab -l

Setup SSL free (point domain before setup)

yum update -y && yum -y install git && sudo yum install epel-release -y && sudo dnf install epel-release -y && sudo dnf install certbot python3-certbot-nginx && sudo yum install certbot-nginx -y && sudo yum install nginx -y && sudo systemctl start nginx && systemctl stop nginx.service && systemctl start nginx.service && systemctl enable nginx.service

Renew SSL

 service nginx stop && certbot renew && service nginx start

Add more website

service nginx stop && sudo certbot --nginx -d domain.com && service nginx start

Setup MariaBD 10.x (Mysql)

dnf install -y mariadb mariadb-server && systemctl enable mariadb.service && systemctl start mariadb.service && chkconfig --levels 235 mariadb on && /usr/bin/mysql_secure_installation

Create database and remote connect

mysql -p
create database db_name COLLATE utf8_general_ci;
grant all privileges on db_name.* to 'db_user'@'%' identified by "db_password";
flush privileges;
exit;


Setup PostgreSQL 10.x/11.x

dnf install postgresql -y && dnf install postgresql-server postgresql-devel postgresql-contrib -y && postgresql-setup --initdb --unit postgresql && dnf install postgresql-devel -y && systemctl enable postgresql && systemctl enable postgresql.service && systemctl start postgresql && dnf install iptables-services -y

systemctl start iptables.service
iptables -I INPUT -p tcp -m multiport --dport 5432 -j ACCEPT
service iptables save
systemctl restart iptables.service
sudo passwd postgres

Create PostgreSQL database

sudo -u postgres psql
if set pass psql ( type: \password postgres )
create database database_name;
create user username_db with encrypted password 'db_password';
grant all privileges on database database_name to username_db;
\q 
sudo systemctl restart postgresql 
Remote connect
vi /var/lib/pgsql/data/pg_hba.conf (add last file and change indent to md5) 
host    database_name             username_db              0.0.0.0/0              md5
host    database_name             username_db              ::/0                   md5
host    database_name             username_db             127.0.0.1/32            md5
host    database_name             username_db             ::1/128                 md5
vi /var/lib/pgsql/data/postgresql.conf (add last file or change)
listen_addresses = '*' 

Custom Install Ubuntu >= 16

apt update -y && apt upgrade -y && sudo apt-get install curl -y && apt install ufw -y && apt install gnupg2 && apt install zip -y && sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev -y && apt install -y libmagickwand-dev && apt install libmysqlclient-dev -y && apt install unzip -y && apt install git -y && git config --global user.name "ruby rails git" && git config --global user.email "ruby@localhost" && git config --list && apt remove apache2 -y && apt install nginx -y && sudo ufw allow 'Nginx HTTP' && systemctl start nginx && systemctl enable nginx && apt install nodejs -y && command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - && curl -L get.rvm.io | bash -s stable && source /etc/profile.d/rvm.sh && rvm reload && rvm requirements run && rvm install ruby 2.7 && rvm use ruby 2.7 --default && ruby -v && gem install bundler && gem install rails --no-document && gem install rmagick && gem install mysql2 && ruby -v && rails -v
apt install ufw
sudo ufw allow ssh
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3306/tcp
sudo ufw allow 5432/tcp
useradd ruby
passwd ruby

Auto start when boot or reboot server

Edit : /etc/rc.local and add value
su - ruby && /home/ruby/.profile
Login with user edit file : .profile
add value rails start server

Auto Renew SSL

Add cronjob: crontab -e
0 1 1 * * certbot renew && /sbin/shutdown -r now
0 1 15 * * certbot renew && /sbin/shutdown -r now
(Run 01:00 on the 1st & 15th of every month)
Save and recheck cronjob: crontab -l

Setup SSL free (point domain before setup)

apt update -y && sudo apt install nginx -y && apt install nginx -y && service nginx stop && service nginx start && apt -y install git && sudo apt install certbot python3-certbot-nginx -y

Renew SSL

 service nginx stop && certbot renew && service nginx start

Add more website

service nginx stop && sudo certbot --nginx -d domain.com && service nginx start

Setup MariaBD (Mysql) (Ubuntu >= 16)

apt install mariadb-server mariadb-client -y && sudo apt-get install libnetcdf-dev libssl-dev libcrypto++-dev -y && mysql_secure_installation

Create database and remote connect

mysql -p
create database db_name COLLATE utf8_general_ci;
grant all privileges on db_name.* to 'db_user'@'%' identified by "db_password";
flush privileges;
exit;


Setup PostgreSQL

apt -y install postgresql postgresql-contrib && sudo apt-get install libpq-dev -y && sudo systemctl status postgresql && sudo systemctl enable postgresql
apt install ufw
sudo ufw allow 5432/tcp
sudo passwd postgres

Create PostgreSQL database

sudo -u postgres psql
if set pass psql ( type: \password postgres )
create database database_name;
create user username_db with encrypted password 'db_password';
grant all privileges on database database_name to username_db;
\q 
sudo systemctl restart postgresql 
Remote connect
vi /etc/postgresql/*/main/pg_hba.conf (add last file and change indent to md5) 
host    database_name             username_db              0.0.0.0/0              md5
host    database_name             username_db              ::/0                   md5
host    database_name             username_db             127.0.0.1/32            md5
host    database_name             username_db             ::1/128                 md5
vi /etc/postgresql/*/main/postgresql.conf (add last file or change)
listen_addresses = '*' 

Install Ubuntu in Win10

sudo apt update -y && sudo apt upgrade -y && sudo apt-get install curl -y && sudo apt install ufw -y && sudo apt install gnupg2 && sudo apt install zip -y && sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev -y && sudo apt install -y libmagickwand-dev && sudo apt install libmysqlclient-dev -y && sudo apt install unzip -y && sudo apt install git -y && git config --global user.name "ruby rails git" && git config --global user.email "ruby@local" && git config --list && sudo apt remove apache2 -y && sudo apt install nodejs -y && command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - && command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - && curl -L get.rvm.io | bash -s stable && source /home/$USER/.rvm/scripts/rvm && rvm reload && rvm requirements run && rvm install ruby 2.7 && rvm use ruby 2.7 --default && ruby -v && gem install bundler && gem install rails --no-document && gem install rmagick && gem install mysql2 && ruby -v && rails -v

Setup MariaBD (Mysql)

apt install mariadb-server mariadb-client -y && sudo apt-get install libnetcdf-dev libssl-dev libcrypto++-dev -y && mysql_secure_installation

Create database and remote connect

mysql -p
create database db_name COLLATE utf8_general_ci;
grant all privileges on db_name.* to 'db_user'@'%' identified by "db_password";
flush privileges;
exit;


Setup PostgreSQL

apt -y install postgresql postgresql-contrib && sudo apt-get install libpq-dev -y && sudo systemctl status postgresql && sudo systemctl enable postgresql
apt install ufw
sudo ufw allow 5432/tcp
sudo passwd postgres

Create PostgreSQL database

sudo -u postgres psql
if set pass psql ( type: \password postgres )
create database database_name;
create user username_db with encrypted password 'db_password';
grant all privileges on database database_name to username_db;
\q 
sudo systemctl restart postgresql 

Point Domain


After setup success, Login with user ruby

Create directory your_site_domain.com.

Go go current web file directory in command line.

Download and extract zip file remote or upload source code from local Download here

bundle install --path vendor/bundle
bundle update
rails s -p xxxx -b domain.com -d

Check database config, cache, secret_key_base, session_store... in web config.

rails s -p xxxx -b domain.com -d -e production

Check port , firewall , add script to .bash_profile , add host to nginx

Point domain or DNS to server.

Make nginx or vhost conf file domain (exam : rubyra.com.conf)

                upstream xxxxxxx.com {
                    server xxxxxxx.com:3000;
                }
                server {
                listen   80;
                #listen 443 ssl;
                server_name xxxxxxx.com www.xxxxxxx.com; 

                #ssl_certificate /etc/letsencrypt/live/xxxxxxx.com/fullchain.pem;
                #ssl_certificate_key /etc/letsencrypt/live/xxxxxxx.com/privkey.pem;
                #ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 
                #ssl_prefer_server_ciphers on;  
                #ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;

                root     /home/ruby/domain.com;
                index    index.html;  
                client_max_body_size 12M;

                gzip on;
                gzip_static on;
                gzip_disable "msie6";
                gzip_vary on;
                gzip_proxied any;
                gzip_comp_level 6;
                gzip_buffers 16 8k;
                gzip_http_version 1.1;
                gzip_types text/plain text/css application/json text/javascript application/javascript text/xml application/xml application/xml+rss;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";

                keepalive_timeout   3600;
                proxy_read_timeout 3600s;

                location / {
                proxy_set_header  X-Real-IP  $remote_addr;
                proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header  Host $http_host;
                proxy_redirect  off;
                proxy_read_timeout 3600;
                try_files /system/maintenance.html $uri $uri/index.html $uri.html @ruby;
            }

            location @ruby {
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header  Host $http_host;
            proxy_set_header  X-Forwarded-Ssl on;
            proxy_redirect  off;
            proxy_read_timeout 300;
            fastcgi_buffers 80 160k;
            fastcgi_buffer_size 320k; 
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://xxxxxxx.com;
        }
    }

Add Host: /etc/host

127.0.0.1 yourdomain.com
::1 yourdomain.com

Mail Server



CentOS 7 (Recommend) , memory is recommended >= 1GB

Config domain : create A / mail / IP address

Config domain : create MX / @ / mail.your_domain.com

hostname -f check : your_domain.com

Add or edit: /etc/hosts add : mail.your_domain.com

Add or edit: /etc/hostname add : mail.your_domain.com


hostnamectl set-hostname your_domain.com
SELINUX=disabled

(Add) /etc/hosts

127.0.0.1 mail.your_domain.com
127.0.0.1 your_domain.com

yum install postfix dovecot -y
mkdir /etc/postfix/ssl
cd /etc/postfix/ssl
openssl genrsa -des3 -out server.key 2048
openssl rsa -in server.key -out server.key.insecure
mv server.key server.key.secure
mv server.key.insecure server.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

(Add) /etc/postfix/main.cf

myhostname = mail.your_domain.com
                    mydomain = your_domain.com
                    myorigin = $mydomain
                    home_mailbox = mail/
                    mynetworks = 127.0.0.0/8
                    inet_interfaces = all
                    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
                    smtpd_sasl_type = dovecot
                    smtpd_sasl_path = private/auth
                    smtpd_sasl_local_domain =
                    smtpd_sasl_security_options = noanonymous
                    broken_sasl_auth_clients = yes
                    smtpd_sasl_auth_enable = yes
                    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
                    smtp_tls_security_level = may
                    smtpd_tls_security_level = may
                    smtp_tls_note_starttls_offer = yes
                    smtpd_tls_loglevel = 1
                    smtpd_tls_key_file = /etc/postfix/ssl/server.key
                    smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
                    smtpd_tls_received_header = yes
                    smtpd_tls_session_cache_timeout = 3600s
                tls_random_source = dev:/dev/urandom

(Add) /etc/postfix/master.cf

submission     inet  n       -       n       -       -       smtpd
                  -o syslog_name=postfix/submission
                  -o smtpd_sasl_auth_enable=yes
                  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
                  -o milter_macro_daemon_name=ORIGINATING
                  smtps     inet  n       -       n       -       -       smtpd
                  -o syslog_name=postfix/smtps
                  -o smtpd_sasl_auth_enable=yes
                  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
              -o milter_macro_daemon_name=ORIGINATING

(Add) /etc/dovecot/conf.d/10-master.conf

service auth {
                unix_listener /var/spool/postfix/private/auth {
                mode = 0660
                user = postfix
                group = postfix
            }
        }

(Add) /etc/dovecot/conf.d/10-auth.conf

auth_mechanisms = plain login

(Add) /etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:~/mail

(Add) /etc/dovecot/conf.d/20-pop3.conf

pop3_uidl_format = %08Xu%08Xv

systemctl restart postfix
systemctl enable postfix
systemctl restart dovecot
systemctl enable dovecot

yum install iptables-services -y
systemctl start iptables.service
iptables -I INPUT -p tcp -m multiport --dport 80,443,3306,25,465,587,110,143,993,995 -j ACCEPT
service iptables save
systemctl restart iptables.service
systemctl enable iptables
systemctl mask firewalld
telnet mail.your_domain.com 465
quit
postfix check

Create email account user

useradd -m email_account_name -s /sbin/nologin && passwd email_account_name

Another way:

Using software mail: https://www.iredmail.org/index.html

Using service : ( https://www.zoho.com/mail/ )

Need support? Contact Here :)

Download


Last updated ( )

Recommend ruby : 2.6.x

Recommend rails : 5.2.x

Check newest version rails: check now

Check version ruby: check now

Demo


Portfolio


Web & Mobile site(Contact here)

API & Integrate (Contact here)

Service


Support

Advisory, Support, Error, Setup, Move Server, Maintain website..

Packet : Support

Price : 15$/hour (Not pay when not happy support)

Fullstack

Fullstack freelance application,website with ruby on rails language.

Packet : Full

Price : Contact here

Advisory : Free

Contact


Email: support@rubyra.com

Chat now: Facebook conversation

Web: www.rubyra.com