{"version":"https://jsonfeed.org/version/1.1","title":"Stephen Ajulu","home_page_url":"https://ajulu.netlify.app/","feed_url":"https://ajulu.netlify.app/tags/koha-smtp/feed.json","description":"Hello, I'm Stephen Ajulu, a seasoned multidisciplinary tech professional with over a decade of experience. I build impactful solutions using design, tech, and engineering in the pursuit of impact.","icon":"https://ajulu.netlify.app/images/me.jpg","authors":[{"name":"Stephen Ajulu","url":"https://stephenajulu.com","avatar":"https://ajulu.netlify.app/images/me.jpg"}],"items":[{"id":"https://ajulu.netlify.app/posts/koha-how-to-setup-gmail-email-notices-with-postfix/","url":"https://ajulu.netlify.app/posts/koha-how-to-setup-gmail-email-notices-with-postfix/","title":"Koha: How To Setup Gmail Email Notices with Postfix","summary":"1. Installation of postfix mail server Open a terminal and apply the following commands,\nsudo apt-get update \u0026amp;\u0026amp; sudo apt-get install postfix Select \u0026ldquo;no configuration\u0026rdquo; in the post-installation screen.\n2. Copy the configuration file. sudo cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf 3. Install the following packages as well sudo apt-get install libsasl2-2 libsasl2-modules ca-certificates mailutils 4. Open the following file and add a few lines. sudo nano /etc/postfix/main.cf Add the following lines at the bottom of the file.\n","content_html":"\u003ch2 id=\"1-installation-of-postfix-mail-server\"\u003e\u003cstrong\u003e1. Installation of postfix mail server\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eOpen a terminal and apply the following commands,\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo apt-get update \u0026amp;\u0026amp; sudo apt-get install postfix\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eSelect \u0026ldquo;no configuration\u0026rdquo; in the post-installation screen.\u003c/p\u003e\n\u003ch2 id=\"2-copy-the-configuration-file\"\u003e\u003cstrong\u003e2. Copy the configuration file.\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"3-install-the-following-packages-as-well\"\u003e\u003cstrong\u003e3. Install the following packages as well\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo apt-get install libsasl2-2 libsasl2-modules ca-certificates mailutils\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"4-open-the-following-file-and-add-a-few-lines\"\u003e\u003cstrong\u003e4. Open the following file and add a few lines.\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo nano /etc/postfix/main.cf\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAdd the following lines at the bottom of the file.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003erelayhost = [smtp.gmail.com]:587\nsmtp_sasl_auth_enable = yes\nsmtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd\nsmtp_sasl_security_options = noanonymous\nsmtp_tls_CAfile = /etc/postfix/cacert.pem\nsmtp_use_tls = yes\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"5-configure-gmail\"\u003e\u003cstrong\u003e5. Configure Gmail\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eNow for Gmail to work with an SMTP server. One of two things must happen.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eFor corporate accounts(Google Workspace for Business): You must go to \u0026ldquo;Manage Account\u0026rdquo; - \u0026ldquo;Security\u0026rdquo; and then allow less secure apps to access Gmail.\u003c/li\u003e\n\u003cli\u003eFor normal/free accounts: You must enable 2-factor authentification and then set up an App Password.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eOpen the following file and add the Google app password for Gmail.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo nano /etc/postfix/sasl_passwd\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAdd the following line in the opened file.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e[smtp.gmail.com]:587 urgmailid@gmail.com:yourpassword\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAdd your Gmail username and password.\u003c/p\u003e\n\u003ch2 id=\"6-change-the-permission-of-the-following-file\"\u003e\u003cstrong\u003e6. Change the permission of the following file.\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo chmod 400 /etc/postfix/sasl_passwd\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"7-translate-the\"\u003e\u003cstrong\u003e7. Translate the \u003cem\u003e/etc/postfix/sasl_passwd\u003c/em\u003e to Postfix lookup tables.\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo postmap /etc/postfix/sasl_passwd\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"8-create-the\"\u003e\u003cstrong\u003e8. Create the \u003cem\u003e/etc/aliases.db\u003c/em\u003e\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo postalias hash:/etc/aliases\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"9-create-the\"\u003e\u003cstrong\u003e9. Create the \u003cem\u003e/etc/postfix/cacert.pem\u003c/em\u003e\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eHere depends on the Ubuntu version and how recently it\u0026rsquo;s been updated.\u003c/p\u003e\n\u003cp\u003eAs such go to /etc/ssl/certs/ then find any certificate with \u003cem\u003eSecureCA.pem\u003c/em\u003e then replace the Equifax section and place the one you\u0026rsquo;ve found.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo cat /etc/ssl/certs/Equifax_Secure_CA.pem \u0026gt;\u0026gt; /etc/postfix/cacert.pem\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"10-restart-postfix\"\u003e\u003cstrong\u003e10. Restart Postfix.\u003c/strong\u003e\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003esudo /etc/init.d/postfix restart\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"11-enable-email-service-in-koha\"\u003e\u003cstrong\u003e11. Enable email service in Koha\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eExecute the following command in a terminal\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo koha-email-enable library\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch2 id=\"13-check-the-following-settings-in-koha-to-send-email-notices\"\u003e\u003cstrong\u003e13. Check the following settings in Koha to send email notices,\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eKoha \u0026gt; Administration \u0026gt; Patron categories \u0026gt; Overdue notice required \u0026gt; Yes\u003c/strong\u003e\u003cbr\u003e\n[Check for each patron category]\u003c/p\u003e\n\u003cimg src=\"https://1.bp.blogspot.com/-X6HmNV23Gc0/WEGrylqX5NI/AAAAAAAAT74/r6TEsZN0mAAHVVxWNskVfnJWZIz39bFlACLcB/s640/Koha%2B%25E2%2580%25BA%2BAdministration%2B%25E2%2580%25BA%2BPatron%2Bcategories%2B%25E2%2580%25BA%2BMessaging%2Bpreferences.png\" style=\"max-width:100%;height:auto;\"\u003e\n\u003cp\u003e\u003cstrong\u003eKoha Administration \u0026gt; Global System Preferences \u0026gt; Patrons \u0026gt; Enhancedmessagingpreferences \u0026gt; Allow\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eSet \u003cstrong\u003eKoha\u003c/strong\u003e \u0026gt; \u003cstrong\u003eTools\u003c/strong\u003e \u0026gt; [\u003cstrong\u003eOverdue Notice/status triggers\u003c/strong\u003e]\u003c/p\u003e\n\u003cimg src=\"https://1.bp.blogspot.com/-nika5CdbheM/WEGrO2reR_I/AAAAAAAAT70/TRcK_LeVDog6m7mFP6YdSZiBVaU_0ZoPwCLcB/s640/Koha%2B%25E2%2580%25BA%2BTools%2B%25E2%2580%25BA%2BNotice%2Btriggers.png\" style=\"max-width:100%;height:auto;\"\u003e\n\u003ch2 id=\"14-additional-smtp-setup\"\u003e\u003cstrong\u003e14. Additional SMTP Setup\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eConfigure in the SMTP Server page under Additional parameters in Koha administration\u003c/p\u003e\n\u003cp\u003eGo to Home \u0026ndash;\u0026gt; Administration \u0026ndash;\u0026gt; Additional parameters \u0026ndash;\u0026gt; SMTP servers \u0026ndash;\u0026gt; New SMTP Server\u003c/p\u003e\n\u003cp\u003eName: GMail\u003c/p\u003e\n\u003cp\u003eHost: smtp.gmail.com\u003c/p\u003e\n\u003cp\u003ePort: 465\u003c/p\u003e\n\u003cp\u003eSSL: SSL (authentication)\u003c/p\u003e\n\u003cp\u003eUser name: \u003ca href=\"mailto:libraryemail@gmail.com\"\u003elibraryemail@gmail.com\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003ePassword: theapppassword\u003c/p\u003e\n\u003cp\u003eUpdate in the branch library details,\u003c/p\u003e\n\u003cp\u003eGo to Home \u0026ndash;\u0026gt; Administration \u0026ndash;\u0026gt; libraries \u0026ndash;\u0026gt; choose your library update SMTP server selecting the new one we have created\u003c/p\u003e\n\u003ch2 id=\"14-test-the-configuration\"\u003e\u003cstrong\u003e14. Test the configuration\u003c/strong\u003e\u003c/h2\u003e\n\u003cp\u003eYou can test the configuration by running the following command\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eecho \u0026quot;Test Postfix Gmail LIBRARY\u0026quot; | mail -s \u0026quot;Postfix Gmail SMTP Relay\u0026quot; reciever@gmail.com\n\u003c/code\u003e\u003c/pre\u003e\n\u003ch5 id=\"you-are-ready-to-send-emails-from-koha-cheers\"\u003e\u003cstrong\u003eYou are ready to send emails from koha, Cheers!\u003c/strong\u003e\u003c/h5\u003e\n\u003cp\u003eI also offer this setup as a service for $5: \u003ca href=\"/contact\"\u003e\u003cstrong\u003eContact me\u003c/strong\u003e\u003c/a\u003e\u003c/p\u003e\n","date_published":"2022-11-10T19:00:00+03:00","image":"https://ajulu.netlify.app/images/koha-user.jpg","tags":["koha","postfix","email notices","smtp","koha smtp","koha email","koha postfix","email","mail","library","libraries","tech","technologies","technology"]}]}