Step-1
Gmail Account setting
Step-2
sudo su (Hit and Enter password)
sudo apt-get update
Install Postfix Mail Server
sudo apt-get install postfix
Select no configuration with the help of the arrow key and then select Ok with the tab key
Copy the file
sudo cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
Install Packages below
sudo apt-get install libsas12-2
sudo apt-get install libsas12-modules
sudo apt-get install ca-certificates
Open the following file with your favorite editor
sudo gedit /etc/postfix/main.cf
Copy and Paste the following lines at the bottom of the file:-
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_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
sudo gedit /etc/postfix/sasl_passwd
Add your Gmail account ID and password in the file
[smtp.gmail.com]:587 gmailid@gmail.com:16 digit app password
sudo chmod 400 /etc/postfix/sasl_passwd
Translate the /etc/postfix/sasl_passwd to Postfix lookup tables
sudo postmap /etc/postfix/sasl_passwd
Create the /etc/aliases.db
sudo postalias hash:/etc/aliases
Create the /etc/postfix/cacert.pem.
Ubuntu 20.04 LTS user
sudo cat /etc/ssl/certs/Equifax_Secure_CA.pem >> /etc/postfix/cacert.pem
Ubuntu 18.04 LTS User
sudo cat /etc/ssl/certs/thawte_Primary_Root_CA.pem >> /etc/postfix/cacert.pem
Restart Postfix
sudo /etc/init.d/postfix restart
Enable email service
sudo koha-email-enable library
(Here library is the name of koha instance)
Now Do a few Setting in koha staff Interface
Check the setting in koha for all patron categories
Koha Administration→Patron categories→Overdue notice Required→Check yes
Allow mail Notifications
Koha Administration→Global System Preferences→Patrons→Enhancedmessagingpreferencess→ Allow
Define Default overdue action
Koha →Tools→ Overdue Notice/status triggers
sudo gedit /etc/postfix/sasl_passwd
Add your Gmail ID and password to the file
[smtp.gmail.com]:587 gmailid@gmail.com:App Password(16 digits)
Apply following commands
sudo chmod 400 /etc/postfix/sasl_passwd
sudo /etc/init.d/postfix restart
Now your koha server is ready to send emails again.
0 Comments