Proposals/Done/VERP Mail Bounces

From Mahara Wiki

< Proposals‎ | Done

Variable Envelope Return Path Mail Bounce Detection

This feature allows administrators to set up an email system to detect bounced emails and disable outgoing emails for accounts that get large numbers of bounces.

The feature was introduced in commit id 9b9b2a5c25a078d0c6aab0e4fb6bed1c5eb112d2.

There is also a new addition to this feature in gerrit as change 1181 to allow polling of imap mailboxes for the returned bounces.

This feature requires setting up some config.php settings and some settings in the mail server. The examples below are based on a postfix and procmail installation on the server.

config.php settings

$cfg->bounces_handle  = true;
$cfg->bounceprefix    = 'AAA+';  // config-defaults has 'AAA-'
$cfg->bouncedomain    = '';

Postfix setup


Need the following in addition to any setup, note that if these lines exist, the values need to be added to existing lines

mydestination =
mailbox_command = /usr/bin/procmail RECIPIENT=$ORIGINAL_RECIPIENT

Then run the following as root

postfix reload


AAA: www-data

Then run the following as root



* ^TO_AAA+.*
|"/usr/bin/php /var/www/mahara/lib/processemail.php"