I got free SSL certificate from StartSSL
Certificate ca.pem private.key ssl.crt ssub.class1.server.ca.pemfiles are in cd /etc/apache2/ssl and they work fine when accessing Apachee server from the web.
Line below were added to /etc/apache2/sites-enabled/000-default
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/ssl/ssl.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem
As you can see etc/apache2/sites-enabled/000-default is lookin in ther correct spot for my StartSSL files so everthing is good,
But I am having problems with certs in my email clients when accessing the mail server on the same droplet. Suposidly iRedMail sets itself up to use it own certificate and thus this is in main.cf
# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
The big question? I asume I want it to use my certificates from StartSSL instead. Can I just change the above two lines to /etc/apache2/ssl/* ?
smtpd_tls_cert_file = /etc/apache2/ssl/sub.class1.server.ca.pem
smtpd_tls_key_file = SSLCertificateKeyFile /etc/apache2/ssl/private.key
And also do I have to have to add a line to point to /etc/apache2/ssl/ssl.crt?
# information on enabling SSL in the smtp client.
myhostname = mx.mydomain.us
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
myorigin = mx.mydomain.us
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
relayhost =
Commands:
root@mydomain.us:/etc# hostname
mydomain.us
root@mydomain.us:/etc# cat hosts
127.0.0.1 mx.mydomain.us mydomain.us localhost localhost.localdomain
#127.0.0.1 localhst mydomain.us mydomain
Should I change in main.cf the line:
myhostname = mx.mydomain.us to myhostname = mydomain.us
Or since mx.mydomain.us is in /etc/hosts will it still work fine?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You will need to combine /etc/apache2/ssl/ssl.crt and /etc/apache2/ssl/sub.class1.server.ca.pem and then configure iRedMail to use the resulting file as the certificate:
cat /etc/apache2/ssl/ssl.crt /etc/apache2/ssl/sub.class1.server.ca.pem > /etc/apache2/ssl/combined.crt
Then, set the following configuration options:
smtpd_tls_cert_file = /etc/apache2/ssl/combined.crt
smtpd_tls_key_file = /etc/apache2/ssl/private.key
I would change the droplet’s hostname to mx.mydomain.us instead:
echo mx.mydomain.us | sudo tee /etc/hostname | sudo tee /etc/mailname
and then reboot:
sudo reboot
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.