Next, validate certificates to avoid running into error. Sudo postmap /etc/postfix/sasl_passwd Code language: Bash ( bash ) Create that file using VI: vi /etc/postfix/sasl_passwd Code language: Bash ( bash )Īnd add following line: :587 Code language: Bash ( bash )įix permission and update Postfix config to use sasl_passwd file: sudo chmod 400 /etc/postfix/sasl_passwd We specifiy our Gmail username and password in the file /etc/postfix/sasl_passwd. Smtp_use_tls = yes Code language: Bash ( bash ) Smtp_tls_CAfile = /etc/postfix/cacert.pem Smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd Now open your postfix config file: vi /etc/postfix/main.cf Code language: Bash ( bash )Īnd add following lines to it: # SASL SUPPORT FOR SERVERS # The following options set parameters needed by Postfix to enable # Cyrus-SASL support for authentication of mail servers. Don’t forget to set a valid FQDN hostname. If Postfix Configuration asks for a general type of mail configuration, choose Internet Site. Install all necessary packages for Postfix: sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules Code language: Bash ( bash ) We install Postfix and configure Postfix to relay mail through Google Gmail SMTP servers. That may be down too in case of an event. Since we use Monit to monitor websites, we don’t want to use our hosting provider’s SMTP server. (update: now we have Windows Subsystem for Linux, or WSL to host Monit!)Ĭonfigure email delivery, relay Postfix mail through Google Gmail SMTPįirst, we have to make sure Monit can send out email notifications. The same applies to Windows Server 2012 R2 Hyper-V of course. However, since not everyone has an extra computer to run an additional Linux distribution, we use an Ubuntu VM in Hyper-V. Nowadays, anybody can run virtual machines in Hyper-V on their Windows 8.1 or Windows 10 workstation. Configure Monit (website-, DNS- and SMTP-monitoring at the moment).Install Monit and additional services (like Postfix to send out notifications).Install Ubuntu Server 14.04.1 LTS VM on Hyper-V.Even though it’s on Windows 8.1, the same would apply for Windows Server 2012 R2. Lacking the extra physical computer, I decided to use a virtual Linux installation in Hyper-V. Interesting enough to start playing around with it. I recently read about Monit in a DigitalOcean tutorial, and it looked interesting. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. Monit is a small Open Source utility for managing and monitoring Unix systems. Monit monitoring for websites and services, on an Ubuntu 14.04 LTS VM, hosted on a Windows Server 2012 R2 or Windows 8.1 Hyper-V. 3 Monit reporting to M/Monit Monit monitoring
0 Comments
Leave a Reply. |