Extension:BounceHandler/fr

L'extension BounceHandler permet aux wikis de gérer efficacement les e-mails de rebond, en :


 * Générer un VERP "Variable envelope Return-Path" sur les appels d'e-mail de.
 * Les rebonds peuvent être directement transmis à l'API  depuis le MTA à l'aide d'une requête curl POST

En conséquence, les utilisateurs dont l'adresse est erronée sont désabonnés et ils en sont informés via Echo lors de leur prochaine connexion sur le wiki. Plus exactement, leur adresse n'est pas confirmée, et dans le cas où MediaWiki requiert des e-mails confirmés, aucun e-mail ne sera envoyé.

Configuration
L'extension nécessite que l'agent de transfert de courrier (MTA) installé sur votre serveur de messagerie HTTP POST l'e-mail de rebond entrant à l'API d'extension nommée. Cela peut être fait en ajoutant les configurations correspondantes à votre configuration MTA.



Ajout d'un routeur bouncehandler et d'une configuration de transport à Exim
Vous pouvez rediriger tous vos e-mails de rebond vers l'API bouncehandler directement pour effectuer le traitement. Vous pouvez modifier vos configurations Exim pour acheminer tous les e-mails de rebond vers un bounce-handler-router et effectuer un HTTP POST vers l'API d'extension, qui est la méthode recommandée.

Ajoutez ceci à votre

Sous la section de déclaration de variable :

under router configuration:

under transports, we need to write the configuration that would HTTP POST to our bouncehandler API

You can find more details in this blog-post "POST-ing bounce email to a Mediawiki API directly from exim".

Adding bouncehandler configuration to Postfix
This section shows how the BounceHandler extension can be configured to handle bounced emails from Postfix, unlike the above section which shows how to do the same with Exim.

First of all, please make sure that Postfix & the package "postfix-pcre" are installed. Once these two installed, open up /etc/postfix/main.cf and add the following in the end of the file:

Also, make sure that alias_maps is set to the following:

Save & close that file, and then create a new file called etc/postfix/virtual,, and add the following ode

This will tell Postfix that all the bounced emails (the ones which have return path matching with the above regex expression) should be passed on to the command specified in the alias 'curl_email'.

Now we need to define curl_email as our alias, so save & close this file, open up /etc/aliases and add the following:

Save & close that file, and now type the following commands, to map your /etc/postfix/ to postfix, and then restart postfix:

Save and close this file, and head over to your MediaWiki's LocalSettings.php and make sure add the following line:

Once that is done, save and close this file. To test if this works, send an email to an invalid email to your server and then run:

To check if your email bounces were captured, check the bounce_records table in your MediaWiki database, and /var/log/mail.log for further testing.

API
The BounceHandler extension installs an API  to receive the HTTP POST from the mail server. The API has a parameter  to which the entire bounce email is URL encoded to. This helps in avoiding the use of a separate bounce collector inbox or other IMAP features for the extension to work.

Example API call:

This would send a bounce email with the body  for processing.

VERP address
The extension creates a unique VERP address as the Return Path header to every single email send from the wiki installation. The generated VERP address is of the form wiki-testwiki-2a-nanrfx-Tn14EQZWaotS2XNn@verpwebhost.wmflabs.org The general template of the generated VERP address is: $prefix-$wikiName-base36( $userID )-base36( $timestamp )-base64( hash( $algorithm, $key, $data ) )@$email_domain