Loading...
 
Skip to main content

Email bounce handling


New in Tiki25. Leveraging rambomst/php-bounce-handler and Email filters, handle email bounces in Tiki: add system tracker to hold bounce information, add bounce handler lib, add sieve filters to check for bounces and add to bounce list in system trackers.


Initial commit: https://gitlab.com/tikiwiki/tiki/-/merge_requests/1879

What is bounce

A bounced email, or bounce, is an email message that gets rejected by a mail server. When an email bounces, it has for some reason not reached the intended destination.

A bounced email can be either a hard bounce or a soft bounce. A hard bounce means that the email address is permanently unavailable and should not receive electronic mail. A soft bounce is temporary, and may be caused by server outages or a full inbox. Most email service providers will designate soft bounces as a hard bounce after three failed sends.

How to configure

Step 1: Configure system tracker holding bounce information


Go to System-Trackers, access it from /tiki-admin.php?page=trackers and check Email bounces tracker then:

  • Choose which tracker will store the bounced emails and statistics.
  • Choose an email field that stores the email address that bounced.
  • Choose an email folder field that stores the bounced messages read by Tiki.
  • Choose a numeric field that stores the total number of soft bounces occured for an email address.
  • Choose a numeric field that stores the total number of hard bounces occured for an email address.
  • Choose a checkbox field that stores the blacklist state for an email address - whether Tiki should skip sending emails to that email address or not.

click to enlarge
click to enlarge

Create a tracker with these fields before

click to enlarge
click to enlarge

Step 2: Configure the filter

Go to Webmail, Click on filters in settings section then click on add filter and set other details of filter: name, priority and test. In the conditions & actions section, Add is bounce as a condition and select type of condition soft, is not soft, hard, not hard. Then click on add action and pick add to bounce list

click to enlarge
click to enlarge

Step 3: Set up cron job


Finally add php console.php sieve:filters command to Tiki Scheduler or a cron job

When these are configured and condition is met (using https://github.com/rambomst/PHP-Bounce-Handler/) item is created/updated in the bounce tracker, updating soft/hard bounce counts, the email added to the tracker email field (if configured)

Attached files

ID Name Comment Uploaded Size Downloads
181 Screenshot 2023-01-18 at 08.51.58.png Tracker creation to hold bounce information Josaphat Imani Nathan 208.61 Kb 119
180 Screenshot 2023-01-18 at 08.51.23.png Filter configuration Josaphat Imani Nathan 158.16 Kb 102
179 Screenshot 2023-01-18 at 08.52.25.png System tracker configuration Josaphat Imani Nathan 298.04 Kb 112