Repository navigation
Email configuration
7thCore edited this page Jan 16, 2022
·
7 revisions
To use the email function for instance with a gmail account you have to enable two factor authentication on gmail and then create an application password for it.
Run the script with root privliges and follow the instructions:
sudo isrsrv install_email
These is an example configuration for gmail. Add these lines to the following file:
/etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtpd_tls_CApath = /etc/ssl/certs
smtp_use_tls = yes
Then add your email address and application password to the following file (without brackets):
/etc/postfix/sasl_passwd
[smtp.gmail.com]:587 <your.email@gmail.com>:<application-password>
Change file permissions, use postmap to setup the account and enable the postfix service:
sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo systemctl enable postfix
Create the following file and add these lines to it based on your desired configuration (1 is true, 0 is false):
/srv/isrsrv/config/isrsrv-email.conf
email_sender=the-account-that-will-send-emails@gmail.com
email_recipient=the-account-that-will-recieve-emails@gmail.com
email_update=1
email_start=1
email_stop=1
email_crash=1
Table of contents
Pre-installation (Debian based)