Thin -d -p 9292 -ssl -ssl-key-file /etc/ssl/private/mailserver.pem -ssl-cert-file /etc/ssl/certs/mailserver.pem start Thin web server (v1.7.1 codename Muffin Mode) You should see the console that looks like this: Thin -p 9292 -ssl -ssl-key-file /etc/ssl/private/mailserver.pem -ssl-cert-file /etc/ssl/certs/mailserver.pem start Thin -ssl -ssl-key-file /etc/ssl/private/mailserver.pem -ssl-cert-file /etc/ssl/certs/mailserver.pemĬonfigure your port, eg running on port 9292 with SSL: You need to provide the signed certificate and key for using SSL: Thin –help should give you a list of options to start the thin server. To enable https, just install thin server:Ĭhange directory to your posty API folder:Īdd the “gem ‘thin’, ‘~> 1.7.1′” to the list of gems, to install thin server: For this reason, instead of webrick as the default server, we can use thin server instead which provides secure http. Since your web UI is served as secure http, when calling the posty API without https, your browser will block these connections. You need to make some changes to the posty REST server if you are going to enforce secure connection. htpasswd file using htpasswd command and file in the /etc/posty_webui/ directory Secure your API web administration with an admin password:Ĭreate your. Vi /etc/apache2/sites-enabled/nfĪdd the following after the line ‘Include /etc/phpmyadmin/nf’ Include the configuration in the main apache config: For this posty Web UI is also available from Īdjust the configurations according to your needs in the settings.json like url and api keys Optionally you may want to use the posty API using a web UI. Usually port 25 will be blocked by your ISP so you may need to check your ports in case of non delivery Note: You need to make sure your MX records are set up properly for email delivery outside your system. Likewise, you can test email delivery using roundcube by sending an email to your gmail account and vise versa. You can also use telnet command to see if you can connect localhost using smtp. Testing local mail delivery using mail command:Įcho Hello | mail can now log in with Roundcube and check if the mail is delivered. $rcmail_config = $rcmail_config = "UPDATE users_view SET password=ENCRYPT (%p, CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))) WHERE email=%u" The password query is used when updating the password through roundcube, adjusting to the table structure by posty API. To permanently redirect http to https, in /etc/apache2/sites-available/nf addĬonfig plugins in /etc/roundcube/ To add Roundcube configuration to apache: SSLCertificateKeyFile /etc/ssl/private/mailserver.key SSLCertificateFile /etc/ssl/certs/mailserver.pem In this case we will use Roundcube as discussed in the previous post.Įnable https: In /etc/apache2/sites-available/nf So before we test, we also need to setup an email client. Now we need to test email delivery and check if the server is configured properly. In the last blog post, we have set up the necessary tools for an email server to function and configured them.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |