Pages

Configure Exim with Gmail to send notices from Koha

Exim is a Mail Transfer Agent suitable (MTA) with Linux operating systems. Koha user can install Exim to send email notices to library users. Exim can be used instead of Postfix.

An email from Koha.


Follow the steps to install and configure Exim with Koha.

1. Create a Gmail Account
Either use an existing Gmail account or create a new one for the purpose send notices from Koha. Google turning off less secure app access to G Suite accounts. Use the following link to finish two-step verification for Google accounts. Create an app password for email clients (e.g. Exim, Postfix). https://support.google.com/accounts/answer/185833?hl=en

2. Install Exim
Open a  Terminal and apply the following command to install Exim on Ubuntu Linux.

sudo apt-get install exim4-base exim4-config exim4-daemon-light mailutils mutt

3. Configure Exim
Apply the following command to configure Exim to use a Gmail account.

sudo dpkg-reconfigure exim4-config

A configuration window will open in the terminal and reply for each question based on the screenshots below. Use the Tab key for selection of the button.





Accept the default parameters.

Leave the field blank.

Leave the field blank.





4. Save login credentials

sudo mousepad /etc/exim4/passwd.client

Add the following lines in the file. Save and close.

smtp.gmail.com:your_username@gmail.com:password_here

Remember to replace with your Gmail ID and password in the above-mentioned line.


5. Update configuration file and restart Exim
Apply the following commands.

sudo update-exim4.conf

Restart Exim

sudo service exim4 restart


6. Send test mail from Exim
Change email name in the following command and copy-paste in Terminal and press enter button.

sudo echo 'My Test Text' | mail -s Testmail name@gmail.com

Check the destination mail to know the test mail arrived or not.

7. Enable email messaging in Koha
Apply the following command in a Terminal.

sudo koha-email-enable library

8. Prepare Koha to send email messages

A). Enabled Enhanced Messaging preferences

Koha Administration > Global System Preferences > Patrons > Enhancedmessagingpreferences > Allow

B) Overdue Notice/Status triggers

Koha >  Tools > Overdue Notice/status triggers
C) Enable messaging preferences for each patron categories

Koha > Administration > Patron categories >


References
https://wiki.debian.org/GmailAndExim4

http://www.fyzix.net/index.php?title=Installing_and_Configuring_Exim4_for_Gmail_SMTP_Relay

http://www.pontikis.net/blog/gmail-smarthost-exim4-debian

1 comment: