Skip to content

# Going live

Before you take your new mail server into production, please replace the dummy database passwords by some actual random passwords:

Run this on your server

    # Create two random passwordsPW_MAILADMIN=$(pwgen -s 32 1)PW_MAILSERVER=$(pwgen -s 32 1)
    # Replace the dummy passwordssed -i "s|MAILADMIN-PASSWORD-HERE|$PW_MAILADMIN|g" /etc/roundcube/plugins/password/config.inc.php
    sed -i "s|MAILSERVER-PASSWORD-HERE|$PW_MAILSERVER|g" \    /etc/dovecot/conf.d/99-ispmail-sql.conf \    /etc/postfix/mariadb-virtual-mailbox-maps.cf \    /etc/postfix/mariadb-virtual-mailbox-domains.cf \    /etc/postfix/mariadb-virtual-alias-maps.cf \    /etc/postfix/mariadb-email2email.cf
    # Restart the servicessystemctl restart postfix dovecot
    # Update MariaDB user passwordsmariadb <<EOFALTER USER 'mailadmin'@'localhost' IDENTIFIED BY '${PW_MAILADMIN}';ALTER USER 'mailserver'@'127.0.0.1' IDENTIFIED BY '${PW_MAILSERVER}';FLUSH PRIVILEGES;EOF
    # Delete example datamariadb <<EOFDELETE FROM virtual_domains where name='example.org';EOF

    # Print the passwords for us to write downecho "mailadmin password:  $PW_MAILADMIN"echo "mailserver password: $PW_MAILSERVER"

Now you are ready to go live. Congratulations on making it this far. And please drop a comment at the bottom if you want to proudly report that you have your new server up and running.